com.esotericsoftware.tablelayout
Class Toolkit<C,T extends C,L extends BaseTableLayout>

java.lang.Object
  extended by com.esotericsoftware.tablelayout.Toolkit<C,T,L>
Direct Known Subclasses:
TableToolkit

public abstract class Toolkit<C,T extends C,L extends BaseTableLayout>
extends Object

Base class for UI toolkit.

Author:
Nathan Sweet

Field Summary
static Toolkit instance
           
 
Constructor Summary
Toolkit()
           
 
Method Summary
abstract  void addChild(C parent, C child)
           
abstract  void addDebugRectangle(L layout, BaseTableLayout.Debug type, float x, float y, float w, float h)
          Adds a rectangle that should be drawn for debugging.
abstract  void clearDebugRectangles(L layout)
          Clears all debugging rectangles.
abstract  void freeCell(Cell cell)
           
abstract  float getHeight(C widget)
           
abstract  float getMaxHeight(C widget)
           
abstract  float getMaxWidth(C widget)
           
abstract  float getMinHeight(C widget)
           
abstract  float getMinWidth(C widget)
           
abstract  float getPrefHeight(C widget)
           
abstract  float getPrefWidth(C widget)
           
abstract  float getWidth(C widget)
           
 float height(float value)
          Interprets the specified value as a size.
abstract  Cell obtainCell(L layout)
           
abstract  void removeChild(C parent, C child)
           
 void setWidget(L layout, Cell cell, C widget)
           
 float width(float value)
          Interprets the specified value as a size.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

instance

public static Toolkit instance
Constructor Detail

Toolkit

public Toolkit()
Method Detail

obtainCell

public abstract Cell obtainCell(L layout)

freeCell

public abstract void freeCell(Cell cell)

addChild

public abstract void addChild(C parent,
                              C child)

removeChild

public abstract void removeChild(C parent,
                                 C child)

getMinWidth

public abstract float getMinWidth(C widget)

getMinHeight

public abstract float getMinHeight(C widget)

getPrefWidth

public abstract float getPrefWidth(C widget)

getPrefHeight

public abstract float getPrefHeight(C widget)

getMaxWidth

public abstract float getMaxWidth(C widget)

getMaxHeight

public abstract float getMaxHeight(C widget)

getWidth

public abstract float getWidth(C widget)

getHeight

public abstract float getHeight(C widget)

clearDebugRectangles

public abstract void clearDebugRectangles(L layout)
Clears all debugging rectangles.


addDebugRectangle

public abstract void addDebugRectangle(L layout,
                                       BaseTableLayout.Debug type,
                                       float x,
                                       float y,
                                       float w,
                                       float h)
Adds a rectangle that should be drawn for debugging.


setWidget

public void setWidget(L layout,
                      Cell cell,
                      C widget)
Parameters:
widget - May be null.

width

public float width(float value)
Interprets the specified value as a size. This can be used to scale all sizes applied to a table. The default implementation returns the value unmodified.

See Also:
Value.width(Object), Value.width(Cell)

height

public float height(float value)
Interprets the specified value as a size. This can be used to scale all sizes applied to a table. The default implementation returns the value unmodified.

See Also:
Value.height(Object), Value.height(Cell)


Copyright © 2013. All Rights Reserved.