JClass DesktopViews 6.3.0 API
Documentation

com.klg.jclass.table
Class CellSize

java.lang.Object
  |
  +--com.klg.jclass.table.CellSize
All Implemented Interfaces:
Cloneable, Serializable

public class CellSize
extends Object
implements Serializable, Cloneable

The CellSize class controls the dimensions for single row or column. Four properties control how cell sizes are calculated: character value which bases the size of a cell on a set number of characters or lines; minimum value which controls the minimum size of a cell; maximum value which controls the maximum size of a cell; and pixel value which sets a fixed dimension, determines whether character based control is used or sets the size to variable control. Querying any of the properties returns the setting and not the actual value. Use the Hidden property to hide and show rows and columns.

See Also:
Serialized Form

Field Summary
protected  int char_value
           
protected  boolean hidden
           
protected  int max_value
           
protected  int min_value
           
protected  int pixel_value
           
 
Constructor Summary
CellSize(int char_value)
          Creates a new CellSize object based on character dimensions.
CellSize(int min_value, int max_value, int pixel_value)
          Creates a new CellSize object based on pixel dimensions.
CellSize(int char_value, int min_value, int max_value, int pixel_value)
          Creates a new CellSize object based on all sizing options.
CellSize(int char_value, int min_value, int max_value, int pixel_value, boolean hidden)
          Creates a new CellSize objet based on all sizing options, including visibility.
 
Method Summary
 Object clone()
          Returns a copy of the CellSize object.
 int getCharValue()
          Returns the number of characters that a column can display or the number of lines for a row.
 int getMaxValue()
          Returns the maximum size in pixels of a row or columns.
 int getMinValue()
          Returns the minimum size in pixels of a row or columns.
 int getPixelValue()
          Returns the pixel value for a row or column.
 boolean isHidden()
          Returns true if the row or column is hidden.
 void setCharValue(int value)
          For columns, sets the number of characters that a column can display (default: 10), and for rows, the number of lines of text that a row can display (default: 1).
 void setHidden(boolean value)
          Determines whether a row or column is hidden without invalidating the settings that control sizing when visible.
 void setMaxValue(int value)
          Sets the maximum size in pixels of a row or column.
 void setMinValue(int value)
          Sets the minimum size in pixels of a row or column.
 void setPixelValue(int value)
          Sets the width of a column or height of a row in pixels.
 String toString()
          Returns a string representation of the CellSize object.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

char_value

protected int char_value

min_value

protected int min_value

max_value

protected int max_value

pixel_value

protected int pixel_value

hidden

protected boolean hidden
Constructor Detail

CellSize

public CellSize(int char_value)
Creates a new CellSize object based on character dimensions.


CellSize

public CellSize(int min_value,
                int max_value,
                int pixel_value)
Creates a new CellSize object based on pixel dimensions.


CellSize

public CellSize(int char_value,
                int min_value,
                int max_value,
                int pixel_value)
Creates a new CellSize object based on all sizing options.


CellSize

public CellSize(int char_value,
                int min_value,
                int max_value,
                int pixel_value,
                boolean hidden)
Creates a new CellSize objet based on all sizing options, including visibility.

Method Detail

getCharValue

public int getCharValue()
Returns the number of characters that a column can display or the number of lines for a row.

See Also:
setCharValue(int)

setCharValue

public void setCharValue(int value)
For columns, sets the number of characters that a column can display (default: 10), and for rows, the number of lines of text that a row can display (default: 1). Cell values that do not fit in the cell or label are clipped. This property controls the size if PixelValue is JCTableEnum.NOVALUE.


isHidden

public boolean isHidden()
Returns true if the row or column is hidden. The hidden property does not determine whether the cell is currently in view.

See Also:
setHidden(boolean)

setHidden

public void setHidden(boolean value)
Determines whether a row or column is hidden without invalidating the settings that control sizing when visible.


getMinValue

public int getMinValue()
Returns the minimum size in pixels of a row or columns.

See Also:
setMinValue(int)

setMinValue

public void setMinValue(int value)
Sets the minimum size in pixels of a row or column.


getMaxValue

public int getMaxValue()
Returns the maximum size in pixels of a row or columns.

See Also:
setMaxValue(int)

setMaxValue

public void setMaxValue(int value)
Sets the maximum size in pixels of a row or column.


getPixelValue

public int getPixelValue()
Returns the pixel value for a row or column.

See Also:
setPixelValue(int)

setPixelValue

public void setPixelValue(int value)
Sets the width of a column or height of a row in pixels. Use JCTableEnum.NOVALUE to control width/height by character value.

The following special values are valid:

 JCTableEnum.NOVALUE            use character setting to control the size of a
                                row or column
 JCTableEnum.AS_IS              do not change. Use to convert from VARIABLE to
                                fixed size
 JCTableEnum.VARIABLE           set to the highest value in the row or column
 JCTableEnum.VARIABLE_ESTIMATE  set to the highest value in the first
                                VariableCount cells
 


clone

public Object clone()
Returns a copy of the CellSize object.

Overrides:
clone in class Object

toString

public String toString()
Returns a string representation of the CellSize object.

Overrides:
toString in class Object

Copyright © 2004 Quest Software Inc..
All rights reserved.