Logo Search packages:      
Sourcecode: mathpiper version File versions  Download package

org::mathpiper::ui::gui::MultiSplitLayout Class Reference

Inherits java::awt::LayoutManager.

List of all members.

Detailed Description

The MultiSplitLayout layout manager recursively arranges its components in row and column groups called "Splits". Elements of the layout are separated by gaps called "Dividers". The overall layout is defined with a simple tree model whose nodes are instances of MultiSplitLayout.Split, MultiSplitLayout.Divider, and MultiSplitLayout.Leaf. Named Leaf nodes represent the space allocated to a component that was added with a constraint that matches the Leaf's name. Extra space is distributed among row/column siblings according to their 0.0 to 1.0 weight. If no weights are specified then the last sibling always gets all of the extra space, or space reduction.

Although MultiSplitLayout can be used with any Container, it's the default layout manager for MultiSplitPane. MultiSplitPane supports interactively dragging the Dividers, accessibility, and other features associated with split panes.

All properties in this class are bound: when a properties value is changed, all PropertyChangeListeners are fired.

Hans Muller
See also:

Definition at line 73 of file MultiSplitLayout.java.

Public Member Functions

void addLayoutComponent (String name, Component child)
void addPropertyChangeListener (PropertyChangeListener listener)
Divider dividerAt (int x, int y)
List< DividerdividersThatOverlap (Rectangle r)
int getDividerSize ()
boolean getFloatingDividers ()
Node getModel ()
PropertyChangeListener[] getPropertyChangeListeners ()
void layoutContainer (Container parent)
Dimension minimumLayoutSize (Container parent)
 MultiSplitLayout (Node model)
 MultiSplitLayout ()
Dimension preferredLayoutSize (Container parent)
void removeLayoutComponent (Component child)
void removePropertyChangeListener (PropertyChangeListener listener)
void setDividerSize (int dividerSize)
void setFloatingDividers (boolean floatingDividers)
void setModel (Node model)

Static Public Member Functions

static Node parseModel (String s)
static void printModel (Node root)

Private Member Functions

Rectangle boundsWithXandWidth (Rectangle bounds, double x, double width)
Rectangle boundsWithYandHeight (Rectangle bounds, double y, double height)
void checkLayout (Node root)
Component childForNode (Node node)
Divider dividerAt (Node root, int x, int y)
List< DividerdividersThatOverlap (Node root, Rectangle r)
void firePCS (String propertyName, Object oldValue, Object newValue)
void layout1 (Node root, Rectangle bounds)
void layout2 (Node root, Rectangle bounds)
void layoutGrow (Split split, Rectangle bounds)
void layoutShrink (Split split, Rectangle bounds)
void minimizeSplitBounds (Split split, Rectangle bounds)
Dimension minimumComponentSize (Node node)
Dimension minimumNodeSize (Node root)
boolean nodeOverlapsRectangle (Node node, Rectangle r2)
Dimension preferredComponentSize (Node node)
Dimension preferredNodeSize (Node root)
Dimension sizeWithInsets (Container parent, Dimension size)
void throwInvalidLayout (String msg, Node node)

Static Private Member Functions

static void addSplitChild (Split parent, Node child)
static void parseAttribute (String name, StreamTokenizer st, Node node) throws Exception
static void parseLeaf (StreamTokenizer st, Split parent) throws Exception
static Node parseModel (Reader r)
static void parseSplit (StreamTokenizer st, Split parent) throws Exception
static void printModel (String indent, Node root)
static void throwParseException (StreamTokenizer st, String msg) throws Exception

Private Attributes

final Map< String, Component > childMap = new HashMap<String, Component>()
int dividerSize
boolean floatingDividers = true
Node model
final PropertyChangeSupport pcs = new PropertyChangeSupport(this)


class  Divider
class  InvalidLayoutException
class  Leaf
class  Node
class  Split

The documentation for this class was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index