|
Copyright © 2005 Scientific Applications. All Rights Reserved. | ||||||||
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
com.sciapp.tree.GroupingPanel
public class GroupingPanel
This component represents a panel through which users can dynamically control the structure of a TreeTable. GroupingPanel uses a box layout in order to layout a number of comboboxes, whose items are populated with the columns of a table. By selecting a column in the combo box, the appropriate DefaultTreeTableComparator is created and added to the associated TreeTableModel. A combobox will be added to the panel, provided that the maximum number of boxes has not been reached and that "no group" is selected.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JPanel |
---|
JPanel.AccessibleJPanel |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary | |
---|---|
protected ArrayList |
comboBoxes
the array list of comboboxes. |
static String |
DEFAULT_NO_GROUP
the default string to show if no grouping is desired. |
protected int |
max_groups
the current maximum number of groups defined. |
protected TreeTableModel |
model
the TreeTableModel that is used to add/remove DefaultTreeTableComparators. |
protected String |
noGroupString
the current string to show if no grouping is desired. |
static int |
UNLIMITED_GROUPS
the integer that corresponds to an unlimited number of tree groups. |
static int |
X_AXIS
the integer that corresponds to an X_AXIS box layout. |
static int |
Y_AXIS
the integer that corresponds to a Y_AXIS box layout. |
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 java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
GroupingPanel(TreeTableModel model)
Constructs a GroupingPanel object with model as the associated TreeTableModel,
horizontal layout and " |
|
GroupingPanel(TreeTableModel model,
int axis)
Constructs a GroupingPanel object with model as the associated TreeTableModel,
axis as the axis of the box layout and " |
|
GroupingPanel(TreeTableModel model,
int axis,
String noGroupString)
Constructs a GroupingPanel object with model as the associated TreeTableModel,
axis as the axis of the box layout and noGroupString as the string to show if
no grouping is desired. |
Method Summary | |
---|---|
protected JComboBox |
createFieldGroup()
Creates and returns a JComboBox that will be used to define the grouping comparators. |
int |
getMaximumGroups()
Returns the maximum number of combo boxes that are visible. |
TreeTableModel |
getModel()
Returns the TreeTableModel that is used to add/remove DefaultTreeTableComparators. |
Component |
getSeparator()
Returns a component to be used as a separator between adjacent comboboxes. |
protected void |
select(JComboBox box)
Performs the necessary actions when the selection of a combobox changes. |
void |
setMaximumGroups(int max_groups)
Sets the maximum number of combo boxes that are visible. |
void |
setModel(TreeTableModel newModel)
Sets the TreeTableModel that is used to add/remove DefaultTreeTableComparators. |
void |
syncWithModel()
Synchronizes the grouping panel with the TreeTableModel. |
void |
updateUI()
Resets the UI property with a value from the current look and feel. |
Methods inherited from class javax.swing.JPanel |
---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected TreeTableModel model
protected String noGroupString
protected ArrayList comboBoxes
protected int max_groups
public static final int X_AXIS
public static final int Y_AXIS
public static final int UNLIMITED_GROUPS
public static final String DEFAULT_NO_GROUP
Constructor Detail |
---|
public GroupingPanel(TreeTableModel model)
model
as the associated TreeTableModel,
horizontal layout and "
public GroupingPanel(TreeTableModel model, int axis)
model
as the associated TreeTableModel,
axis
as the axis of the box layout and "
public GroupingPanel(TreeTableModel model, int axis, String noGroupString)
model
as the associated TreeTableModel,
axis
as the axis of the box layout and noGroupString
as the string to show if
no grouping is desired.
Method Detail |
---|
protected JComboBox createFieldGroup()
public int getMaximumGroups()
public TreeTableModel getModel()
public Component getSeparator()
protected void select(JComboBox box)
box
- the combobox that was selectedpublic void setMaximumGroups(int max_groups)
max_groups
- the maximum number of groupspublic void setModel(TreeTableModel newModel)
newModel
- the new treetable model to assign.public void syncWithModel()
public void updateUI()
updateUI
in class JPanel
JComponent.updateUI()
|
Copyright © 2005 Scientific Applications. All Rights Reserved. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |