com.sibvisions.rad.ui.web.ext.gxt.layout
Class GVxFlowLayout

java.lang.Object
  extended by com.extjs.gxt.ui.client.event.BaseObservable
      extended by com.extjs.gxt.ui.client.widget.Layout
          extended by com.sibvisions.rad.ui.web.ext.gxt.layout.GVxLayout
              extended by com.sibvisions.rad.ui.web.ext.gxt.layout.GVxFlowLayout
All Implemented Interfaces:
Observable, IAlignmentConstants, IPreferredSizeLayout

public class GVxFlowLayout
extends GVxLayout
implements IAlignmentConstants

BorderLayout implementation as know in AWT.


Field Summary
static int HORIZONTAL
          Horizontal orientation.
static int VERTICAL
          Vertical orientation.
 
Fields inherited from class com.sibvisions.rad.ui.web.ext.gxt.layout.GVxLayout
BREAK_LAYOUTING, horizontalGap, margins, verticalGap
 
Fields inherited from class com.extjs.gxt.ui.client.widget.Layout
activeItem, componentStyleName, container, monitorResize, renderHidden, target, targetStyleName
 
Fields inherited from interface com.sibvisions.rad.ui.web.ext.gwt.IAlignmentConstants
ALIGN_BOTTOM, ALIGN_CENTER, ALIGN_LEFT, ALIGN_RIGHT, ALIGN_STRETCH, ALIGN_TOP
 
Constructor Summary
GVxFlowLayout()
          Constructs a new GVxFormLayout.
GVxFlowLayout(int pOrientation)
          Constructs a new GVxFormLayout.
 
Method Summary
 int getComponentAlignment()
          Gets the alignment between the components.
 int getHorizontalAlignment()
          Returns the alignment along the x axis.
 int getOrientation()
          Gets the orientation of this flow layout.
 Size getPreferredSize(Container<?> pContainer)
          Calculates the preferred size of the container.
 int getVerticalAlignment()
          Returns the alignment along the y axis.
protected  void onLayout(Container<?> pContainer, El pTarget)
          Layouts the given container.
 void setComponentAlignment(int pComponentAlignment)
          Sets the alignment between the components.
 void setHorizontalAlignment(int pHorizontalAlignment)
          Sets the horizontal alignment.
 void setOrientation(int pOrientation)
          Sets the orientation of this flow layout.
 void setVerticalAlignment(int pVerticalAlignment)
          Sets the vertical alignment.
 
Methods inherited from class com.sibvisions.rad.ui.web.ext.gxt.layout.GVxLayout
clearCache, configureTarget, getBorderMargins, getHorizontalGap, getMargins, getPreferredSize, getPreferredSizeIntern, getVerticalGap, setHorizontalGap, setMargins, setSize, setVerticalGap
 
Methods inherited from class com.extjs.gxt.ui.client.widget.Layout
applyMargins, applyPadding, callLayout, fly, fly, getExtraStyle, getLayoutData, getResizeDelay, getSideMargins, initTarget, isLayoutExecuted, isLayoutNeeded, isRenderHidden, isRunning, isValidParent, layout, layoutContainer, onAdd, onComponentHide, onComponentShow, onRemove, onResize, renderAll, renderComponent, setBounds, setContainer, setExtraStyle, setLayoutData, setLayoutNeeded, setLayoutOnChange, setPosition, setRenderHidden, setResizeDelay, setSize
 
Methods inherited from class com.extjs.gxt.ui.client.event.BaseObservable
addListener, callListener, fireEvent, fireEvent, getFiresEvents, getListeners, hasActiveEvent, hasListeners, hasListeners, removeAllListeners, removeListener, setFiresEvents
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HORIZONTAL

public static final int HORIZONTAL
Horizontal orientation.

See Also:
Constant Field Values

VERTICAL

public static final int VERTICAL
Vertical orientation.

See Also:
Constant Field Values
Constructor Detail

GVxFlowLayout

public GVxFlowLayout()
Constructs a new GVxFormLayout.


GVxFlowLayout

public GVxFlowLayout(int pOrientation)
Constructs a new GVxFormLayout.

Parameters:
pOrientation - the orientation.
Method Detail

getHorizontalAlignment

public int getHorizontalAlignment()
Returns the alignment along the x axis. This specifies how the component would like to be aligned relative to other components. Possible values are defined in AlignmentConstants.

Specified by:
getHorizontalAlignment in interface IAlignmentConstants
Returns:
the horizontal alignment

setHorizontalAlignment

public void setHorizontalAlignment(int pHorizontalAlignment)
Sets the horizontal alignment. Possible values are defined in AlignmentConstants.

Specified by:
setHorizontalAlignment in interface IAlignmentConstants
Parameters:
pHorizontalAlignment - the new vertical alignment

getVerticalAlignment

public int getVerticalAlignment()
Returns the alignment along the y axis. This specifies how the component would like to be aligned relative to other components. Possible values are defined in AlignmentConstants.

Specified by:
getVerticalAlignment in interface IAlignmentConstants
Returns:
the vertical alignment

setVerticalAlignment

public void setVerticalAlignment(int pVerticalAlignment)
Sets the vertical alignment. Possible values are defined in AlignmentConstants.

Specified by:
setVerticalAlignment in interface IAlignmentConstants
Parameters:
pVerticalAlignment - the new vertical alignment

getOrientation

public int getOrientation()
Gets the orientation of this flow layout. It can be HORIZONTAL or VERTICAL.

Returns:
the orientation.

setOrientation

public void setOrientation(int pOrientation)
Sets the orientation of this flow layout. It can be HORIZONTAL or VERTICAL.

Parameters:
pOrientation - the orientation.

getComponentAlignment

public int getComponentAlignment()
Gets the alignment between the components. For horizontal orientation the component alignment can be ALIGN_TOP, ALIGN_CENTER, ALIGN_BOTTOM or ALIGN_STRETCH for vertical orientation ALIGN_LEFT, ALIGN_CENTER, ALIGN_RIGHT or ALIGN_STRETCH. Switching the orientation maps top to left and bottom to right alignment.

Returns:
the component alignment.

setComponentAlignment

public void setComponentAlignment(int pComponentAlignment)
Sets the alignment between the components. For horizontal orientation the component alignment can be ALIGN_TOP, ALIGN_CENTER, ALIGN_BOTTOM or ALIGN_STRETCH for vertical orientation ALIGN_LEFT, ALIGN_CENTER, ALIGN_RIGHT or ALIGN_STRETCH. Switching the orientation maps top to left and bottom to right alignment.

Parameters:
pComponentAlignment - the component alignment.

onLayout

protected void onLayout(Container<?> pContainer,
                        El pTarget)
Layouts the given container.

Overrides:
onLayout in class Layout
Parameters:
pContainer - the container.
pTarget - the target.

getPreferredSize

public Size getPreferredSize(Container<?> pContainer)
Calculates the preferred size of the container.

Specified by:
getPreferredSize in interface IPreferredSizeLayout
Parameters:
pContainer - the container.
Returns:
the preferred size.


Copyright © 2009 SIB Visions GmbH. All Rights Reserved.