|
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.treetable.db.DatabaseGroupingPanel
public class DatabaseGroupingPanel
This component represents a panel through which users can dynamically control the structure of a 'database' TreeTable. DatabaseGroupingPanel uses a box layout in order to layout a number of comboboxes, whose items are populated with the columns of the database table. By selecting a column in the combo box, the appropriate 'grouping columns' integer list is created and assigned to the associated DefaultDatabaseTreeTableModel. 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 DefaultDatabaseTreeTableModel |
model
the DefaultDatabaseTreeTableModel that is used to define the list of database grouping columns. |
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 | |
---|---|
DatabaseGroupingPanel(DefaultDatabaseTreeTableModel model)
Constructs a DefaultDatabaseAggregator. |
|
DatabaseGroupingPanel(DefaultDatabaseTreeTableModel model,
int axis)
Constructs a DefaultDatabaseAggregator. |
|
DatabaseGroupingPanel(DefaultDatabaseTreeTableModel model,
int axis,
String noGroupString)
Constructs a DefaultDatabaseAggregator. |
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. |
DefaultDatabaseTreeTableModel |
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(DefaultDatabaseTreeTableModel newModel)
Sets the DefaultDatabaseTreeTableModel that is used to define the list of database grouping columns. |
void |
syncWithModel()
Synchronizes the grouping panel with the DefaultDatabaseTreeTableModel. |
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 DefaultDatabaseTreeTableModel 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 DatabaseGroupingPanel(DefaultDatabaseTreeTableModel model)
public DatabaseGroupingPanel(DefaultDatabaseTreeTableModel model, int axis)
public DatabaseGroupingPanel(DefaultDatabaseTreeTableModel model, int axis, String noGroupString)
Method Detail |
---|
protected JComboBox createFieldGroup()
public int getMaximumGroups()
public DefaultDatabaseTreeTableModel 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(DefaultDatabaseTreeTableModel newModel)
newModel
- the new default database 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 |