|
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.BoxSection echopoint.ExpandableSection
The ExpandableSection
class provides a Component
that can be expanded and collapsed. The contents of the ExpandableSection
can be another Component.
In general a Component that can contain other Components, such as a Panel or Grid, is used as the contents.
The ExpandableSection
has two modes. The default is server side mode, where
each click to expand the section is sent to the server and the model is updated directly.
This allows server side code to run on each expand event.
The second mode is client side mode, whereby the content within the ExpandableSection
is only hidden or shown on the client. No events are sent back to the server. However
should another component cause the client screen to be updated, then the state of
the ExpandableSection
is saved.
Server side gives you the best functionality whilst client side mode provides the performance on the client.
The class uses the ExpandableModel
interface to keep
track of whether the section is expanded or not. The model used is
contained with the title TitleBar
. Therefore it is illegal to
have a null title TitleBar.
Please note that the ExpandableModel
interface of the footer TitleBar
is never used.
Nested Class Summary | |
static class |
ExpandableSection.NestedStyleInfo
Nested public static StyleInfo class. |
Field Summary | |
static java.lang.String |
MODEL_CHANGED_PROPERTY
|
static java.lang.String |
SERVER_SIDE_CHANGED_PROPERTY
|
static java.lang.String |
STYLE_EXPANDED
A style constant for the Expanded property. |
Fields inherited from class echopoint.BoxSection |
DEFAULT_INSETS, FOOTER_CHANGED_PROPERTY, INSETS_CHANGED_PROPERTY, RULER_COLOR_CHANGED_PROPERTY, RULER_WIDTH_CHANGED_PROPERTY, STYLE_INSETS, STYLE_RULER_COLOR, STYLE_RULER_DRAWN, STYLE_RULER_WIDTH, TITLE_CHANGED_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, 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 | |
ExpandableSection()
Constructs a ExpandableSection that is not expanded. |
|
ExpandableSection(boolean isExpanded)
Constructs a ExpandableSection with the isExpanded parameter
controlling whether the ExpandableSection is expanded. |
|
ExpandableSection(boolean isExpanded,
nextapp.echo.Component content)
Constructs a ExpandableSection with the isExpanded parameter
controlling whether the ExpandableSection is expanded. |
|
ExpandableSection(boolean isExpanded,
java.lang.String title)
Constructs a ExpandableSection with the isExpanded parameter
controlling whether the ExpandableSection is expanded and with the given title. |
|
ExpandableSection(boolean isExpanded,
java.lang.String title,
nextapp.echo.Component content)
Constructs a ExpandableSection with the isExpanded parameter
controlling whether the ExpandableSection is expanded, with the given title
The contents of the section is the component. |
|
ExpandableSection(boolean isExpanded,
TitleBar titleBar,
nextapp.echo.Component content)
Constructs a ExpandableSection with the isExpanded parameter
controlling whether the ExpandableSection is expanded, with the given
title.
|
|
ExpandableSection(java.lang.String title,
nextapp.echo.Component content)
Constructs a ExpandableSection with that is no expanded
with the given title and content |
Method Summary | |
void |
addActionListener(nextapp.echo.event.ActionListener l)
Adds an ActionListener to the expandable section. |
void |
addChangeListener(nextapp.echo.event.ChangeListener l)
Adds a ChangeListener to the section |
void |
applyStyle(nextapp.echo.Style style)
This will apply the borderColor, borderWidth and borderStyle properties first followed by the left, top, right and bottom borer properties. |
ExpandableModel |
getModel()
|
boolean |
isExpanded()
|
boolean |
isServerSideSection()
Retursn true if the ExpandableSection is a server side section or false if its a client side expansion. |
void |
removeActionListener(nextapp.echo.event.ActionListener l)
Removes an ActionListener to the expandable section. |
void |
removeChangeListener(nextapp.echo.event.ChangeListener l)
Removes a ChangeListener from this component. |
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 |
setExpanded(boolean isExpanded)
Sets whether the ExpandableSection is expanded or not
This methods causes the underlying ExpandableModel to
change. |
void |
setFooter(java.lang.String newFooter)
Sets the footer used by the ExpandableSection .
|
void |
setModel(ExpandableModel newModel)
Sets the ExpandableModel model used by the ExpandableSection .
|
void |
setServerSideSection(boolean newServerSideSection)
Sets whether the ExpandableSection will expand on the server side or the client side. |
void |
setTitle(java.lang.String newTitle)
Sets the title used by the ExpandableSection .
|
void |
setTitle(TitleBar newTitle)
Sets the title used by the ExpandableSection .
|
Methods inherited from class echopoint.EchoPointComponent |
getMouseCursor, getMouseCursorURI, getToolTipPopUp, getToolTipText, set, set, set, set, set, set, set, set, set, setEnabledAllChildren, setMouseCursor, setMouseCursorURI, setToolTipText, validate |
Methods inherited from class nextapp.echo.Component |
add, add, 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, remove, remove, removeAll, removeHierarchyListener, removePropertyChangeListener, setBackground, setEnabled, 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 MODEL_CHANGED_PROPERTY
public static final java.lang.String SERVER_SIDE_CHANGED_PROPERTY
public static final java.lang.String STYLE_EXPANDED
Boolean.
Constructor Detail |
public ExpandableSection()
ExpandableSection
that is not expanded.
public ExpandableSection(boolean isExpanded)
ExpandableSection
with the isExpanded parameter
controlling whether the ExpandableSection is expanded.
public ExpandableSection(boolean isExpanded, nextapp.echo.Component content)
ExpandableSection
with the isExpanded parameter
controlling whether the ExpandableSection is expanded.
public ExpandableSection(boolean isExpanded, java.lang.String title)
ExpandableSection
with the isExpanded parameter
controlling whether the ExpandableSection is expanded and with the given title.
public ExpandableSection(boolean isExpanded, java.lang.String title, nextapp.echo.Component content)
ExpandableSection
with the isExpanded parameter
controlling whether the ExpandableSection is expanded, with the given title
The contents of the section is the component.
public ExpandableSection(java.lang.String title, nextapp.echo.Component content)
ExpandableSection
with that is no expanded
with the given title and content
public ExpandableSection(boolean isExpanded, TitleBar titleBar, nextapp.echo.Component content)
ExpandableSection
with the isExpanded parameter
controlling whether the ExpandableSection is expanded, with the given
title.
The contents of the section is the component.
Method Detail |
public void addActionListener(nextapp.echo.event.ActionListener l)
ActionListener
to the expandable section.
l
- The ActionListener
to be added.public void addChangeListener(nextapp.echo.event.ChangeListener l)
ChangeListener
to the section
l
- The ChangeListener
to be added.public void applyStyle(nextapp.echo.Style style)
Borderable
applyStyle
in interface Borderable
applyStyle
in class BoxSection
Component.applyStyle(nextapp.echo.Style)
public ExpandableModel getModel()
ExpandableModel
model of the ExpandableSection
.public boolean isExpanded()
ExpandableSection
is expanded or notpublic boolean isServerSideSection()
public void removeActionListener(nextapp.echo.event.ActionListener l)
ActionListener
to the expandable section.
l
- The ActionListener
to be removed.public void removeChangeListener(nextapp.echo.event.ChangeListener l)
l
- the ChangeListener to removepublic void setExpanded(boolean isExpanded)
ExpandableSection
is expanded or not
ExpandableModel
to
change.
public void setFooter(java.lang.String newFooter)
ExpandableSection
.
setFooter
in class BoxSection
public void setModel(ExpandableModel newModel)
ExpandableModel
model used by the ExpandableSection
.
public void setServerSideSection(boolean newServerSideSection)
newServerSideSection
- booleanpublic void setTitle(java.lang.String newTitle)
ExpandableSection
.
setTitle
in class BoxSection
public void setTitle(TitleBar newTitle)
ExpandableSection
.
setTitle
in class BoxSection
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
set
in class BoxSection
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 |