|
qflib 0.98.1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Container | +--javax.swing.JComponent | +--javax.swing.JPanel | +--de.qfs.lib.gui.MultiPane
A MultiPane is very similar to a JSplitPane and is implemented with the help of one.
It adds to the JSplitPane API methods for displaying either one of the two components or both.
MultiPane implements the Configurable
interface. The
state saved is the location of the JSplitPane divider and the showing state,
i.e. whether one or both of the components are shown.
Inner classes inherited from class javax.swing.JPanel |
javax.swing.JPanel.AccessibleJPanel |
Inner classes inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent |
Inner classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
Inner classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent |
Field Summary | |
static int |
HORIZONTAL
Use a horizontal layout for the components. |
static int |
SHOW_BOTH
Indicates that both components are shown. |
static int |
SHOW_FIRST
Indicates that only the first component is shown. |
static int |
SHOW_SECOND
Indicates that only the second component is shown. |
static int |
VERTICAL
Use a vertical layout for the components. |
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 | |
MultiPane(int orientation)
Create a new MultiPane with a name of "MultiPane", a default divider location of 0.5 and a default showing state of SHOW_BOTH . |
|
MultiPane(int orientation,
java.awt.Component firstComponent,
java.awt.Component secondComponent)
Create a new MultiPane with a name of "MultiPane", a default divider location of 0.5 and a default showing state of SHOW_BOTH . |
|
MultiPane(java.lang.String name,
int orientation,
java.awt.Component firstComponent,
java.awt.Component secondComponent,
double divider,
int show)
Create a new MultiPane. |
|
MultiPane(java.lang.String name,
int orientation,
java.awt.Component firstComponent,
java.awt.Component secondComponent,
int divider,
int show)
Create a new MultiPane. |
Method Summary | |
void |
addMultiPaneListener(MultiPaneListener listener)
Add a MultiPaneListener to the MultiPane. |
java.lang.String |
getConfigurableName()
Get the receiver's configuration name. |
java.util.Properties |
getConfigurableState()
Get the Configurable's state. |
java.awt.Component |
getFirstComponent()
Get the top/left component of the MultiPane. |
java.awt.Component |
getSecondComponent()
Get the bottom/right component of the MultiPane. |
int |
getShowing()
Get the current showing state of the MultiPane, one of SHOW_BOTH , SHOW_FIRST or SHOW_SECOND . |
javax.swing.JSplitPane |
getSplitPane()
Get the JSplitPane used internally by the MultiPane. |
void |
propertyChange(java.beans.PropertyChangeEvent e)
Notify the MultiPane of a change in the JSplitPane. |
void |
registrationChanged(Configuration config,
java.lang.String name,
boolean registered,
boolean valuesKept)
This callback is used to notify the Configurable whenever it is registered with or unregistered from the Configuration, so it can decide whether to notify the Configuration when its state changes. |
void |
removeMultiPaneListener(MultiPaneListener listener)
Remove a MultiPaneListener from the MultiPane. |
void |
setConfigurableName(java.lang.String name)
Set the receiver's configuration name. |
void |
setConfigurableState(java.util.Properties state)
Set the Configurable's state. |
void |
setFirstComponent(java.awt.Component first)
Set the top/left component of the MultiPane. |
void |
setSecondComponent(java.awt.Component second)
Set the bottom/right component of the MultiPane. |
void |
setShowing(int show)
Set which component(s) to display. |
Methods inherited from class javax.swing.JPanel |
getAccessibleContext, getUIClassID, paramString, updateUI |
Methods inherited from class javax.swing.JComponent |
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusCycleRoot, isFocusTraversable, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processFocusEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setLayout, validate, validateTree |
Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, imageUpdate, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int SHOW_BOTH
public static final int SHOW_FIRST
public static final int SHOW_SECOND
public static final int HORIZONTAL
public static final int VERTICAL
Constructor Detail |
public MultiPane(int orientation)
SHOW_BOTH
.orientation
- The orientation, one of
HORIZONTAL
or
VERTICAL
java.lang.IllegalArgumentException
- If the show parameter is not one of
SHOW_BOTH
, SHOW_FIRST
or
SHOW_SECOND
.public MultiPane(int orientation, java.awt.Component firstComponent, java.awt.Component secondComponent)
SHOW_BOTH
.orientation
- The orientation, one of
HORIZONTAL
or
VERTICAL
firstComponent
- The top/left Component.secondComponent
- The bottom/right Component.java.lang.IllegalArgumentException
- If the show parameter is not one of
SHOW_BOTH
, SHOW_FIRST
or
SHOW_SECOND
.public MultiPane(java.lang.String name, int orientation, java.awt.Component firstComponent, java.awt.Component secondComponent, int divider, int show) throws java.lang.IllegalArgumentException
name
- The Configurable
name.orientation
- The orientation, one of
HORIZONTAL
or
VERTICAL
firstComponent
- The top/left Component.secondComponent
- The bottom/right Component.divider
- The default divider location.show
- The initial display as in setShowing
.java.lang.IllegalArgumentException
- If the show parameter is not one of
SHOW_BOTH
, SHOW_FIRST
or
SHOW_SECOND
.public MultiPane(java.lang.String name, int orientation, java.awt.Component firstComponent, java.awt.Component secondComponent, double divider, int show) throws java.lang.IllegalArgumentException
name
- The Configurable
name.orientation
- The orientation, one of
HORIZONTAL
or
VERTICAL
firstComponent
- The top/left Component.secondComponent
- The bottom/right Component.divider
- The default divider location.show
- The initial display as in setShowing
.java.lang.IllegalArgumentException
- If the show parameter is not one of
SHOW_BOTH
, SHOW_FIRST
or
SHOW_SECOND
.Method Detail |
public javax.swing.JSplitPane getSplitPane()
public final int getShowing()
SHOW_BOTH
, SHOW_FIRST
or SHOW_SECOND
.public void setShowing(int show) throws java.lang.IllegalArgumentException
SHOW_BOTH
, SHOW_FIRST
or SHOW_SECOND
.show
- The new showing state.java.lang.IllegalArgumentException
- If the show parameter is not one of
SHOW_BOTH
, SHOW_FIRST
or
SHOW_SECOND
.public final java.awt.Component getFirstComponent()
public final void setFirstComponent(java.awt.Component first)
first
- The new top/left component.public final java.awt.Component getSecondComponent()
public final void setSecondComponent(java.awt.Component second)
second
- The new bottom/right component.public void addMultiPaneListener(MultiPaneListener listener)
listener
- The MultiPaneListener to add.public void removeMultiPaneListener(MultiPaneListener listener)
listener
- The MultiPaneListener to remove.public final java.lang.String getConfigurableName()
getConfigurableName
in interface Configurable
public final void setConfigurableName(java.lang.String name)
setConfigurableName
in interface Configurable
name
- The name to set.public java.util.Properties getConfigurableState()
getConfigurableState
in interface Configurable
public void setConfigurableState(java.util.Properties state)
setConfigurableState
in interface Configurable
de.qfs.lib.config.Configurable
state
- The state to set.public void registrationChanged(Configuration config, java.lang.String name, boolean registered, boolean valuesKept)
registrationChanged
in interface Configurable
config
- The affected Configuration.name
- The registration name of the Configurable which may
be different from the Configurable's name.registered
- True if the Configurable was just registered,
false if it was unregistered.valuesKept
- Whether the Configurable's values were kept, if
it was just unregistered.public void propertyChange(java.beans.PropertyChangeEvent e)
propertyChange
in interface java.beans.PropertyChangeListener
e
- The event containing the details of the change.
|
qflib 0.98.1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |