ca.sqlpower.wabit.swingui
Enum WabitSwingSessionContextImpl.SourceListStyle

java.lang.Object
  extended by java.lang.Enum<WabitSwingSessionContextImpl.SourceListStyle>
      extended by ca.sqlpower.wabit.swingui.WabitSwingSessionContextImpl.SourceListStyle
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<WabitSwingSessionContextImpl.SourceListStyle>
Enclosing class:
WabitSwingSessionContextImpl

public static enum WabitSwingSessionContextImpl.SourceListStyle
extends java.lang.Enum<WabitSwingSessionContextImpl.SourceListStyle>

All the ways the source list can be present in the GUI.


Enum Constant Summary
DOCKED
          Source list appears in a split pane to the right of the editor.
FLOATING
          Source list appears in its own dialog.
HIDDEN
          Source list is not visible at all.
 
Method Summary
 java.lang.String getLocalizedName()
          Returns the localized text associated with this source list style.
 javax.swing.JMenuItem makeMenuItem(WabitSwingSessionContextImpl context, javax.swing.ButtonGroup sourceListStyleGroup)
          Creates a JMenuItem for this source list style.
protected  void safelySetRightComponent(javax.swing.JSplitPane sp, javax.swing.JToolBar toolBar, javax.swing.JComponent c)
          Changes the right-hand component of the given scroll panel to c without moving the divider location.
static WabitSwingSessionContextImpl.SourceListStyle valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static WabitSwingSessionContextImpl.SourceListStyle[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

DOCKED

public static final WabitSwingSessionContextImpl.SourceListStyle DOCKED
Source list appears in a split pane to the right of the editor.


FLOATING

public static final WabitSwingSessionContextImpl.SourceListStyle FLOATING
Source list appears in its own dialog.


HIDDEN

public static final WabitSwingSessionContextImpl.SourceListStyle HIDDEN
Source list is not visible at all.

Method Detail

values

public static WabitSwingSessionContextImpl.SourceListStyle[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (WabitSwingSessionContextImpl.SourceListStyle c : WabitSwingSessionContextImpl.SourceListStyle.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static WabitSwingSessionContextImpl.SourceListStyle valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

makeMenuItem

public javax.swing.JMenuItem makeMenuItem(WabitSwingSessionContextImpl context,
                                          javax.swing.ButtonGroup sourceListStyleGroup)
Creates a JMenuItem for this source list style. When the menu item is activated, it applies the appropriate style to the given context.

Parameters:
context - The session context the menu item belongs to (and operates upon).
sourceListStyleGroup - The button group to add the menu item to (for mutual exclusion).
Returns:

getLocalizedName

public java.lang.String getLocalizedName()
Returns the localized text associated with this source list style.


safelySetRightComponent

protected void safelySetRightComponent(@Nonnull
                                       javax.swing.JSplitPane sp,
                                       @Nullable
                                       javax.swing.JToolBar toolBar,
                                       @Nonnull
                                       javax.swing.JComponent c)
Changes the right-hand component of the given scroll panel to c without moving the divider location.

Parameters:
sp - The split pane whose right component to replace with c. Null not permitted.
toolBar - The toolbar that should appear at the top of the right-hand component. Null means not to show a toolbar.
c - The component to add to sp. Null not permitted.


Copyright © 2009. All Rights Reserved.