com.threerings.opengl.gui.layout
Class AbsoluteLayout

java.lang.Object
  extended by com.threerings.opengl.gui.layout.LayoutManager
      extended by com.threerings.opengl.gui.layout.AbsoluteLayout

public class AbsoluteLayout
extends LayoutManager

Lays out components at absolute coordinate and with (optional) absolute sizes. Note: the components are laid out in a coordinate system defined from the inside of the insets of the container rather than from the very edge of the container.


Constructor Summary
AbsoluteLayout()
           
AbsoluteLayout(boolean flipped)
           
 
Method Summary
 void addLayoutComponent(Component comp, Object constraints)
          Components added to a container will result in a call to this method, informing the layout manager of said constraints.
 Dimension computePreferredSize(Container target, int whint, int hhint)
          Computes the preferred size for the supplied container, based on the preferred sizes of its children and the layout policy implemented by this manager.
 Object getConstraints(Component comp)
          Returns a reference to the constraints associated with the specified component, or null for none.
 void layoutContainer(Container target)
          Effects the layout policy of this manager on the supplied target, adjusting the size and position of its children based on the size and position of the target at the time of this call.
 void removeLayoutComponent(Component comp)
          Components removed to a container for which a layout manager has been configured will result in a call to this method.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbsoluteLayout

public AbsoluteLayout()

AbsoluteLayout

public AbsoluteLayout(boolean flipped)
Parameters:
flipped - If true, will treat the y coordinates as 0 for the top and height for the bottom.
Method Detail

addLayoutComponent

public void addLayoutComponent(Component comp,
                               Object constraints)
Description copied from class: LayoutManager
Components added to a container will result in a call to this method, informing the layout manager of said constraints. The default implementation does nothing.

Overrides:
addLayoutComponent in class LayoutManager

removeLayoutComponent

public void removeLayoutComponent(Component comp)
Description copied from class: LayoutManager
Components removed to a container for which a layout manager has been configured will result in a call to this method. The default implementation does nothing.

Overrides:
removeLayoutComponent in class LayoutManager

getConstraints

public Object getConstraints(Component comp)
Description copied from class: LayoutManager
Returns a reference to the constraints associated with the specified component, or null for none. The default implementation always returns null.

Overrides:
getConstraints in class LayoutManager

computePreferredSize

public Dimension computePreferredSize(Container target,
                                      int whint,
                                      int hhint)
Description copied from class: LayoutManager
Computes the preferred size for the supplied container, based on the preferred sizes of its children and the layout policy implemented by this manager. Note: it is not necessary to add the container's insets to the returned preferred size.

Specified by:
computePreferredSize in class LayoutManager

layoutContainer

public void layoutContainer(Container target)
Description copied from class: LayoutManager
Effects the layout policy of this manager on the supplied target, adjusting the size and position of its children based on the size and position of the target at the time of this call. Note: the target's insets must be accounted for when laying out the children.

Specified by:
layoutContainer in class LayoutManager


Copyright © 2011. All Rights Reserved.