com.sun.lwuit.layouts
Class Layout

java.lang.Object
  extended by com.sun.lwuit.layouts.Layout
Direct Known Subclasses:
BorderLayout, BoxLayout, CoordinateLayout, FlowLayout, GridLayout, GroupLayout, LayeredLayout, TableLayout

public abstract class Layout
extends java.lang.Object

Abstract class that can be used to arrange components in a container using a predefined algorithm. This class may be implemented externally and is similar in spirit to the AWT/Swing layout managers.


Constructor Summary
Layout()
           
 
Method Summary
 void addLayoutComponent(java.lang.Object value, Component comp, Container c)
          Some layouts can optionally track the addition of elements with meta-data that allows the user to "hint" on object positioning.
 boolean equals(java.lang.Object o)
           
 java.lang.Object getComponentConstraint(Component comp)
          Returns the optional component constraint
abstract  Dimension getPreferredSize(Container parent)
          Returns the container preferred size
 int hashCode()
           
 boolean isOverlapSupported()
          This method returns true if the Layout allows Components to Overlap.
abstract  void layoutContainer(Container parent)
          Layout the given parent container children
 void removeLayoutComponent(Component comp)
          Removes the component from the layout this operation is only useful if the layout maintains references to components within it
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Layout

public Layout()
Method Detail

layoutContainer

public abstract void layoutContainer(Container parent)
Layout the given parent container children

Parameters:
parent - the given parent container

getPreferredSize

public abstract Dimension getPreferredSize(Container parent)
Returns the container preferred size

Parameters:
parent - the parent container
Returns:
the container preferred size

addLayoutComponent

public void addLayoutComponent(java.lang.Object value,
                               Component comp,
                               Container c)
Some layouts can optionally track the addition of elements with meta-data that allows the user to "hint" on object positioning.

Parameters:
value - optional meta data information, like alignment orientation
comp - the added component to the layout
c - the parent container

removeLayoutComponent

public void removeLayoutComponent(Component comp)
Removes the component from the layout this operation is only useful if the layout maintains references to components within it

Parameters:
comp - the removed component from layout

getComponentConstraint

public java.lang.Object getComponentConstraint(Component comp)
Returns the optional component constraint

Parameters:
comp - the component whose constraint should be returned
Returns:
the optional component constraint

isOverlapSupported

public boolean isOverlapSupported()
This method returns true if the Layout allows Components to Overlap.

Returns:
true if Components may intersect in this layout

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object