org.softsmithy.lib.awt.layout
Class InfiniteTableLayout

java.lang.Object
  extended by org.softsmithy.lib.awt.layout.AbstractTableLayout
      extended by org.softsmithy.lib.awt.layout.InfiniteTableLayout
All Implemented Interfaces:
LayoutManager, LayoutManager2, TableLayout, CustomizerLayout

public class InfiniteTableLayout
extends AbstractTableLayout

Author:
puce

Nested Class Summary
 
Nested classes/interfaces inherited from class org.softsmithy.lib.awt.layout.AbstractTableLayout
AbstractTableLayout.AbstractAxis
 
Constructor Summary
InfiniteTableLayout(Container parent)
           
InfiniteTableLayout(int defaultColumnWidth, int defaultRowHeight, Container parent)
          Creates a new instance of UnlimitedTableLayout
 
Method Summary
 Rectangle adjustBounds(Rectangle bounds)
           
 int adjustHeight(int yPixel, int pixelHeight)
           
 int adjustWidth(int xPixel, int pixelWidth)
           
 int adjustX(int pixel)
           
 int adjustY(int pixel)
           
 int colSpan(int fromIndex, int pixelWidth)
           
 int columnIndex(int pixel)
           
 void deleteColumn(int i, boolean absolute)
           
 void deleteRow(int i, boolean absolute)
           
 void drawGrid(Container container, Graphics g)
           
 void drawLayoutHelp(Container container, Graphics g)
           
protected  AbstractTableLayout.AbstractAxis getColumns()
          Indicates whether or not the size of the cells are known for the last known size of the container.
 double getColumnWidth(int column)
           
 CustomizerConstraints getCustomizerConstraints(Component comp)
           
 int getDefaultColumnWidth()
          Getter for property defaultColumnWidth.
 int getDefaultRowHeight()
          Getter for property defaultRowHeight.
 Container getParent()
           
 double getRowHeight(int row)
           
protected  AbstractTableLayout.AbstractAxis getRows()
           
 TableConstraints getTableConstraints(Component comp)
          Getter for property constraints.
 int height(int fromIndex, int rowSpan)
           
 void insertColumn(int i, boolean absolute)
           
 void insertRow(int i, boolean absolute)
           
 boolean isDefaultColumn(int column)
           
 boolean isDefaultRow(int row)
           
 void makeColumnDefault(int column)
           
 void makeRowDefault(int row)
           
 Dimension minimumLayoutSize(Container parent)
          Calculates the minimum size dimensions for the specified container, given the components it contains.
 Dimension preferredLayoutSize(Container parent)
          Calculates the preferred size dimensions for the specified container, given the components it contains.
 void removeLayoutComponent(Component comp)
          Removes the specified component from the layout.
 int rowIndex(int pixel)
           
 int rowSpan(int fromIndex, int pixelHeight)
           
 void setAbsoluteBounds(Component component, Rectangle bounds)
           
 void setColumnWidth(int column, double width)
           
 void setCustomizerConstraints(Component comp, CustomizerConstraints cc)
           
 void setDefaultColumnWidth(int defaultColumnWidth, boolean absolute)
          Setter for property defaultColumnWidth.
 void setDefaultRowHeight(int defaultRowHeight, boolean absolute)
          Setter for property defaultRowHeight.
 void setRelativeBounds(Component component, Rectangle bounds)
           
 void setRowHeight(int row, double height)
           
 void setTableConstraints(Component comp, TableConstraints tc)
          Setter for property constraints.
 int width(int fromIndex, int colSpan)
           
 int xLocation(int index)
           
 int yLocation(int index)
           
 
Methods inherited from class org.softsmithy.lib.awt.layout.AbstractTableLayout
addComponentLayoutListener, addComponentLayoutListener, addLayoutComponent, addLayoutComponent, ensureValidity, ensureValidity, getComponents, getLayoutAlignmentX, getLayoutAlignmentY, invalidateLayout, isValid, layoutComponent, layoutContainer, maximumLayoutSize, removeComponentLayoutListener, removeComponentLayoutListener, validateLayout
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InfiniteTableLayout

public InfiniteTableLayout(int defaultColumnWidth,
                           int defaultRowHeight,
                           Container parent)
Creates a new instance of UnlimitedTableLayout


InfiniteTableLayout

public InfiniteTableLayout(Container parent)
Method Detail

