com.limegroup.gnutella.gui.tables
Class ColumnSelectionMenu

java.lang.Object
  extended bycom.limegroup.gnutella.gui.tables.ColumnSelectionMenu

public class ColumnSelectionMenu
extends java.lang.Object

Simple popup menu that shows the current columns, and allows the user to display/hide them


Nested Class Summary
protected  class ColumnSelectionMenu.ReverterListener
          Simple class that calls 'revertToDefault' on the ColumnPreferenceHandler of the LimeJTable
protected  class ColumnSelectionMenu.SelectionActionListener
          Simple ActionListener class that will display/hide a column based on the columnId property of the source.
protected static class ColumnSelectionMenu.SettingListener
          Simple class that deals with setting/unsetting settings.
 
Field Summary
protected  javax.swing.JPopupMenu _menu
          The actual popup menu.
protected static java.lang.String COLUMN_ID
          The string used to signify the columnId property
static java.lang.String MORE_OPTIONS
          More Options menu item.
static java.lang.String ROWSTRIPE
          Setting for row stripes.
protected static java.lang.String SETTING
          The string used to signify the Setting property
protected static java.awt.event.ActionListener SETTING_LISTENER
          The SettingListener to use for all menus.
static java.lang.String SORTING
          Setting for real-time sorting.
static java.lang.String TOOLTIPS
          Setting for displaying tooltips.
 
Constructor Summary
ColumnSelectionMenu(LimeJTable table)
          Constructs the popupmenu & actionlistener associated with the table & model.
 
Method Summary
static javax.swing.JMenuItem addSetting(javax.swing.JMenu parent, java.lang.String name, com.limegroup.gnutella.settings.BooleanSetting setting)
          Creates & adds a checkbox-setting with a listener.
 javax.swing.JPopupMenu getComponent()
          Returns the popup menu
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COLUMN_ID

protected static final java.lang.String COLUMN_ID
The string used to signify the columnId property

See Also:
Constant Field Values

SETTING

protected static final java.lang.String SETTING
The string used to signify the Setting property

See Also:
Constant Field Values

SETTING_LISTENER

protected static final java.awt.event.ActionListener SETTING_LISTENER
The SettingListener to use for all menus.


MORE_OPTIONS

public static final java.lang.String MORE_OPTIONS
More Options menu item.


ROWSTRIPE

public static final java.lang.String ROWSTRIPE
Setting for row stripes.


SORTING

public static final java.lang.String SORTING
Setting for real-time sorting.


TOOLTIPS

public static final java.lang.String TOOLTIPS
Setting for displaying tooltips.


_menu

protected final javax.swing.JPopupMenu _menu
The actual popup menu.

Constructor Detail

ColumnSelectionMenu

public ColumnSelectionMenu(LimeJTable table)
Constructs the popupmenu & actionlistener associated with the table & model.

Method Detail

addSetting

public static javax.swing.JMenuItem addSetting(javax.swing.JMenu parent,
                                               java.lang.String name,
                                               com.limegroup.gnutella.settings.BooleanSetting setting)
Creates & adds a checkbox-setting with a listener.


getComponent

public javax.swing.JPopupMenu getComponent()
Returns the popup menu