@JavaBean public class JXMultiSplitPane extends javax.swing.JPanel
All properties in this class are bound: when a properties value is changed, all PropertyChangeListeners are fired.
Modifier and Type | Class and Description |
---|---|
protected class |
JXMultiSplitPane.AccessibleMultiSplitPane |
static class |
JXMultiSplitPane.DividerPainter
Draws a single Divider.
|
javax.swing.JPanel.AccessibleJPanel
javax.swing.JComponent.AccessibleJComponent
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Constructor and Description |
---|
JXMultiSplitPane()
Creates a MultiSplitPane with it's LayoutManager set to to an empty
MultiSplitLayout.
|
JXMultiSplitPane(MultiSplitLayout layout)
Creates a MultiSplitPane.
|
Modifier and Type | Method and Description |
---|---|
MultiSplitLayout.Divider |
activeDivider()
Returns the Divider that's currently being moved, typically because the
user is dragging it, or null.
|
javax.accessibility.AccessibleContext |
getAccessibleContext() |
org.jdesktop.swingx.painter.Painter |
getBackgroundPainter()
Returns the current background painter.
|
JXMultiSplitPane.DividerPainter |
getDividerPainter()
The DividerPainter that's used to paint Dividers on this MultiSplitPane.
|
int |
getDividerSize()
A convenience method that returns the MultiSplitLayout dividerSize
property.
|
protected java.awt.Dimension |
getMaxNodeSize(MultiSplitLayout msl,
MultiSplitLayout.Node n)
Set the maximum node size.
|
protected java.awt.Dimension |
getMinNodeSize(MultiSplitLayout msl,
MultiSplitLayout.Node n)
Set the minimum node size.
|
MultiSplitLayout |
getMultiSplitLayout()
A convenience method that returns the layout manager cast to
MutliSplitLayout.
|
boolean |
isContinuousLayout()
Returns true if dragging a divider only updates the layout when the drag
gesture ends (typically, when the mouse button is released).
|
boolean |
isPaintBorderInsets()
Determines whether this component paints its background paint underneath
the border.
|
protected void |
paintChildren(java.awt.Graphics g)
Uses the DividerPainter (if any) to paint each Divider that overlaps the
clip Rectangle.
|
protected void |
paintComponent(java.awt.Graphics g)
Calls the UI delegate's paint method, if the UI delegate is
non-
null . |
void |
setBackgroundPainter(org.jdesktop.swingx.painter.Painter p)
Specifies a Painter to use to paint the background of this JXPanel.
|
void |
setContinuousLayout(boolean continuousLayout)
Sets the value of the
continuousLayout property. |
void |
setDividerPainter(JXMultiSplitPane.DividerPainter dividerPainter)
Sets the DividerPainter that's used to paint Dividers on this
MultiSplitPane.
|
void |
setDividerSize(int dividerSize)
A convenience method that sets the MultiSplitLayout dividerSize property.
|
void |
setModel(MultiSplitLayout.Node model)
A convenience method that sets the MultiSplitLayout model.
|
void |
setPaintBorderInsets(boolean paintBorderInsets) |
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
public JXMultiSplitPane()
public JXMultiSplitPane(MultiSplitLayout layout)
layout
- the new split pane's layoutpublic final MultiSplitLayout getMultiSplitLayout()
Container.getLayout()
,
setModel(org.jdesktop.swingx.MultiSplitLayout.Node)
public final void setModel(MultiSplitLayout.Node model)
getMultiSplitLayout.setModel(model)
model
- the root of the MultiSplitLayout modelgetMultiSplitLayout()
,
MultiSplitLayout.setModel(org.jdesktop.swingx.MultiSplitLayout.Node)
public final void setDividerSize(int dividerSize)
getMultiSplitLayout().setDividerSize(newDividerSize)
.dividerSize
- the value of the dividerSize propertygetMultiSplitLayout()
,
MultiSplitLayout.setDividerSize(int)
public final int getDividerSize()
getMultiSplitLayout().getDividerSize()
.public void setContinuousLayout(boolean continuousLayout)
continuousLayout
property. If true,
then the layout is revalidated continuously while a divider is being
moved. The default value of this property is true.continuousLayout
- value of the continuousLayout propertyisContinuousLayout()
public boolean isContinuousLayout()
continuousLayout
propertysetContinuousLayout(boolean)
public MultiSplitLayout.Divider activeDivider()
public JXMultiSplitPane.DividerPainter getDividerPainter()
setDividerPainter(org.jdesktop.swingx.JXMultiSplitPane.DividerPainter)
public void setDividerPainter(JXMultiSplitPane.DividerPainter dividerPainter)
dividerPainter
- the value of the dividerPainter property, can be
nullpaintChildren(java.awt.Graphics)
,
activeDivider()
protected void paintComponent(java.awt.Graphics g)
null
. We pass the delegate a copy of the
Graphics
object to protect the rest of the paint code from
irrevocable changes (for example, Graphics.translate
).
If you override this in a subclass you should not make permanent changes
to the passed in Graphics
. For example, you should not alter
the clip Rectangle
or modify the transform. If you need to
do these operations you may find it easier to create a new
Graphics
from the passed in Graphics
and
manipulate it. Further, if you do not invoker super's implementation you
must honor the opaque property, that is if this component is opaque, you
must completely fill in the background in a non-opaque color. If you do
not honor the opaque property you will likely see visual artifacts.
The passed in Graphics
object might have a transform other
than the identify transform installed on it. In this case, you might get
unexpected results if you cumulatively apply another transform.
paintComponent
in class javax.swing.JComponent
g
- the Graphics
object to protectJComponent.paint(Graphics)
,
ComponentUI
public void setBackgroundPainter(org.jdesktop.swingx.painter.Painter p)
p
is not null, then setOpaque(false) will be called as a
side effect. A component should not be opaque if painters are being used,
because Painters may paint transparent pixels or not paint certain
pixels, such as around the border insets.p
- the new background painter; may be null
public org.jdesktop.swingx.painter.Painter getBackgroundPainter()
setBackgroundPainter(Painter)
,
isPaintBorderInsets()
public boolean isPaintBorderInsets()
true
to paint under the border; false
otherwisepublic void setPaintBorderInsets(boolean paintBorderInsets)
protected void paintChildren(java.awt.Graphics g)
super.paintChildren()
so that Dividers can be rendered "on
top of" the children.
paintChildren
in class javax.swing.JComponent
protected java.awt.Dimension getMaxNodeSize(MultiSplitLayout msl, MultiSplitLayout.Node n)
class MyMultiSplitPane extends JXMultiSplitPane
{
protected Dimension getMaxNodeSize( MultiSplitLayout msl, Node n )
{
if (( n instanceof Leaf ) && ((Leaf)n).getName().equals( "top" ))
return msl.maximumNodeSize( n );
return null;
}
}
msl
- the MultiSplitLayout used by this panen
- the node being resizedprotected java.awt.Dimension getMinNodeSize(MultiSplitLayout msl, MultiSplitLayout.Node n)
msl
- the MultiSplitLayout used by this panen
- the node being resizedpublic javax.accessibility.AccessibleContext getAccessibleContext()
getAccessibleContext
in interface javax.accessibility.Accessible
getAccessibleContext
in class javax.swing.JPanel