org.xith3d.ui.hud.layout
Class HullLayout

java.lang.Object
  extended by org.xith3d.ui.hud.layout.LayoutManagerBase
      extended by org.xith3d.ui.hud.layout.BorderSettableLayoutManagerBase
          extended by org.xith3d.ui.hud.layout.HullLayout
All Implemented Interfaces:
BorderSettableLayoutManager, LayoutManager

public class HullLayout
extends BorderSettableLayoutManagerBase

The HullLayout uses the left-most and top-most Widget to define a border and then shrinks the container around the contained Widgets. This LayoutManager doesn't layout the Widgets at all. An inner LayoutManager can be used to layout the Widgets.


Field Summary
 
Fields inherited from interface org.xith3d.ui.hud.layout.LayoutManager
IGNORED_BY_LAYOUT
 
Constructor Summary
HullLayout()
           
HullLayout(float border)
           
HullLayout(float borderBottom, float borderRight, float borderTop, float borderLeft)
           
HullLayout(LayoutManager innerLayout)
           
HullLayout(LayoutManager innerLayout, float border)
           
HullLayout(LayoutManager innerLayout, float borderBottom, float borderRight, float borderTop, float borderLeft)
           
 
Method Summary
 void addWidget(Widget widget, java.lang.Object constraints)
          Adds a new Widget to this LayoutManager with the given constraints.
 void clear()
          Clears the Widget List.
protected  void doLayout(float left0, float top0, float containerResX, float containerResY)
          
 void doLayout(WidgetContainer container)
          This method is invoked by the container, when it needs to be relayouted.
 LayoutManager getInnerLayout()
           
 void removeWidget(Widget widget)
          Removed a Widget from this LayoutManager
 
Methods inherited from class org.xith3d.ui.hud.layout.BorderSettableLayoutManagerBase
getBorderBottom, getBorderLeft, getBorderRight, getBorderTop, setBorderBottom, setBorderLeft, setBorderRight, setBorderTop
 
Methods inherited from class org.xith3d.ui.hud.layout.LayoutManagerBase
getInvisibleWidgetsHidden, getWidgets, setInvisibleWidgetsHidden
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HullLayout

public HullLayout(LayoutManager innerLayout,
                  float borderBottom,
                  float borderRight,
                  float borderTop,
                  float borderLeft)

HullLayout

public HullLayout(float borderBottom,
                  float borderRight,
                  float borderTop,
                  float borderLeft)

HullLayout

public HullLayout(LayoutManager innerLayout,
                  float border)

HullLayout

public HullLayout(float border)

HullLayout

public HullLayout(LayoutManager innerLayout)

HullLayout

public HullLayout()
Method Detail

getInnerLayout

public final LayoutManager getInnerLayout()
Returns:
the LayoutManager, that layouts the Widgets.

addWidget

public void addWidget(Widget widget,
                      java.lang.Object constraints)
Adds a new Widget to this LayoutManager with the given constraints.

Specified by:
addWidget in interface LayoutManager
Overrides:
addWidget in class LayoutManagerBase
Parameters:
widget - the Widget to add
constraints - the constraints to use for this Widget in this LayoutManager

removeWidget

public void removeWidget(Widget widget)
Removed a Widget from this LayoutManager

Specified by:
removeWidget in interface LayoutManager
Overrides:
removeWidget in class LayoutManagerBase
Parameters:
widget - the Widget to be removed

clear

public void clear()
Clears the Widget List.

Specified by:
clear in interface LayoutManager
Overrides:
clear in class LayoutManagerBase

doLayout

protected void doLayout(float left0,
                        float top0,
                        float containerResX,
                        float containerResY)

Specified by:
doLayout in class LayoutManagerBase

doLayout

public void doLayout(WidgetContainer container)
This method is invoked by the container, when it needs to be relayouted.

Specified by:
doLayout in interface LayoutManager
Overrides:
doLayout in class LayoutManagerBase
Parameters:
container - the container this LayoutManager is attached to.