You are currently viewing a snapshot of www.mozilla.org taken on April 21, 2008. Most of this content is highly out of date (some pages haven't been updated since the project began in 1998) and exists for historical purposes only. If there are any pages on this archive site that you think should be added back to www.mozilla.org, please file a bug.



All Packages  This Package  Class Hierarchy  Class Search  Index

Class grendel.widgets.Splitter

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----com.sun.java.swing.JComponent
                           |
                           +----grendel.widgets.Splitter

This class is used to create a divided pane with moveable dividers (NYI) Components can be added with numeric weights that will determine how much of the pane they will occupy: add(aComponent, new Float(.5)) If no weight is given the default is 1.

(Soon to be) Moveable separators can be created by the createSeparator() method. The width of the separator is fixed in pixels.


public class  Splitter
     extends com.sun.java.swing.JComponent
{
          // Fields 8
     public static final int HORIZONTAL;
     public static final int VERTICAL;
     SplitterSeparatorListener fListener;
     int fMinSize;
     int fOrientation;
     int fTotalSeparators;
     float fTotalWeight;
     Hashtable fWeights;

          // Constructors 1
     public Splitter(int);

          // Methods 6
     public Component createSeparator(int);
     public Component createSeparator(int, boolean);
     public int getMinSize();
     public Float getWeight(Component);
     public void setMinSize(int);
     public void updateUI();

          // Inner Classes 2
     class SplitterLayout
     class SplitterSeparatorListener
}



Fields


fWeights

   Hashtable fWeights


fTotalWeight

   float fTotalWeight


fTotalSeparators

   int fTotalSeparators


fOrientation

   int fOrientation


fMinSize

   int fMinSize


fListener

   SplitterSeparatorListener fListener


VERTICAL

   public static final int VERTICAL

Value to pass for a splitter that stacks components vertically.


HORIZONTAL

   public static final int HORIZONTAL

Value to pass for a splitter that lays out components horizontally.



Constructors


Splitter

   public Splitter(int aOrientation) 

Contructs a splitter container with the given orientation.




Methods


updateUI

   public void updateUI() 
Overrides:
updateUI in class JComponent


createSeparator

   public Component createSeparator(int aSize) 

Creates a separator of a given pixel size.



createSeparator

   public Component createSeparator(int aSize, 
                                    boolean aFixed) 

Creates an separator of a given pixel size. If aFixed is true, the separator is not user movable.



getWeight

   public Float getWeight(Component aComponent) 

Returns the weight associated with a given component. This number can be used to save and restore layout preferences.



setMinSize

   public void setMinSize(int aMinSize) 

Sets the minimum size a component can be sized to. Should be greater than zero for best results.



getMinSize

   public int getMinSize() 

Returns the minimum size a component can be sized to.



All Packages  This Package  Class Hierarchy  Class Search  Index
Freshly brewed Java API Documentation automatically generated with polardoc Version 1.0.4