|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
edu.neu.ccs.gui.DisplayPanel
edu.neu.ccs.gui.DisplayCollection
A dynamic linear collection of
objects,
displayed using either a horizontal or vertical layout.Displayable
The functionality of this container assumes use of a
BoxLayout set through the
method
and effects are undefined if the user changes the layout
through other means.setOrientation
ArrayPanel,
Serialized Form| Nested Class Summary |
| Nested classes inherited from class javax.swing.JPanel |
JPanel.AccessibleJPanel |
| Nested classes inherited from class javax.swing.JComponent |
JComponent.AccessibleJComponent |
| Nested classes inherited from class java.awt.Container |
Container.AccessibleAWTContainer |
| Nested classes inherited from class java.awt.Component |
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary | |
static int |
DEFAULT_ORIENTATION
The default orientation for a display collection. |
protected int |
direction
The orientation of this display collection. |
protected DisplayPanel |
inner
Panel containing the actual collection of components. |
| Fields inherited from class edu.neu.ccs.gui.DisplayPanel |
background, codec, CODEC |
| Fields inherited from class javax.swing.JPanel |
|
| 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.Container |
|
| 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, VALUE |
| 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 | |
DisplayCollection()
Constructs an empty collection with the default orientation. |
|
DisplayCollection(Displayable[] obj)
Constructs a collection containing the given array of objects with the default orientation. |
|
DisplayCollection(Displayable[] obj,
int orientation)
Constructs a collection containing the given array of objects with the given orientation. |
|
DisplayCollection(int orientation)
Constructs an empty collection with the provided layout orientation. |
|
| Method Summary | |
Component |
add(Component c)
Adds the specified component to the end of this container. |
Component |
add(Component c,
int index)
Adds the specified component to this container at the given position. |
void |
add(Component c,
Object constraints)
Adds the specified component to the end of this container. |
void |
add(Component c,
Object constraints,
int index)
Adds the specified component at the given position. |
Component |
add(String name,
Component c)
Adds the specified component to this container. |
DisplayPanel |
getCollectionPanel()
Returns the panel containing the collection. |
String |
getDefaultViewState()
Returns the default view states for objects in the collection as an encoded String. |
Component |
getItem(int index)
Returns the component at the specified index in the collection. |
Component[] |
getItemArray()
Returns an array containing all of the components held in the collection. |
int |
getItemCount()
Returns the number of objects in the collection. |
int |
getOrientation()
Returns the orientation value for the collection. |
String |
getViewState()
Returns the view states for objects in the collection as an encoded String. |
void |
remove(Component c)
Removes the given component from this container. |
void |
remove(int index)
Removes the component at the given index from this container. |
void |
removeAll()
Removes all the components from this container. |
void |
reset()
Recursively resets each of the objects in the collection. |
void |
setBackground(Color background)
Sets the background color for the entire panel to the provided color. |
void |
setDefaultViewState(String data)
Sets the default view states for objects in the collection to the data encoded in the given String. |
void |
setOrientation(int orientation)
Sets the orientation for the collection to the given value. |
void |
setViewState(String data)
Sets the view states for Displayable objects in the collection
to the data encoded in the given String. |
| 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 |
| Field Detail |
public static final int DEFAULT_ORIENTATION
protected int direction
protected DisplayPanel inner
| Constructor Detail |
public DisplayCollection()
DisplayCollection(int),
DisplayCollection(Displayable[]),
DisplayCollection(Displayable[], int)public DisplayCollection(int orientation)
orientation - the desired layout orientationDisplayCollection(),
DisplayCollection(Displayable[]),
DisplayCollection(Displayable[], int)public DisplayCollection(Displayable[] obj)
obj - an array of Displayable objectsDisplayCollection(),
DisplayCollection(int),
DisplayCollection(Displayable[], int)
public DisplayCollection(Displayable[] obj,
int orientation)
obj - an array of Displayable objectsorientation - the orientation for this collectionDisplayCollection(),
DisplayCollection(Displayable[]),
DisplayCollection(int)| Method Detail |
public void setViewState(String data)
Displayable objects in the collection
to the data encoded in the given String.
Each object in the collection has its view state
set from the encoded String data
in the manner described in the API documentation for the
DisplayPanel class.
setViewState in interface DisplayablesetViewState in class DisplayPaneldata - the encoded String datagetViewState(),
Displayablepublic String getViewState()
String.
The view state for the collection is encoded
in the manner described in the API documentation for the
DisplayPanel class.
getViewState in interface DisplayablegetViewState in class DisplayPanelsetViewState(String),
Displayablepublic void setDefaultViewState(String data)
String.
Each object in the collection has its default view state
set from the encoded String data
in the manner described in the API documentation for the
DisplayPanel class.
setDefaultViewState in interface DisplayablesetDefaultViewState in class DisplayPaneldata - the desired default String datareset(),
Displayablepublic String getDefaultViewState()
String.
The default view state for the collection is encoded
in the manner described in the API documentation for the
DisplayPanel class.
getDefaultViewState in interface DisplayablegetDefaultViewState in class DisplayPanelsetDefaultViewState(String),
reset()public void reset()
reset in interface Displayablereset in class DisplayPanelsetDefaultViewState(String),
Displayablepublic Component add(Component c)
add in class DisplayPanelc - the component to be added
add(Component, int),
add(Component, Object),
add(Component, Object, int),
add(String, Component),
remove(Component),
remove(int),
removeAll()
public Component add(Component c,
int index)
add in class DisplayPanelc - the component to be addedindex - the position at which to insert the component,
or -1 to insert the component at the end.
add(Component),
add(Component, Object),
add(Component, Object, int),
add(String, Component),
remove(Component),
remove(int),
removeAll()
public void add(Component c,
Object constraints)
add in class DisplayPanelc - the component to be addedconstraints - an object expressing layout constraints
for this componentadd(Component),
add(Component, int),
add(Component, Object, int),
add(String, Component),
remove(Component),
remove(int),
removeAll()
public void add(Component c,
Object constraints,
int index)
add in class DisplayPanelc - the component to be addedconstraints - an object expressing layout constraints
for this componentindex - the position at which to insert the component,
or -1 to insert the component at the end.add(Component),
add(Component, int),
add(Component, Object),
add(String, Component),
remove(Component),
remove(int),
removeAll()
public Component add(String name,
Component c)
add(Component, Object),
in place of this method.
add in class DisplayPanelname - the name of the component to be addedc - the component to be added
add(Component),
add(Component, int),
add(Component, Object),
add(Component, Object, int),
remove(Component),
remove(int),
removeAll()public void remove(Component c)
remove in class DisplayPanelc - the component to be removedadd(Component),
add(Component, int),
add(Component, Object),
add(Component, Object, int),
add(String, Component),
remove(int),
removeAll()public void remove(int index)
remove in class DisplayPanelindex - the index of the component to be removedadd(Component),
add(Component, int),
add(Component, Object),
add(Component, Object, int),
add(String, Component),
remove(Component),
removeAll()public void removeAll()
removeAll in class DisplayPaneladd(Component),
add(Component, int),
add(Component, Object),
add(Component, Object, int),
add(String, Component),
remove(Component),
remove(int)public Component getItem(int index)
getComponent method,
as its behavior is undefined for this container.
index - the index of the desired componentpublic Component[] getItemArray()
getComponents method,
as its behavior is undefined for this container.
public int getItemCount()
getComponentCount method,
as its behavior is undefined for this container.
public void setOrientation(int orientation)
BoxLayout set through this method,
and effects are undefined if the user changes the layout
through other means.
orientation - the desired layout orientation valuegetOrientation(),
SwingConstants.VERTICAL,
SwingConstants.HORIZONTAL,
JPTConstants.DEFAULTpublic int getOrientation()
setOrientation(int),
SwingConstants.VERTICAL,
SwingConstants.HORIZONTALpublic DisplayPanel getCollectionPanel()
BoxLayout set through the
setOrientation
method, and effects are undefined
if the user changes the layout through other means.
public void setBackground(Color background)
background - the desired background color
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||