|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnextapp.echo.AbstractComponent
net.sf.jzeno.echo.components.CustomComponent
net.sf.jzeno.echo.components.MenuBar
public class MenuBar
Generic menubar that initializes itself based on a property file.
This property file is called menu.properties (typically in the root of your WEB-INF/classes folder) and must comply with the following format :
menuName1=Title of menu
menuName1.menuName2=Title of second menu
menuName1.menuName2.menuItemName=Title_of_the_menu_ITEM,package.ScreenClassName
You may also specify generic menu options that map to a function in the current screen like this :
menuName1.menuName2.menuItemName=Title_of_the_menu_ITEM,name_of_the_public_function_to_call
Field Summary |
---|
Constructor Summary | |
---|---|
MenuBar()
|
|
MenuBar(boolean horizontal)
|
Method Summary | |
---|---|
void |
actionPerformed(ActionEvent actionEvent)
Invoked when an action occurs. |
void |
applyContext()
|
void |
applyStyle(Style style)
Sets stylistic properties of this component based on a Style
object. |
Color |
getBackground()
Returns the background color of the component. |
Font |
getFont()
Returns the font. |
Color |
getForeground()
Returns the foreground of the component. |
int |
getHorizontalAlignment()
|
int |
getHorizontalTextPosition()
|
int |
getLeft()
|
int |
getLeftOffset()
|
int |
getMargin()
|
Color |
getMenuBorderColor()
|
int |
getMenuBorderSize()
|
int |
getMenuWidth()
|
MenuBarModel |
getModel()
|
int |
getPadding()
|
Color |
getRolloverBackground()
|
Color |
getRolloverBorderColor()
|
Font |
getRolloverFont()
|
Color |
getRolloverForeground()
|
ImageReference |
getRolloverIcon()
|
ImageReference |
getRolloverSelectedIcon()
|
ImageReference |
getSelectedIcon()
|
ImageReference |
getSubmenuImage()
|
java.lang.String |
getSubMenuImage()
|
int |
getSubmenuImageAlignment()
|
java.lang.String |
getToolTipText()
|
int |
getTop()
|
Color |
getTopMenuBackground()
|
int |
getTopOffset()
|
int |
getVerticalAlignment()
|
int |
getVerticalTextPosition()
|
int |
getWidth()
|
boolean |
isClickToOpen()
|
boolean |
isEnabled()
Returns true if the component is enabled. |
boolean |
isFixedPosition()
|
boolean |
isFocused()
Returns true if the component is focused. |
boolean |
isHorizontal()
|
boolean |
isKeepAlive()
|
boolean |
isMenuVisible(java.lang.String menuName)
|
boolean |
isRolloverEnabled()
|
boolean |
isScrollWithPage()
|
boolean |
isSelected()
|
boolean |
isSuckerfishRendering()
|
void |
rebuild()
|
void |
setBackground(Color background)
Sets the background color of the component. |
void |
setClickToOpen(boolean clickToOpen)
|
void |
setEnabled(boolean enabled)
Sets whether the component is enabled. |
void |
setFixedPosition(boolean fixedPosition)
|
void |
setFocused(boolean focused)
Sets whether the component is focused. |
void |
setFont(Font font)
Sets the font of the component. |
void |
setForeground(Color foreground)
Sets the foreground color of the component. |
void |
setHorizontal(boolean horizontal)
|
void |
setHorizontalAlignment(int ha)
|
void |
setHorizontalTextPosition(int htp)
|
void |
setKeepAlive(boolean b)
|
void |
setLeft(int newValue)
|
void |
setLeftOffset(int newLeftOffset)
|
void |
setMargin(int newValue)
|
void |
setMenuBorderColor(Color newBorderColor)
|
void |
setMenuBorderSize(int newBorderSize)
|
void |
setMenusVisible(java.lang.String[] menuNames,
boolean visible)
|
void |
setMenuVisible(java.lang.String menuName,
boolean visible)
|
void |
setMenuWidth(int width)
|
void |
setPadding(int newValue)
|
void |
setRolloverBackground(Color newValue)
|
void |
setRolloverBorderColor(Color newBorderColor)
|
void |
setRolloverEnabled(boolean newValue)
|
void |
setRolloverFont(Font newValue)
|
void |
setRolloverForeground(Color newValue)
|
void |
setRolloverIcon(ImageReference newValue)
|
void |
setRolloverSelectedIcon(ImageReference newValue)
|
void |
setScrollWithPage(boolean newValue)
|
void |
setSelected(boolean newValue)
|
void |
setSelectedIcon(ImageReference newValue)
|
void |
setSubmenuImage(ImageReference newImageRef)
|
void |
setSubMenuImage(java.lang.String subMenuImage)
|
void |
setSubmenuImageAlignment(int newAlignment)
|
void |
setSuckerfishRendering(boolean suckerfishRendering)
|
void |
setToolTipText(java.lang.String newValue)
|
void |
setTop(int newValue)
|
void |
setTopMenuBackground(Color background)
|
void |
setTopOffset(int newTopOffset)
|
void |
setVerticalAlignment(int newValue)
|
void |
setVerticalTextPosition(int newValue)
|
void |
setWidth(int newValue)
|
Methods inherited from class net.sf.jzeno.echo.components.CustomComponent |
---|
addValidator, fireActionEvent, fireActionEvent, fireActionEvent, getActionCommand, getBean, getBeanClass, getDecorator, getNullObject, getProperty, getValidationErrors, getValidators, getValue, isBound, isMarkedInvalid, isReadOnly, isRequired, isValid, markInvalid, markValid, preRender, rebind, removeValidator, setActionCommand, setBean, setBeanClass, setDecorator, setNullObject, setProperty, setReadOnly, setRequired, setValue, traceValue, validate |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MenuBar(boolean horizontal)
public MenuBar()
Method Detail |
---|
public MenuBarModel getModel()
public void rebuild()
rebuild
in interface MenuComponent
public void actionPerformed(ActionEvent actionEvent)
ActionListener
actionPerformed
in interface ActionListener
actionEvent
- The event describing the action.public void setMenuWidth(int width)
public int getMenuWidth()
public void setTopMenuBackground(Color background)
public Color getTopMenuBackground()
public java.lang.String getSubMenuImage()
public void setSubMenuImage(java.lang.String subMenuImage)
public void applyStyle(Style style)
Component
Style
object. The version of this method in Component
will set
foreground and background colors and the font from the style if they are
present. Components should override this method if they allow more
properties to be set from a style object, and should call
super.applyStyle() if necessary.
applyStyle
in interface Component
applyStyle
in class AbstractComponent
style
- The style object from which to retrieve properties for this
Component
.public void setKeepAlive(boolean b)
public boolean isKeepAlive()
public void setMenuVisible(java.lang.String menuName, boolean visible)
public void setMenusVisible(java.lang.String[] menuNames, boolean visible)
public boolean isMenuVisible(java.lang.String menuName)
public void setBackground(Color background)
Component
setBackground
in interface Component
setBackground
in class AbstractComponent
background
- The new background color of the component.public Color getBackground()
Component
getBackground
in interface Component
getBackground
in class AbstractComponent
public void setClickToOpen(boolean clickToOpen)
public boolean isClickToOpen()
public void setEnabled(boolean enabled)
Component
setEnabled
in interface Component
setEnabled
in class AbstractComponent
enabled
- True if the component is enabled.public boolean isEnabled()
Component
isEnabled
in interface Component
isEnabled
in class AbstractComponent
public void setFixedPosition(boolean fixedPosition)
public boolean isFixedPosition()
public void setFocused(boolean focused)
Component
setFocused
in interface Component
setFocused
in class AbstractComponent
focused
- True if the component is to be focused.public boolean isFocused()
Component
isFocused
in interface Component
isFocused
in class AbstractComponent
public void setFont(Font font)
Component
setFont
in interface Component
setFont
in class AbstractComponent
font
- The new font of the component.public Font getFont()
Component
getFont
in interface Component
getFont
in class AbstractComponent
public void setForeground(Color foreground)
Component
setForeground
in interface Component
setForeground
in class AbstractComponent
foreground
- The new foreground color of the component.public Color getForeground()
Component
getForeground
in interface Component
getForeground
in class AbstractComponent
public void setHorizontal(boolean horizontal)
public boolean isHorizontal()
public void setHorizontalAlignment(int ha)
public int getHorizontalAlignment()
public void setHorizontalTextPosition(int htp)
public int getHorizontalTextPosition()
public int getLeft()
public int getTop()
public boolean isScrollWithPage()
public void setLeft(int newValue)
public void setScrollWithPage(boolean newValue)
public void setTop(int newValue)
public int getLeftOffset()
public int getMargin()
public Color getMenuBorderColor()
public int getMenuBorderSize()
public int getPadding()
public ImageReference getSubmenuImage()
public int getSubmenuImageAlignment()
public int getTopOffset()
public int getWidth()
public void setLeftOffset(int newLeftOffset)
public void setMargin(int newValue)
public void setMenuBorderColor(Color newBorderColor)
public void setMenuBorderSize(int newBorderSize)
public void setPadding(int newValue)
public void setSubmenuImage(ImageReference newImageRef)
public void setSubmenuImageAlignment(int newAlignment)
public void setTopOffset(int newTopOffset)
public void setWidth(int newValue)
public Color getRolloverBorderColor()
public void setRolloverBorderColor(Color newBorderColor)
public Color getRolloverBackground()
public Font getRolloverFont()
public Color getRolloverForeground()
public ImageReference getRolloverIcon()
public ImageReference getRolloverSelectedIcon()
public ImageReference getSelectedIcon()
public java.lang.String getToolTipText()
public int getVerticalAlignment()
public int getVerticalTextPosition()
public boolean isRolloverEnabled()
public boolean isSelected()
public void setRolloverBackground(Color newValue)
public void setRolloverEnabled(boolean newValue)
public void setRolloverFont(Font newValue)
public void setRolloverForeground(Color newValue)
public void setRolloverIcon(ImageReference newValue)
public void setRolloverSelectedIcon(ImageReference newValue)
public void setSelected(boolean newValue)
public void setSelectedIcon(ImageReference newValue)
public void setToolTipText(java.lang.String newValue)
public void setVerticalAlignment(int newValue)
public void setVerticalTextPosition(int newValue)
public void applyContext()
applyContext
in interface Precreation
public boolean isSuckerfishRendering()
public void setSuckerfishRendering(boolean suckerfishRendering)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |