SilverStream
Application Server 3.5

com.sssw.rt.tview
Class AgoColumnBase

java.lang.Object
 |
 +--com.sssw.rt.tview.AgoColumnBase
Direct Known Subclasses:
AgoColumnButtonCheck, AgoColumnButtonRadio, AgoColumnForm, AgoColumnImage, AgoColumnIntegerSpinnerField, AgoColumnSpacer, AgoColumnText

public abstract class AgoColumnBase
extends Object

Abstract base class for all AgcView and AgcViewDownloadable column objects.

You cannot instantiate an AgoColumnBase, but might use one when you want to obtain a column from an AgoBandFormat and do not know the column's type. You can then cast the column format object that you obtain to the appropriate column type.

See Also:
AgoColumnHierarchy, AgoColumnImage, AgoColumnSpacer, AgoColumnText, AgoColumnTextEditor

Constructor Summary
AgoColumnBase()
           
 
Method Summary
 int getAlignment()
          Returns a symbolic constant that represents the way in which the column's contents are aligned.
 Color getBackgroundColor()
          Returns the Color object which describes the column's background color.
 int getBorderType()
          Returns the constant that specifies the column's border type.
 int getDisplayWidth()
          Returns the column's display width in pixels.
 boolean getHidden()
          Determines whether or not the column is visible to the user.
 boolean getResizable()
          Returns the resizable property.
 boolean getSelectable()
          Returns true if the column can be selected by the user.
 boolean getTransparent()
          Returns the column's transparency property.
 boolean getVisible()
          Determines whether or not the column is visible to the user.
 int getWidth()
          Returns the column width (in pixels).
 boolean isWidthFixed()
          Returns the flag which specifies that the column width is fixed
 void setAlignment(int alignment)
          Sets the alignment for the contents of the column.
 void setBackgroundColor(Color backgroundcolor)
          Sets the background color of the column.
 void setBorderType(int borderType)
          Sets the column's border type.
 void setFixedWidth(int width)
          Sets the width.
 void setHidden(boolean hidden)
          Sets the "hidden" property for the column.
 void setProportionalWidth(int width)
          Sets the width.
 void setProportionalWidth(int width, int min, int max)
          Sets the width.
 void setResizable(boolean resizable)
          Specifies whether the user can resize the column.
 void setSelectable(boolean selectable)
          Sets the selectable option for the column.
 void setTransparent(boolean transparent)
          Sets the column's transparency property.
 void setVisible(boolean visible)
          Sets the "visible" property for the column.
 void setWidth(int width)
          Sets the column width in pixels.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AgoColumnBase

public AgoColumnBase()
Method Detail

getHidden

public boolean getHidden()
Determines whether or not the column is visible to the user. Returns true if the column is hidden
Example:
	boolean isHidden = colFmt.getHidden();
See Also:
AgoColumnBase.setHidden(boolean hidden)

setHidden

public void setHidden(boolean hidden)
Sets the "hidden" property for the column. Set to true to hide the column. If you hide a column, you might also want to hide any headers associated with the column. If you change this value at runtime, you must call the AgcView.setAgoViewFormat() method to repaint the view and make the change immediately visible to the user.
Parameters:
hidden - specifies the column's hidden property. Setting it to true hides the column.
Example:
	colFmt.setHidden(true);
See Also:
AgoColumnBase.getHidden()

setVisible

public void setVisible(boolean visible)
Sets the "visible" property for the column. Set to true to hide the column. If you hide a column, you might also want to hide any headers associated with the column. If you change this value at runtime, you must call the AgcView.setAgoViewFormat() method to repaint the view and make the change immediately visible to the user.
Parameters:
hidden - specifies the column's hidden property. Setting it to true hides the column.
Example:
	colFmt.setVisible(true);
See Also:
AgoColumnBase.getVisible()

getVisible

public boolean getVisible()
Determines whether or not the column is visible to the user. Returns true if the column is visible
Example:
	boolean isVisible = colFmt.getVisible();
See Also:
AgoColumnBase.setVisible(boolean hidden)

getWidth

public int getWidth()
Returns the column width (in pixels).
Example:
	int width;
	width = colFmt.getWidth();
See Also:
AgoColumnBase.setWidth(int width)

setWidth

public void setWidth(int width)
Sets the column width in pixels.
Parameters:
width - column width, in pixels.
Example:
        int width;

	width = fldsetWidth.getValue();
	colFmt.setWidth(width);

setFixedWidth

public void setFixedWidth(int width)
Sets the width. The width is stored in pixels. The column width will not change unless the user drags the column to a new width, in which case the new width will become the fixed width.
Parameters:
width - column width, in pixels.
Example:
        int width;

	width = fldsetWidth.getValue();
	colFmt.setFixedWidth(width);

setProportionalWidth

public void setProportionalWidth(int width)
Sets the width. The width is stored in pixels. The column width will change proportionately to the other variable width columns when the view is resized. If the user drags the column to a new width, the column will cease to be variable and the new width will become the fixed width
Parameters:
width - column width, in pixels.
Example:
    int width;

	width = fldsetWidth.getValue();
	colFmt.setProportionalWidth(width);

setProportionalWidth

public void setProportionalWidth(int width,
                                 int min,
                                 int max)
Sets the width. The width is stored in pixels. The column width will change proportionately to the other variable width columns when the view is resized, but will never become smaller than the minimum or wider then the maximum specified. Either maximum or minimum may be set to -1 to specify no limit. If the user drags the column to a new width, the column will cease to be variable and the new width will become the fixed width
Parameters:
width - column width, in pixels. min minimum column width, in pixels. max maximum column width, in pixels.
Example:
    int width;

	width = fldsetWidth.getValue();
	colFmt.setProportionalWidth(width, -1, -1);

