|
Copyright © 2011 Citra Technologies. 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.citra.treetable.NodeGroupingPanel
public class NodeGroupingPanel
This component represents a panel through which users can dynamically control the structure of a TreeTable. NodeGroupingPanel 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 TreeNodeComparator is created and added to the associated ComparableTreeTableModel. 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 ComparableTreeTableModel |
model
the TreeTableModel that is used to add/remove TreeNodeComparator. |
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 | |
---|---|
NodeGroupingPanel(ComparableTreeTableModel model)
Constructs a NodeGroupingPanel object with model as the associated TreeTableModel,
horizontal layout and " |
|
NodeGroupingPanel(ComparableTreeTableModel model,
int axis)
Constructs a NodeGroupingPanel object with model as the associated TreeTableModel,
axis as the axis of the box layout and " |
|
NodeGroupingPanel(ComparableTreeTableModel model,
int axis,
String noGroupString)
Constructs a NodeGroupingPanel 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. |
ComparableTreeTableModel |
getModel()
Returns the TreeTableModel that is used to add/remove TreeNodeComparators. |
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(ComparableTreeTableModel newModel)
Sets the TreeTableModel that is used to add/remove TreeNodeComparators. |
void |
syncWithModel()
Synchronizes the grouping panel with the ComparableTreeTableModel. |
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 ComparableTreeTableModel 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 NodeGroupingPanel(ComparableTreeTableModel model)
model
as the associated TreeTableModel,
horizontal layout and "
public NodeGroupingPanel(ComparableTreeTableModel model, int axis)
model
as the associated TreeTableModel,
axis
as the axis of the box layout and "
public NodeGroupingPanel(ComparableTreeTableModel 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 ComparableTreeTableModel 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(ComparableTreeTableModel newModel)
newModel
- the new treetable model to assign.public void syncWithModel()
public void updateUI()
updateUI
in class JPanel
JComponent.updateUI()
|
Copyright © 2011 Citra Technologies. All Rights Reserved. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |