The Mozilla
Organization
Our Mission
Who We Are
Getting Involved
Community
Editorials
What's New
Newsbot
Development
Roadmap
Module Owners
Blue Sky
Projects
Status
Tools
Products
Source Code
Binaries
Documentation
License Terms
Bug Reports
Quality
Search
Feedback


Class grendel.widgets.Splitter

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



Copyright © 1998 The Mozilla Organization.