|
SilverStream Application Server 3.5 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.sssw.rt.tview.AgoColumnBase | +--com.sssw.rt.tview.AgoColumnButtonCheck
AgoColumnButtonCheck is a bound column type that represents the state of a boolean (true/false) value. A "checked" box indicates a true value, while an unchecked box indicates a false value. AgoColumnButtonChecks work independently of one another so multiple checkboxes can represent multiple conditions.
Constructor Summary | |
AgoColumnButtonCheck(int width,
boolean visible,
boolean transparent,
Color backgroundColor,
int borderType)
|
Method Summary | |
Object |
getCheckedValue()
Returns the (constant) value that is written to the database when this checkbox is checked. |
Color |
getColor()
Returns the java.awt.Color object used to define the column's text color. |
String |
getDisplayText()
Returns the String representing the check box label |
AgoFontIdentifier |
getFontIdentifier()
Returns the SilverStream font object (AgoFontIdentifier) for the column's text. |
String |
getPropertyName()
Returns the name of the data column whose value will be changed when this button is pressed |
Object |
getUncheckedValue()
Returns the (constant) value that is written to the database when the checkbox is unchecked |
void |
initColumnCheckProperty(String propertyName,
AgoFontIdentifier fontid,
Color textColor,
int alignment)
Sets up a number of parameters for the checkbox column. |
void |
setCheckedValue(Object value)
Sets the value (a constant) that is written to the database when this checkbox is checked. |
void |
setColor(Color color)
Sets the column's text color. |
void |
setDisplayText(String text)
Sets the text for the check box label. |
void |
setFontIdentifier(AgoFontIdentifier fontid)
Assigns the SilverStream font object (AgoFontIdentifier) to the column's text. |
void |
setPropertyName(String propertyName)
Sets the name of the data column whose value will be changed when this button is pressed |
void |
setUncheckedValue(Object value)
Sets the (constant) value that is written to the database when the checkbox is unchecked |
Methods inherited from class com.sssw.rt.tview.AgoColumnBase |
getAlignment,
getBackgroundColor,
getBorderType,
getDisplayWidth,
getHidden,
getResizable,
getSelectable,
getTransparent,
getVisible,
getWidth,
isWidthFixed,
setAlignment,
setBackgroundColor,
setBorderType,
setFixedWidth,
setHidden,
setProportionalWidth,
setProportionalWidth,
setResizable,
setSelectable,
setTransparent,
setVisible,
setWidth |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public AgoColumnButtonCheck(int width, boolean visible, boolean transparent, Color backgroundColor, int borderType)
width
- the column width, in pixelsvisible
- the "visible" property for the column. Set to false to hide the column.
If you hide a column, you might also want to hide any headers associated with the column.transparent
- the "transparent" property for the column. Set to true to make it transparent.backgroundColor
- the java.awt.Color object that specifies the column's background color.borderType
- the symbolic constant that specifies the desired border. See AgoColumnBase for the valid types.AgoColumnButtonCheck benefit1; benefit1 = new AgoColumnButtonCheck(100, true, false, Color.white, AgoColumnBase.BORDER_3D);
AgoColumnBase
Method Detail |
public void initColumnCheckProperty(String propertyName, AgoFontIdentifier fontid, Color textColor, int alignment)
propertyName
- the name of the database column to which this column is bound.
The type of the property must be Boolean.
If it is not, you must also set the checked and unchecked values directly (using setCheckedValue() and setUncheckedValue()).fontid
- a SilverStream font object (AgoFontIdentifier) for the control's texttextColor
- a java.awt.Color object for the control's textalignment
- the alignment constant for the contents of the column. Alignment constants are described in the AgoColumnBase documentation.AgoColumnButtonCheck benefit1; benefit1 = new AgoColumnButtonCheck(100, true, false, Color.white, AgoColumnBase.BORDER_3D); benefit1.initColumnCheckProperty("health", new AgoFontIdentifier("Dialog", 0, 12), Color.black, AgoColumnbase.ALIGN_LEFT); benefit1.setCheckedValue("Yes"); benefit1.setUncheckedValue("No");
AgoColumnBase
,
AgoFontIdentifier
,
AgoColumnButtonCheck.setPropertyName(String propertyName)
,
AgoColumnButtonCheck.getCheckedValue()
,
AgoColumnButtonCheck.getUncheckedValue()
,
AgoColumnButtonCheck.setCheckedValue(Object value)
,
AgoColumnButtonCheck.setUncheckedValue(Object value)
public final AgoFontIdentifier getFontIdentifier()
AgoFontIdentifier.PLAIN AgoFontIdentifier.BOLD AgoFontIdentifier.ITALIC AgoFontIdentifier.BOLD + AgoFontIdentifier.ITALIC
The Font Name can be one of these values: Dialog, SansSerif, Serif, Monospaced, Helvetica, TimesRoman, Courier, DialogInput, Zapfdingbats. At runtime, Java translates this value to the appropriate font installed on the system.
The Font Size can be any integer.
AgoFontIdentifier font; font = myColumn.getFontIdentifier();
AgoFontIdentifier
,
AgoColumnButtonCheck.setFontIdentifier(AgoFontIdentifier fontid)
public final void setFontIdentifier(AgoFontIdentifier fontid)
fontid
- specifies the AgoFontIdentifier object that assigns the font for the columnOverrides the font values set in the initColumnCheckProperty() method.
The AgoFontIdentifier object consists of three parts: a Font Name, a Font Style and a Font Size.
The Font Name can be one of these values: Dialog, SansSerif, Serif, Monospaced, Helvetica, TimesRoman, Courier, DialogInput, Zapfdingbats.
At runtime, Java translates this value to the appropriate font installed on the system.
The Font Size can be any integer.
The Font Style can be one of these values:
AgoFontIdentifier.PLAIN AgoFontIdentifier.BOLD AgoFontIdentifier.ITALIC AgoFontIdentifier.BOLD + AgoFontIdentifier.ITALIC
AgoFontIdentifier newFont; String newName; int newSize; int newStyle; newName="TimesRoman"; newSize=20; newStyle=AgoFontIdentifier.ITALIC; newFont=new AgoFontIdentifier(newName, newStyle, newSize); myColumn.setFontIdentifier(newFont);
AgoFontIdentifier
,
AgoColumnButtonCheck.getFontIdentifier()
public final Color getColor()
Color textColor = myColumn.getColor();
AgoColumnButtonCheck.setColor(Color color)
public final void setColor(Color color)
color
- the java.awt.Color object for the column's textOverrides the color set in the initColumnCheckProperty() method.
myColumn.setColor(Color.green);
AgoColumnButtonCheck.getColor()
public final String getPropertyName()
String propName = health.getPropertyName();
AgoColumnButtonCheck.setPropertyName(String propertyName)
public final void setPropertyName(String propertyName)
propertyName
- the data column to bind toAgoColumnButtonCheck benefit1; benefit1 = new AgoColumnButtonCheck(100, true, false, Color.white, AgoColumnBase.BORDER_NONE); benefit1.initColumnCheckProperty("health", new AgoFontIdentifier("Dialog", 0, 12), Color.black, AgoColumnBase.ALIGN_LEFT); benefit1.setPropertyName("dental"); benefit1.setCheckedValue("Yes"); benefit1.setUncheckedValue("No");
AgoColumnButtonCheck.getPropertyName()
,
AgoColumnButtonCheck.setCheckedValue(Object value)
,
AgoColumnButtonCheck.setUncheckedValue(Object value)
,
AgoColumnButtonCheck.getCheckedValue()
,
AgoColumnButtonCheck.getUncheckedValue()
public final String getDisplayText()
AgoColumnButtonCheck health = new AgoColumnButtonCheck(120, true, false, Color.green, AgoColumnBase.BORDER_3D); health.initColumnCheckProperty("health", new AgoFontIdentifier("Dialog", 0, 12), Color.black, AgoColumnBase.ALIGN_LEFT); health.setDisplayText("Health Insurance"); String info = health.getDisplayText();
AgoColumnButtonCheck.setDisplayText(String text)
public final void setDisplayText(String text)
text
- the String representing the check box labelAgoColumnButtonCheck health = new AgoColumnButtonCheck(120, true, false, Color.green, AgoColumnBase.BORDER_3D); health.initColumnCheckProperty("health", new AgoFontIdentifier("Dialog", 0, 12), Color.black, AgoColumnBase.ALIGN_LEFT); health.setDisplayText("Health Insurance"); beneformat.appendColumnFormat(health);
AgoColumnButtonCheck.getDisplayText()
public final Object getCheckedValue()
AgoColumnButtonCheck.setCheckedValue(Object value)
,
AgoColumnButtonCheck.setUncheckedValue(Object value)
,
AgoColumnButtonCheck.getUncheckedValue()
public final void setCheckedValue(Object value)
value
- the value to write to the databaseAgoColumnButtonCheck.getCheckedValue()
,
AgoColumnButtonCheck.setUncheckedValue(Object value)
,
AgoColumnButtonCheck.getUncheckedValue()
public final Object getUncheckedValue()
AgoColumnButtonCheck.setUncheckedValue(Object value)
,
AgoColumnButtonCheck.setCheckedValue(Object value)
,
AgoColumnButtonCheck.getCheckedValue()
public final void setUncheckedValue(Object value)
value
- the constant value to be returned by when the check box is uncheckedAgoColumnButtonCheck.getUncheckedValue()
,
AgoColumnButtonCheck.getCheckedValue()
,
AgoColumnButtonCheck.setCheckedValue(Object value)
|
SilverStream Application Server 3.5 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |