|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--java.awt.Component
|
+--java.awt.Container
|
+--javax.swing.JComponent
|
+--javax.swing.JPanel
|
+--edu.neu.ccs.gui.DisplayPanel
|
+--edu.neu.ccs.gui.ComponentWrapper
|
+--edu.neu.ccs.gui.DisplayWrapper
Wrapper for a single Displayable object
that uses a CenterLayout
and faithfully respects
minimum, maximum, and preferred sizes.
ComponentWrapper,
TypedViewWrapper,
GeneralViewWrapper,
Serialized Form| Field Summary |
| Fields inherited from class edu.neu.ccs.gui.ComponentWrapper |
wrapper |
| Fields inherited from class edu.neu.ccs.gui.DisplayPanel |
background, codec, CODEC |
| Fields inherited from class javax.swing.JComponent |
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
| Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface edu.neu.ccs.gui.Displayable |
DEFAULT_VIEW_STATE, VIEW_STATE |
| Fields inherited from interface edu.neu.ccs.util.JPTConstants |
ABOVE, ALIGNMENT, BELOW, BOTTOM_LEFT, BOTTOM_RIGHT, DEFAULT, FONT, INPUT_PROPERTIES, MANDATORY, OPTIONAL, ORIENTATION, TOP_LEFT, TOP_RIGHT |
| Fields inherited from interface javax.swing.SwingConstants |
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST |
| Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
DisplayWrapper(Displayable display)
Constructs a wrapper for the given Displayable object. |
|
| Method Summary | |
String |
getDefaultViewState()
Returns the default view states for objects in the collection as an encoded String. |
String |
getViewState()
Returns the view states for objects in the container as an encoded String. |
Displayable |
getWrappedDisplay()
Returns the wrapped display. |
void |
reset()
Recursively resets any Displayable objects
held in the panel. |
void |
setDefaultViewState(String data)
Sets the default view states for objects in the collection to the data encoded in the given String. |
void |
setViewState(String data)
Sets the view states for Displayable objects in the container
to the data encoded in the given String. |
void |
setWrappedComponent(Component component)
Sets the wrapped display to the given component. |
void |
setWrappedDisplay(Displayable display)
Sets the wrapped display to the given Displayable object. |
| Methods inherited from class edu.neu.ccs.gui.ComponentWrapper |
getAlignment, getMaximumSize, getMinimumSize, getPreferredSize, getWrappedComponent, setAbsoluteSize, setAbsoluteSize, setAlignment, setEnabled, setMaximumSize, setMaximumSize, setMinimumSize, setMinimumSize, setPreferredSize, setPreferredSize |
| Methods inherited from class edu.neu.ccs.gui.DisplayPanel |
add, add, add, add, add, addObject, addObject, addObject, addObject, dataMalformed, endAlert, frame, frame, frame, frame, frame, frame, generalDialog, generalDialog, generalDialog, generalDialog, getCodec, makeComponent, OKCancelDialog, OKCancelDialog, OKDialog, OKDialog, refreshComponent, remove, remove, removeAll, setCodec, startAlert, uniformizeHeight, uniformizeSize, uniformizeWidth, YesNoCancelDialog, YesNoCancelDialog |
| Methods inherited from class javax.swing.JPanel |
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public DisplayWrapper(Displayable display)
Displayable object.
display - the displayable object to be wrapped| Method Detail |
public void setViewState(String data)
DisplayPanelSets the view states for
Displayable objects in the container
to the data encoded in the given String.
If the given encoded data is null,
the view states are not changed.
null,
the data is decoded into its component data elements
and the view state for each of as many
Displayable objects as possible
is set to the state encapsulated in the corresponding
data element.
If the encoded data contains more data elements
than there are Displayable objects in the panel,
the extraneous data elements are ignored.
If the encoded data contains fewer data elements
than there are Displayable objects in the panel,
the view states are not changed for objects that
do not have a corresponding data element.
setViewState in interface DisplayablesetViewState in class DisplayPaneldata - the encoded String dataDisplayPanel.getViewState(),
Displayablepublic String getViewState()
DisplayPanelString.
The encoded data is constructed by collecting an array
containing the view states for each of the
Displayable objects in the container
and encoding it using the CODEC whose identifier
is stored by this panel.
getViewState in interface DisplayablegetViewState in class DisplayPanelDisplayPanel.setViewState(String),
Displayablepublic void setDefaultViewState(String data)
DisplayPanelString.
If the given encoded data is null,
the default view states are not changed.
null,
the data is decoded into its component data elements
and the default view state for each of as many
Displayable objects as possible
is set to the state encapsulated in the corresponding
data element.
If the encoded data contains more data elements
than there are Displayable objects in the panel,
the extraneous data elements are ignored.
If the encoded data contains fewer data elements
than there are Displayable objects in the panel,
the default view states are not changed for objects that
do not have a corresponding data element.
setDefaultViewState in interface DisplayablesetDefaultViewState in class DisplayPaneldata - the desired default String dataDisplayPanel.reset(),
Displayablepublic String getDefaultViewState()
DisplayPanelString.
The encoded data is constructed by collecting an array
containing the default view states for each of the
Displayable objects in the container
and encoding it using the CODEC whose identifier
is stored by this panel.
getDefaultViewState in interface DisplayablegetDefaultViewState in class DisplayPanelDisplayPanel.setDefaultViewState(String),
DisplayPanel.reset()public void reset()
DisplayPanelDisplayable objects
held in the panel.
reset in interface Displayablereset in class DisplayPanelDisplayPanel.setDefaultViewState(String),
Displayablepublic void setWrappedComponent(Component component)
setWrappedDisplay should be called
in order to set the wrapped Displayable object.
If the given component is not Displayable,
the currently wrapped display is not changed.
setWrappedComponent in class ComponentWrappercomponent - the component to be wrapped
NullPointerException - if the given object is nullsetWrappedDisplay(Displayable)public void setWrappedDisplay(Displayable display)
Displayable object.
display - the object to be wrapped
NullPointerException - if the given object is nullgetWrappedDisplay()public Displayable getWrappedDisplay()
setWrappedDisplay(Displayable)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||