|
EchoPoint 1.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object nextapp.echo.Component nextapp.echo.Container echopoint.EchoPointComponent echopoint.ExpandableMenu
The ExpandableMenu
class provides a Component
that shows a hierarchial menu of Component objects. These can
then be expanded and collapsed, according to the parent-child hierarchy
of the components.
The component works in "client side mode" only. It does not raise events on the server when Component are expanded or collapse.
However if you use Components such as Menu's,MenuItem's or Buttons you can add the usual ActionListeners in the usual manner, and hence be notified when they raise events.
Nested Class Summary | |
static class |
ExpandableMenu.NestedStyleInfo
Nested public static StyleInfo class. |
Field Summary | |
static nextapp.echo.ImageReference |
defaultBlankLeafImage
a blank image for an leaf menu |
static nextapp.echo.ImageReference |
defaultBulletLeafImage
a bullet image for an leaf menu |
static nextapp.echo.ImageReference |
defaultCollapsedImage
the default image for an collapsed menu |
static nextapp.echo.ImageReference |
defaultExpandedImage
the default image for an expanded menu |
static java.lang.String |
IMAGES_CHANGED_PROPERTY
image support component |
static java.lang.String |
ROW_HEIGHT_CHANGED_PROPERTY
Tree Row Height |
static java.lang.String |
STYLE_ROW_HEIGHT
A style constant for the Row Height property. |
Fields inherited from class echopoint.EchoPointComponent |
STYLE_TOOL_TIP_TEXT, TOOL_TIP_TEXT_CHANGED_PROPERTY, toolTipPopUp |
Fields inherited from class nextapp.echo.Component |
BACKGROUND_CHANGED_PROPERTY, CHILDREN_CHANGED_PROPERTY, ENABLED_CHANGED_PROPERTY, FONT_CHANGED_PROPERTY, FOREGROUND_CHANGED_PROPERTY, IDENTIFIER_CHANGED_PROPERTY, listenerList, LOCALE_CHANGED_PROPERTY, MODEL_CHANGED_PROPERTY, STYLE_BACKGROUND, STYLE_FONT, STYLE_FOREGROUND, UPDATE_PROPERTY, VISIBLE_CHANGED_PROPERTY |
Fields inherited from interface echopoint.positionable.MouseCursorable |
borderStyleSymbolics, CURSOR_AUTO, CURSOR_CROSSHAIR, CURSOR_CUSTOM_URI, CURSOR_DEFAULT, CURSOR_E_RESIZE, CURSOR_HELP, CURSOR_MOVE, CURSOR_N_RESIZE, CURSOR_NE_RESIZE, CURSOR_NW_RESIZE, CURSOR_POINTER, CURSOR_S_RESIZE, CURSOR_SE_RESIZE, CURSOR_SW_RESIZE, CURSOR_TEXT, CURSOR_W_RESIZE, CURSOR_WAIT, STYLE_MOUSE_CURSOR, STYLE_MOUSE_CURSOR_URI |
Constructor Summary | |
ExpandableMenu()
ExpandableMenu constructor. |
Method Summary | |
void |
add(nextapp.echo.Component c)
Adds a Component derived object to the ExpandableMenu .
|
void |
add(nextapp.echo.Component c,
int index)
Adds a Component derived object to the ExpandableMenu .
|
void |
applyStyle(nextapp.echo.Style style)
Applies the provided style to the component. |
void |
collapseAll()
Collapses all nodes in the ExpandableMenu |
void |
expandAll()
Expand all nodes in the ExpandableMenu |
TreeCellRenderer |
getCellRender()
Returns the cell renderer of the underlying tree component. |
nextapp.echo.ImageReference |
getCollapsedImage()
Returns the icon to use for collapsed Menus (with children) |
nextapp.echo.ImageReference |
getExpandedImage()
Returns the icon to use for expanded Menus (with children) |
nextapp.echo.ImageReference |
getLeafImage()
Returns the icon to use for leaf Menus (ie they have no children) |
int |
getRowHeight()
Returns the row height to be used for each row within the ExpandableMenu. |
void |
hierarchyChanged(nextapp.echo.event.HierarchyEvent e)
Notifies the listener of a heirarchy change. |
void |
remove(nextapp.echo.Component c)
Removes a Component from
the ExpandableMenu . |
void |
remove(int index)
Removes a Menu from the ExpandableMenu at
the specified index. |
void |
removeAll()
Removes all Menu under management. |
java.lang.Object |
set(java.lang.reflect.Field field,
java.lang.Object newValue)
Called to save the old value of a field, set in a new value and return the old value of a field. |
void |
setCellRenderer(TreeCellRenderer cellRenderer)
Sets the cell renderer of the underlying tree |
void |
setCollapsedImage(nextapp.echo.ImageReference newCollapsedImage)
Sets the icon to use for collapsed Menus (with children) |
void |
setEnabled(boolean newValue)
|
void |
setExpandedImage(nextapp.echo.ImageReference newExpandedImage)
Sets the icon to use for expanded Menus (with children) |
void |
setLeafImage(nextapp.echo.ImageReference newLeafImage)
Sets the icon to use for leaf Menus (ie they have no children) |
void |
setRowHeight(int newRowHeight)
Sets the row height to be used for each row within the ExpandableMenu. |
void |
validate()
Called just before the ExpandableMenu is to be rendered, to give it a chance to updates its internal state. |
Methods inherited from class echopoint.EchoPointComponent |
getMouseCursor, getMouseCursorURI, getToolTipPopUp, getToolTipText, set, set, set, set, set, set, set, set, set, setEnabledAllChildren, setMouseCursor, setMouseCursorURI, setToolTipText |
Methods inherited from class nextapp.echo.Component |
addHierarchyListener, addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getComponent, getComponentCount, getComponents, getEchoInstance, getFont, getForeground, getIdentifier, getLocale, getParent, indexOf, init, isAncestorOf, isEnabled, isRegistered, isShowing, isVisible, removeHierarchyListener, removePropertyChangeListener, setBackground, setFont, setForeground, setIdentifier, setLocale, setVisible, update |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String ROW_HEIGHT_CHANGED_PROPERTY
public static final java.lang.String STYLE_ROW_HEIGHT
int
public static nextapp.echo.ImageReference defaultExpandedImage
public static nextapp.echo.ImageReference defaultCollapsedImage
public static nextapp.echo.ImageReference defaultBlankLeafImage
public static nextapp.echo.ImageReference defaultBulletLeafImage
public static final java.lang.String IMAGES_CHANGED_PROPERTY
Constructor Detail |
public ExpandableMenu()
Method Detail |
public void add(nextapp.echo.Component c)
Component
derived object to the ExpandableMenu
.
This may or may not have child Component
objects
Remember to add ActionListeners to the child components to ensure they can raise events.
public void add(nextapp.echo.Component c, int index)
Component
derived object to the ExpandableMenu
.
at the specified index.
This may or may not have child Component
objects.
Remember to add ActionListeners to the child components to ensure they can raise events.
public void applyStyle(nextapp.echo.Style style)
nextapp.echo.Component
style names can be used as well.
applyStyle
in interface MouseCursorable
applyStyle
in class EchoPointComponent
Component.applyStyle(nextapp.echo.Style)
public nextapp.echo.ImageReference getCollapsedImage()
public nextapp.echo.ImageReference getExpandedImage()
public nextapp.echo.ImageReference getLeafImage()
public int getRowHeight()
public void hierarchyChanged(nextapp.echo.event.HierarchyEvent e)
hierarchyChanged
in interface nextapp.echo.event.HierarchyListener
e
- An HierarchyEvent
describing the change.public void remove(int index)
Menu
from the ExpandableMenu
at
the specified index.
public void remove(nextapp.echo.Component c)
Component
from
the ExpandableMenu
.
public void removeAll()
public void setCellRenderer(TreeCellRenderer cellRenderer)
cellRenderer
- - the new cell rendererpublic TreeCellRenderer getCellRender()
public void setCollapsedImage(nextapp.echo.ImageReference newCollapsedImage)
newCollapsedImage
- nextapp.echo.ImageReferencepublic void setExpandedImage(nextapp.echo.ImageReference newExpandedImage)
newExpandedImage
- nextapp.echo.ImageReferencepublic void setLeafImage(nextapp.echo.ImageReference newLeafImage)
newLeafImage
- nextapp.echo.ImageReferencepublic void setRowHeight(int newRowHeight)
newRowHeight
- intpublic void setEnabled(boolean newValue)
Component.setEnabled(boolean)
public void expandAll()
ExpandableMenu
public void collapseAll()
ExpandableMenu
public void validate()
validate
in class EchoPointComponent
Component.validate()
public java.lang.Object set(java.lang.reflect.Field field, java.lang.Object newValue) throws java.lang.Exception
ReflectionSetter
public Object set(Field f, Object newValue) throws Exception { Object oldValue = f.get(this); f.set(this,newValue); return oldValue; }
set
in interface ReflectionSetter
field
- - the field to be setnewValue
- - the new value to be set
java.lang.Exception
ReflectionSetter.set(Field, Object)
|
EchoPoint 1.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |