|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
org.jdesktop.swingx.JXMultiSplitPane
public class JXMultiSplitPane
All properties in this class are bound: when a properties value is changed, all PropertyChangeListeners are fired.
Nested Class Summary | |
---|---|
protected class |
JXMultiSplitPane.AccessibleMultiSplitPane
|
static class |
JXMultiSplitPane.DividerPainter
Draws a single Divider. |
Nested classes/interfaces inherited from class javax.swing.JPanel |
---|
JPanel.AccessibleJPanel |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary |
---|
Fields inherited from class javax.swing.JComponent |
---|
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 | |
---|---|
JXMultiSplitPane()
Creates a MultiSplitPane with it's LayoutManager set to to an empty MultiSplitLayout. |
|
JXMultiSplitPane(MultiSplitLayout layout)
Creates a MultiSplitPane. |
Method Summary | |
---|---|
MultiSplitLayout.Divider |
activeDivider()
Returns the Divider that's currently being moved, typically because the user is dragging it, or null. |
AccessibleContext |
getAccessibleContext()
Gets the AccessibleContext associated with this JPanel. |
Painter |
getBackgroundPainter()
|
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 Dimension |
getMaxNodeSize(MultiSplitLayout msl,
MultiSplitLayout.Node n)
Set the maximum node size. |
protected 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). |
protected void |
paintChildren(Graphics g)
Uses the DividerPainter (if any) to paint each Divider that overlaps the clip Rectangle. |
protected void |
paintComponent(Graphics g)
Calls the UI delegate's paint method, if the UI delegate is non- null . |
void |
setBackgroundPainter(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. |
Methods inherited from class javax.swing.JPanel |
---|
getUI, getUIClassID, paramString, setUI, updateUI |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public JXMultiSplitPane()
public JXMultiSplitPane(MultiSplitLayout layout)
layout
- the new split pane's layoutMethod Detail |
---|
public 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()
.
getMultiSplitLayout()
,
MultiSplitLayout.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(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 JComponent
g
- the Graphics
object to protectJComponent.paint(Graphics)
,
ComponentUI
public void setBackgroundPainter(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.
public Painter getBackgroundPainter()
protected void paintChildren(Graphics g)
super.paintChildren()
so that Dividers can be
rendered "on top of" the children.
Paints this component's children.
If shouldUseBuffer
is true,
no component ancestor has a buffer and
the component children can use a buffer if they have one.
Otherwise, one ancestor has a buffer currently in use and children
should not use a buffer to paint.
paintChildren
in class JComponent
g
- the Graphics
context in which to paintJComponent.paint(java.awt.Graphics)
,
Container.paint(java.awt.Graphics)
protected 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 resized
protected Dimension getMinNodeSize(MultiSplitLayout msl, MultiSplitLayout.Node n)
msl
- the MultiSplitLayout used by this panen
- the node being resized
public AccessibleContext getAccessibleContext()
javax.swing.JPanel
getAccessibleContext
in interface Accessible
getAccessibleContext
in class JPanel
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |