com.sun.lwuit.layouts
Class FlowLayout

java.lang.Object
  extended by com.sun.lwuit.layouts.Layout
      extended by com.sun.lwuit.layouts.FlowLayout

public class FlowLayout
extends Layout

Flows elements in a row so they can spill over when reaching line end


Constructor Summary
FlowLayout()
          Creates a new instance of FlowLayout with left alignment
FlowLayout(int orientation)
          Creates a new instance of FlowLayout with the given orientation one of LEFT, RIGHT or CENTER
 
Method Summary
 boolean equals(java.lang.Object o)
           
 int getAlign()
          Alignment of the flow layout, defaults to LEFT
 Dimension getPreferredSize(Container parent)
          Returns the container preferred size
 int getValign()
          Indicates vertical alignment within the flow layout
 boolean isFillRows()
          Indicates whether the layout manager should try to fill up the available space in the row
 boolean isValignByRow()
          Returns whether vertical alignment is done internally or externally
 void layoutContainer(Container parent)
          Layout the given parent container children
 void setAlign(int orientation)
          Alignment of the flow layout, defaults to LEFT
 void setFillRows(boolean fillRows)
          Indicates whether the layout manager should try to fill up the available space in the row
 void setValign(int valign)
          Indicates vertical alignment within the flow layout
 void setValignByRow(boolean internal)
          When set to true vertical alignment will be performed by row (components within the container will be aligned vertically to each other in the same row) When set to false (which is default) vertical alignment relates to the alignment of this container in regards to external components
 java.lang.String toString()
           
 
Methods inherited from class com.sun.lwuit.layouts.Layout
addLayoutComponent, getComponentConstraint, hashCode, isOverlapSupported, removeLayoutComponent
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FlowLayout

public FlowLayout()
Creates a new instance of FlowLayout with left alignment


FlowLayout

public FlowLayout(int orientation)
Creates a new instance of FlowLayout with the given orientation one of LEFT, RIGHT or CENTER

Parameters:
orientation - the orientation value
Method Detail

layoutContainer

public void layoutContainer(Container parent)
Description copied from class: Layout
Layout the given parent container children

Specified by:
layoutContainer in class Layout
Parameters:
parent - the given parent container

getPreferredSize

public Dimension getPreferredSize(Container parent)
Description copied from class: Layout
Returns the container preferred size

Specified by:
getPreferredSize in class Layout
Parameters:
parent - the parent container
Returns:
the container preferred size

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

isFillRows

public boolean isFillRows()
Indicates whether the layout manager should try to fill up the available space in the row

Returns:
the fillRows

setFillRows

public void setFillRows(boolean fillRows)
Indicates whether the layout manager should try to fill up the available space in the row

Parameters:
fillRows - the fillRows to set

getValign

public int getValign()
Indicates vertical alignment within the flow layout

Returns:
Component.TOP/BOTTOM/CENTER

setValign

public void setValign(int valign)
Indicates vertical alignment within the flow layout

Parameters:
valign - one of Component.TOP/BOTTOM/CENTER

setValignByRow

public void setValignByRow(boolean internal)
When set to true vertical alignment will be performed by row (components within the container will be aligned vertically to each other in the same row) When set to false (which is default) vertical alignment relates to the alignment of this container in regards to external components

Parameters:
internal - true for internal, false otherwise

isValignByRow

public boolean isValignByRow()
Returns whether vertical alignment is done internally or externally

Returns:
whether vertical alignment is done internally or externally

getAlign

public int getAlign()
Alignment of the flow layout, defaults to LEFT

Returns:
the orientation

setAlign

public void setAlign(int orientation)
Alignment of the flow layout, defaults to LEFT

Parameters:
orientation - the orientation to set

equals

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