isWidthFixed

public boolean isWidthFixed()
Returns the flag which specifies that the column width is fixed

getDisplayWidth

public int getDisplayWidth()
Returns the column's display width in pixels.
Example:
     int width;
     width = colFmt.getDisplayWidth();

getAlignment

public final int getAlignment()
Returns a symbolic constant that represents the way in which the column's contents are aligned.
Usage:

For the return values, see the list of Column Alignment Values.

Example:
     int alignment;
     alignment = colFmt.getAlignment();
See Also:
AgoColumnBase.setAlignment(int alignment)

setAlignment

public final void setAlignment(int alignment)
Sets the alignment for the contents of the column.
Parameters:
alignment - the alignment constant. The table below describes the options for this value.
Example:
    colFmt.setAlignment(AgoColumnBase.ALIGN_TOP);

Column Alignment Values

ALIGN_TOP Align contents at top of the column. Use with any column type.
ALIGN_LEFT Align contents at left in the column. Use with objects of type AgoColumnBase.
ALIGN_TOP_LEFT Align contents at top left of the column. Use with objects of type AgoColumnBase.
ALIGN_CENTER Center contents horizontally in the column. Use with objects of type AgoColumnBase.
ALIGN_RIGHT Align contents at right in the column. Use with objects of type AgoColumnBase.
ALIGN_VERT_CENTER Center contents vertically within the column. Use with objects of type AgoColumnBase.
ALIGN_BOTTOM Align contents at bottom of the column. Use with objects of type AgoColumnBase.
MULTILINE Allow multiple lines of text. Use with objects of type AgoColumnText only.
WORDBREAK Allow text to be hyphenated. Use with objects of type AgoColumnText only.
See Also:
AgoColumnBase.getAlignment()

getSelectable

public boolean getSelectable()
Returns true if the column can be selected by the user.
Example:
   boolean selectable;

   selectable = colFmt.getSelectable();
See Also:
AgoColumnBase.setSelectable(boolean selectable)

setSelectable

public void setSelectable(boolean selectable)
Sets the selectable option for the column.
Parameters:
selectable - boolean that specifies whether the user can select the column. When set to true, the user can select the column.
Usage:

If you change this value at runtime, you must also call AgcView.setAgoViewFormat(). The setAgoViewFormat() method repaints the view which makes any changes to the band or column formats visible to the user.

Example:
     column1.setSelectable(true);
See Also:
AgoColumnBase.getSelectable()

getTransparent

public boolean getTransparent()
Returns the column's transparency property. If true, column is transparent.
Example:
     boolean transparent;

     transparent=colFmt.getTransparent();
See Also:
AgoColumnBase.setTransparent(boolean transparent)

setTransparent

public void setTransparent(boolean transparent)
Sets the column's transparency property.
Parameters:
transparent - set to true to make the column transparent (visible).
Example:
	boolean transparent;
	colFmt.setTransparent(true);
See Also:
AgoColumnBase.getTransparent()

getBackgroundColor

public Color getBackgroundColor()
Returns the Color object which describes the column's background color.
Example:

This example illustrates how to obtain the background Color of a column.

     Color bgColor;
     bgColor = columnFmt.getBackgroundColor();
See Also:
AgoColumnBase.setBackgroundColor(Color backgroundcolor)

setBackgroundColor

public void setBackgroundColor(Color backgroundcolor)
Sets the background color of the column.
Parameters:
backgroundcolor - the background color as defined in java.awt.Color.
Usage:

The column must be transparent (setTransparent(false)) for the background color to show.

Example:

The following example illustrates how to set the background color on a column using one of the Color constants:

     columnFmt.setBackgroundColor(Color.white);
This example illustrates how to create a new Color and then use it to set the background color:
     Color col = new Color(247, 247, 222);
     columnFmt.setBackgroundColor(col);
See Also:
AgoColumnBase.getBackgroundColor()

getBorderType

public int getBorderType()
Returns the constant that specifies the column's border type.
Usage:

For the borderType parameter, see the setBorderType method.

Example:
   int borderType;
   border = colFmt.getBorderType();
See Also:
AgoColumnBase.setBorderType(int borderType)

setBorderType

public void setBorderType(int borderType)
Sets the column's border type.
Parameters:
bordertype - the symbolic constant that specifies the desired border. The table below lists the valid border types.

Border Type Values

BORDER_NONE No visible border
BORDER_LINE A single line border
BORDER_3D A 3 dimensional border
Example:
     colFmt.setBorderType(AgoColumnBase.BORDER_3D);
See Also:
AgoColumnBase.getBorderType()

setResizable

public void setResizable(boolean resizable)
Specifies whether the user can resize the column.
Parameters:
resizable - when set to true allows the user to resize the column.
Usage:
If the view format itself is resizable, all of the columns are automatically resizable, so calling setResizable(false) on the column has no effect. If the view format itself is not resizable, then individual columns can be made resizable by calling setResizable(true) on the columns.
Example:
     boolean resizable;
     colFmt.setResizable(true);
See Also:
AgoColumnBase.getResizable()

getResizable

public boolean getResizable()
Returns the resizable property. If true, the user can resize the column.
Example:
     boolean resizable;
     resizable=colFmt.getResizable();
See Also:
AgoColumnBase.setResizable(boolean resizable)

SilverStream
Application Server 3.5