Copyright © 2011 Citra Technologies. All Rights Reserved.

com.citra.table
Class ColumnChooser

java.lang.Object
  extended by com.citra.table.ColumnChooser

public class ColumnChooser
extends Object

ColumnChooser is a class containing the dialog for managing the columns of a table.


Field Summary
protected  boolean allowEditing
          determines whether column names can be edited
protected  JButton cancelButton
          the button for rejecting changes in the column dialog
protected  JDialog dialog
          the column dialog
protected  JButton groupButton
          the button for grouping columns
protected  JButton hideButton
          the button for hiding columns
protected  JButton moveDownButton
          the button for moving down columns
protected  JButton moveUpButton
          the button for moving up columns
protected  JButton okButton
          the button for accepting changes in the column dialog
protected  JPanel panel
          the dialog's panel
protected  JLabel prefaceLabel
          the label describing the column dialog
protected  JButton resetButton
          the button for resetting changes in the column dialog
protected  JScrollPane scrollPane
          the table's scrollpane
protected  JCheckBox selectCheckBox
          the check box for selecting/deselecting all columns
protected  JButton showButton
          the button for showing columns
protected  boolean showGroup
          determines whether the group buttons will be shown
protected  boolean showMove
          determines whether the move buttons will be shown
protected  TreeTable table
          the table holding the columns
protected  JLabel tableLabel
          the label describing the table
protected  JButton unGroupButton
          the button for ungrouping columns
protected  JTextField widthField
          the textfield for setting the column width
protected  JLabel widthLabel
          the label describing the pixel width text field
 
Constructor Summary
ColumnChooser()
          Creates a ColumnChooser.
 
Method Summary
protected  JPanel createButtonPanel()
          Creates the panel that would be holding the buttons.
protected  JDialog createDialog(TableAssistant assistant)
          Creates the column dialog.
protected  JPanel createMainPanel()
          Creates the dialog's main panel.
protected  JPanel createPanel()
          Creates the dialog's panel.
 boolean getAllowEditing()
          Determines whether column names can be edited.
 JButton getCancelButton()
          Retrieves the button for rejecting changes in the column dialog.
 JDialog getDialog(TableAssistant assistant)
          Retrieves the column dialog.
 JButton getGroupButton()
          Retrieves the button for grouping columns.
 JButton getHideButton()
          Retrieves the button for hiding columns.
 JButton getMoveDownButton()
          Retrieves the button for moving down columns.
 JButton getMoveUpButton()
          Retrieves the button for moving up columns.
 JButton getOkButton()
          Retrieves the button for accepting changes in the column dialog.
 JPanel getPanel()
          Retrieves the dialog's panel.
 JLabel getPrefaceLabel()
          Retrieves the label describing the column dialog.
 JButton getResetButton()
          Retrieves the button for resetting changes in the column dialog.
 JScrollPane getScrollPane()
          Retrieves the table's scrollpane.
 JCheckBox getSelectCheckBox()
          Retrieves the check box for selecting/deselecting all columns.
 JButton getShowButton()
          Retrieves the button for showing columns.
 boolean getShowGroup()
          Determines whether the group buttons will be shown.
 boolean getShowMove()
          Determines whether the move buttons will be shown.
 TreeTable getTable()
          Retrieves the column's table.
 JLabel getTableLabel()
          Retrieves the label describing the table.
 JButton getUnGroupButton()
          Retrieves the button for ungrouping columns.
 JTextField getWidthField()
          Retrieves the textfield for setting the column width.
 JLabel getWidthLabel()
          Retrieves the label describing the pixel width text field.
protected  void initComponents()
          Initializes the column chooser by creating the UI components that are needed.
protected  void install()
          Installs the chooser by creating components, listeners and several key actions.
protected  void installActions()
          Installs key actions on the UI components.
protected  void installListeners()
          Installs listeners on the UI components.
 void setAllowEditing(boolean allowEditing)
          Determines whether column names can be edited.
 void setShowGroup(boolean showGroup)
          Determines whether the group buttons will be shown.
 void setShowMove(boolean showMove)
          Determines whether the move buttons will be shown.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

panel

protected JPanel panel
the dialog's panel


dialog

protected JDialog dialog
the column dialog


scrollPane

protected JScrollPane scrollPane
the table's scrollpane


table

protected TreeTable table
the table holding the columns


moveUpButton

protected JButton moveUpButton
the button for moving up columns


moveDownButton

protected JButton moveDownButton
the button for moving down columns


showButton

protected JButton showButton
the button for showing columns


hideButton

protected JButton hideButton
the button for hiding columns


widthField

protected JTextField widthField
the textfield for setting the column width


groupButton

protected JButton groupButton
the button for grouping columns


unGroupButton

protected JButton unGroupButton
the button for ungrouping columns


okButton

protected JButton okButton
the button for accepting changes in the column dialog


cancelButton

protected JButton cancelButton
the button for rejecting changes in the column dialog


resetButton

