net.refractions.udig.ui.graphics
Class TableSettings

java.lang.Object
  extended by net.refractions.udig.ui.graphics.TableSettings

public class TableSettings
extends java.lang.Object

This class contains the settings for a table, including the minimum widths of columns and maximum width (ratio) of each column with respect to the entire table.

Since:
1.0.1
Author:
chorner
See Also:
TableUtils

Constructor Summary
TableSettings(Table table)
          Constructor for the TableSettings object
 
Method Summary
 int getColumnCount()
          Returns the number of columns in the table
 double getColumnMax(int columnIndex)
          returns the maximum width of the column, as a percentage ratio (0-->1)
 int getColumnMin(int columnIndex)
          returns the minimum pixel width of the column
 int getCurrentMode()
           
 void setColumnMax(int columnIndex, double widthPercent)
          sets the maximum width of the column, as a percentage ratio (0-->1)
 void setColumnMin(int columnIndex, int numPixels)
          sets the minimum pixel width of the column
 void setCurrentMode(int currentMode)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TableSettings

public TableSettings(Table table)
Constructor for the TableSettings object

Parameters:
table -
Method Detail

setColumnMin

public void setColumnMin(int columnIndex,
                         int numPixels)
sets the minimum pixel width of the column

Parameters:
columnIndex - integer representing the column index (first column = 0, second = 1, ...)
numPixels -

getColumnMin

public int getColumnMin(int columnIndex)
returns the minimum pixel width of the column

Parameters:
columnIndex - integer representing the column index (first column = 0, second = 1, ...)

setColumnMax

public void setColumnMax(int columnIndex,
                         double widthPercent)
sets the maximum width of the column, as a percentage ratio (0-->1)

Parameters:
columnIndex - integer representing the column index (first column = 0, second = 1, ...)
widthPercent - value between 0 and 1, where 1 is 100%

getColumnMax

public double getColumnMax(int columnIndex)
returns the maximum width of the column, as a percentage ratio (0-->1)

Parameters:
columnIndex - integer representing the column index (first column = 0, second = 1, ...)

getColumnCount

public int getColumnCount()
Returns the number of columns in the table

Returns:
the number of columns in the table that was initially passed to the constructor

getCurrentMode

public int getCurrentMode()

setCurrentMode

public void setCurrentMode(int currentMode)