org.xith3d.ui.hud.layout
Class LayoutManagerBase

java.lang.Object
  extended by org.xith3d.ui.hud.layout.LayoutManagerBase
All Implemented Interfaces:
LayoutManager
Direct Known Subclasses:
BorderSettableLayoutManagerBase, CenterLayout

public abstract class LayoutManagerBase
extends java.lang.Object
implements LayoutManager

An abstract base class for all LayoutManagers.


Field Summary
 
Fields inherited from interface org.xith3d.ui.hud.layout.LayoutManager
IGNORED_BY_LAYOUT
 
Constructor Summary
LayoutManagerBase()
           
 
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 abstract  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.
 boolean getInvisibleWidgetsHidden()
          If set to true, the LayoutManager hides invisible Widgets and doesn't use them to calculate the other Widgets' layouts.
 java.util.ArrayList<Widget> getWidgets()
           
 void removeWidget(Widget widget)
          Removed a Widget from this LayoutManager
 void setInvisibleWidgetsHidden(boolean hidden)
          If set to true, the LayoutManager hides invisible Widgets and doesn't use them to calculate the other Widgets' layouts.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LayoutManagerBase

public LayoutManagerBase()
Method Detail

setInvisibleWidgetsHidden

public final void setInvisibleWidgetsHidden(boolean hidden)
If set to true, the LayoutManager hides invisible Widgets and doesn't use them to calculate the other Widgets' layouts.

Default: false

Specified by:
setInvisibleWidgetsHidden in interface LayoutManager

getInvisibleWidgetsHidden

public final boolean getInvisibleWidgetsHidden()
If set to true, the LayoutManager hides invisible Widgets and doesn't use them to calculate the other Widgets' layouts.

Default: false

Specified by:
getInvisibleWidgetsHidden in interface LayoutManager

getWidgets

public final java.util.ArrayList<Widget> getWidgets()
Returns:
all Widgets added to this LayoutManager.

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
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
Parameters:
widget - the Widget to be removed

clear

public void clear()
Clears the Widget List.

Specified by:
clear in interface LayoutManager

doLayout

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

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
Parameters:
container - the container this LayoutManager is attached to.