protected JButton resetButton
the button for resetting changes in the column dialog


prefaceLabel

protected JLabel prefaceLabel
the label describing the column dialog


tableLabel

protected JLabel tableLabel
the label describing the table


widthLabel

protected JLabel widthLabel
the label describing the pixel width text field


selectCheckBox

protected JCheckBox selectCheckBox
the check box for selecting/deselecting all columns


showGroup

protected boolean showGroup
determines whether the group buttons will be shown


showMove

protected boolean showMove
determines whether the move buttons will be shown


allowEditing

protected boolean allowEditing
determines whether column names can be edited

Constructor Detail

ColumnChooser

public ColumnChooser()
Creates a ColumnChooser.

Method Detail

createButtonPanel

protected JPanel createButtonPanel()
Creates the panel that would be holding the buttons.

Returns:
the button panel

createDialog

protected JDialog createDialog(TableAssistant assistant)
Creates the column dialog.

Parameters:
assistant - the table assistant with which a dialog is associated
Returns:
the column dialog

createMainPanel

protected JPanel createMainPanel()
Creates the dialog's main panel.

Returns:
the dialog's main panel

createPanel

protected JPanel createPanel()
Creates the dialog's panel.

Returns:
the dialog's panel

getAllowEditing

public boolean getAllowEditing()
Determines whether column names can be edited.

Returns:
true if column names can be edited, false otherwise

getCancelButton

public JButton getCancelButton()
Retrieves the button for rejecting changes in the column dialog.

Returns:
the button for rejecting changes in the column dialog

getDialog

public JDialog getDialog(TableAssistant assistant)
Retrieves the column dialog.

Parameters:
assistant - the table assistant with which a dialog is associated
Returns:
the column dialog

getGroupButton

public JButton getGroupButton()
Retrieves the button for grouping columns.

Returns:
the button for grouping columns

getHideButton

public JButton getHideButton()
Retrieves the button for hiding columns.

Returns:
the button for hiding columns

getMoveDownButton

public JButton getMoveDownButton()
Retrieves the button for moving down columns.

Returns:
the button for moving down columns

getMoveUpButton

public JButton getMoveUpButton()
Retrieves the button for moving up columns.

Returns:
the button for moving up columns

getOkButton

public JButton getOkButton()
Retrieves the button for accepting changes in the column dialog.

Returns:
the button for accepting changes in the column dialog

getPanel

public JPanel getPanel()
Retrieves the dialog's panel.

Returns:
the dialog's panel

getPrefaceLabel

public JLabel getPrefaceLabel()
Retrieves the label describing the column dialog.

Returns:
the label describing the column dialog

getResetButton

public JButton getResetButton()
Retrieves the button for resetting changes in the column dialog.

Returns:
the button for resetting changes in the column dialog

getScrollPane

public JScrollPane getScrollPane()
Retrieves the table's scrollpane.

Returns:
the table's scrollpane

getSelectCheckBox

public JCheckBox getSelectCheckBox()
Retrieves the check box for selecting/deselecting all columns.

Returns:
the check box for selecting/deselecting all columns

getShowButton

public JButton getShowButton()
Retrieves the button for showing columns.

Returns:
the button for showing columns

getShowGroup

public boolean getShowGroup()
Determines whether the group buttons will be shown.

Returns:
true if group buttons are shown, false otherwise

getShowMove

public boolean getShowMove()
Determines whether the move buttons will be shown.

Returns:
true if move buttons are shown, false otherwise

getTable

public TreeTable getTable()
Retrieves the column's table.

Returns:
the column's table

getTableLabel

public JLabel getTableLabel()
Retrieves the label describing the table.

Returns:
the label describing the table

getUnGroupButton

public JButton getUnGroupButton()
Retrieves the button for ungrouping columns.

Returns:
the button for ungrouping columns

getWidthField

public JTextField getWidthField()
Retrieves the textfield for setting the column width.

Returns:
the textfield for setting the column width

getWidthLabel

public JLabel getWidthLabel()
Retrieves the label describing the pixel width text field.

Returns:
the label describing the pixel width text field

initComponents

protected void initComponents()
Initializes the column chooser by creating the UI components that are needed.


install

protected void install()
Installs the chooser by creating components, listeners and several key actions.


installActions

protected void installActions()
Installs key actions on the UI components.


installListeners

protected void installListeners()
Installs listeners on the UI components.


setAllowEditing

public void setAllowEditing(boolean allowEditing)
Determines whether column names can be edited.

Parameters:
allowEditing - true if column names can be edited, false otherwise

setShowGroup

public void setShowGroup(boolean showGroup)
Determines whether the group buttons will be shown.

Parameters:
showGroup - true if group buttons are shown, false otherwise

setShowMove

public void setShowMove(boolean showMove)
Determines whether the move buttons will be shown.

Parameters:
showMove - true if move buttons are shown, false otherwise

Copyright © 2011 Citra Technologies. All Rights Reserved.