org.xith3d.ui.hud.layout
Interface LayoutManager

All Known Implementing Classes:
BorderLayout, BorderSettableLayoutManagerBase, CenterLayout, FillLayout, GridLayout, HullLayout, LayoutManagerBase, ListLayout

public interface LayoutManager

Similar to the AWT LayoutManager this interface is a base for all Layout managers usable in a Xith3D HUD.


Field Summary
static java.lang.Object IGNORED_BY_LAYOUT
          This is a constraint, that can be passed to the WidgetContainer.addWidget(Widget) methods to tell it, that the Widget is not to be added to the LayoutManager.
 
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.
 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.
 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.
 

Field Detail

IGNORED_BY_LAYOUT

static final java.lang.Object IGNORED_BY_LAYOUT
This is a constraint, that can be passed to the WidgetContainer.addWidget(Widget) methods to tell it, that the Widget is not to be added to the LayoutManager.

Method Detail

setInvisibleWidgetsHidden

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

Parameters:
hidden -

getInvisibleWidgetsHidden

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

Default: false


addWidget

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

Parameters:
widget - the Widget to add
constraints - the constraints to use for this Widget in this LayoutManager

removeWidget

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

Parameters:
widget - the Widget to be removed

clear

void clear()
Clears the Widget List.


doLayout

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

Parameters:
container - the container this LayoutManager is attached to.