getParent

public Container getParent()

setColumnWidth

public void setColumnWidth(int column,
                           double width)

getColumnWidth

public double getColumnWidth(int column)

makeColumnDefault

public void makeColumnDefault(int column)

isDefaultColumn

public boolean isDefaultColumn(int column)

setRowHeight

public void setRowHeight(int row,
                         double height)

getRowHeight

public double getRowHeight(int row)

makeRowDefault

public void makeRowDefault(int row)

isDefaultRow

public boolean isDefaultRow(int row)

getDefaultColumnWidth

public int getDefaultColumnWidth()
Getter for property defaultColumnWidth.

Returns:
Value of property defaultColumnWidth.

setDefaultColumnWidth

public void setDefaultColumnWidth(int defaultColumnWidth,
                                  boolean absolute)
Setter for property defaultColumnWidth.

Parameters:
defaultColumnWidth - New value of property defaultColumnWidth.

getDefaultRowHeight

public int getDefaultRowHeight()
Getter for property defaultRowHeight.

Returns:
Value of property defaultRowHeight.

setDefaultRowHeight

public void setDefaultRowHeight(int defaultRowHeight,
                                boolean absolute)
Setter for property defaultRowHeight.

Parameters:
defaultRowHeight - New value of property defaultRowHeight.

getTableConstraints

public TableConstraints getTableConstraints(Component comp)
Getter for property constraints.

Returns:
Value of property constraints.

getCustomizerConstraints

public CustomizerConstraints getCustomizerConstraints(Component comp)

setTableConstraints

public void setTableConstraints(Component comp,
                                TableConstraints tc)
Setter for property constraints.

Parameters:
constraints - New value of property constraints.

setCustomizerConstraints

public void setCustomizerConstraints(Component comp,
                                     CustomizerConstraints cc)

deleteColumn

public void deleteColumn(int i,
                         boolean absolute)

deleteRow

public void deleteRow(int i,
                      boolean absolute)

drawGrid

public void drawGrid(Container container,
                     Graphics g)

drawLayoutHelp

public void drawLayoutHelp(Container container,
                           Graphics g)

insertColumn

public void insertColumn(int i,
                         boolean absolute)

insertRow

public void insertRow(int i,
                      boolean absolute)

minimumLayoutSize

public Dimension minimumLayoutSize(Container parent)
Calculates the minimum size dimensions for the specified container, given the components it contains.

Parameters:
parent - the component to be laid out
See Also:
preferredLayoutSize(java.awt.Container)

preferredLayoutSize

public Dimension preferredLayoutSize(Container parent)
Calculates the preferred size dimensions for the specified container, given the components it contains.

Parameters:
parent - the container to be laid out
See Also:
minimumLayoutSize(java.awt.Container)

removeLayoutComponent

public void removeLayoutComponent(Component comp)
Removes the specified component from the layout.

Parameters:
comp - the component to be removed

columnIndex

public int columnIndex(int pixel)

rowIndex

public int rowIndex(int pixel)

colSpan

public int colSpan(int fromIndex,
                   int pixelWidth)

rowSpan

public int rowSpan(int fromIndex,
                   int pixelHeight)

width

public int width(int fromIndex,
                 int colSpan)

height

public int height(int fromIndex,
                  int rowSpan)

yLocation

public int yLocation(int index)

xLocation

public int xLocation(int index)

adjustX

public int adjustX(int pixel)

adjustY

public int adjustY(int pixel)

adjustWidth

public int adjustWidth(int xPixel,
                       int pixelWidth)

adjustHeight

public int adjustHeight(int yPixel,
                        int pixelHeight)

adjustBounds

public Rectangle adjustBounds(Rectangle bounds)

getColumns

protected AbstractTableLayout.AbstractAxis getColumns()
Indicates whether or not the size of the cells are known for the last known size of the container. If valid is false or the container has been resized, the cell sizes must be recalculated using calculateSize.

Specified by:
getColumns in class AbstractTableLayout

getRows

protected AbstractTableLayout.AbstractAxis getRows()
Specified by:
getRows in class AbstractTableLayout

setAbsoluteBounds

public void setAbsoluteBounds(Component component,
                              Rectangle bounds)

setRelativeBounds

public void setRelativeBounds(Component component,
                              Rectangle bounds)


Copyright © 2002-2011 SoftSmithy. All Rights Reserved.