|
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.AgoColumnButtonRadio
AgoColumnButtonRadio is a bound column that represents a single database column or a variable. A set of such columns allow users to select a single value from a limited set of values. They can represent any data type. Radio button columns, unlike check box columns, generally operate as a group, so only one of the group can be selected at a time.
Follow these steps to create a group of radio buttons:
Constructor Summary | |
AgoColumnButtonRadio(int width,
boolean visible,
boolean transparent,
Color backgroundColor,
int borderType)
|
Method Summary | |
Color |
getColor()
Returns the column's text color. |
String |
getDisplayText()
Returns the String representing the column's label. |
AgoFontIdentifier |
getFontIdentifier()
Returns the SilverStream font object (AgoFontIdentifier) for column's text. |
String |
getGroup()
Returns name of the radio button group or null if the button is not part of a group. |
Object |
getPressedValue()
Returns the value that is written to the database when the radio button is pressed. |
String |
getPropertyName()
Returns the name of the database column whose value will be changed when the button is pressed. |
void |
initColumnRadioProperty(String propertyName,
AgoFontIdentifier fontid,
Color textColor,
int alignment)
Sets up a number of parameters for the radio button column. |
void |
setColor(Color color)
Sets the column's text color. |
void |
setDisplayText(String text)
Sets the column's label text. |
void |
setFontIdentifier(AgoFontIdentifier fontid)
Sets the SilverStream font object (AgoFontIdentifier) for the column's text. |
void |
setGroup(String group)
Sets the radio button group. |
void |
setPressedValue(Object value)
Sets the value that is written to the database when this radio button is pressed. |
void |
setPropertyName(String propertyName)
Sets the name of the database column whose value will be changed when this button is pressed. |
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 AgoColumnButtonRadio(int width, boolean visible, boolean transparent, Color backgroundColor, int borderType)
width
- the column width, in pixelsvisible
- 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 columntransparent
- the "transparent" property for the column. Set to true to make it transparentbackgroundColor
- the java.awt.Color object that specifies the column's background colorborderType
- the symbolic constant that specifies the desired border. See AgoColumnBase
for the valid typesAgoColumnButtonRadio gender = new AgoColumnButtonRadio(120, true, false, Color.green, AgoColumnBase.BORDER_NONE);
AgoColumnBase
Method Detail |
public void initColumnRadioProperty(String propertyName, AgoFontIdentifier fontid, Color textColor, int alignment)
propertyName
- the name of the database column to which this radio column is
bound. The data type of the corresponding database column must be Boolean, or you must also call the
setPressedValue() method to specify a constant value (of the appropriate data type) that is written to the database when the column is checked.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 documentationAgoColumnButtonRadio gender = new AgoColumnButtonRadio(120,true, false,Color.green,0); gender.initColumnRadioProperty("gender", new AgoFontIdentifier("Dialog", 0, 12), Color.black, AgoColumnBase.ALIGN_LEFT); gender.setPressedValue("M");
AgoColumnBase
,
AgoColumnButtonRadio.setPressedValue(Object value)
,
AgoColumnButtonRadio.setPropertyName(String propertyName)
public final AgoFontIdentifier getFontIdentifier()
The Font Style can be one of these values:
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.
AgoFontIdentifier font; font = myColumn.getFontIdentifier();
AgoFontIdentifier
,
AgoColumnButtonRadio.setFontIdentifier(AgoFontIdentifier fontid)
public final void setFontIdentifier(AgoFontIdentifier fontid)
fontid
- a SilverStream font objectThe 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
,
AgoColumnButtonRadio.getFontIdentifier()
public final Color getColor()
Color textColor = myColumn.getColor();
AgoColumnButtonRadio.setColor(Color color)
public final void setColor(Color color)
color
- a java.awt.Color objectmyColumn.setColor(Color.green);
AgoColumnButtonRadio.setColor(Color color)
public final String getPropertyName()
String propName = gender.getPropertyName();
AgoColumnButtonRadio.setPropertyName(String propertyName)
,
AgoColumnButtonRadio.initColumnRadioProperty(String propertyName, AgoFontIdentifier fontid, Color textColor, int alignment)
,
AgoColumnButtonRadio.setPressedValue(Object value)
public final void setPropertyName(String propertyName)
propertyName
- the data column to bind tocom.sssw.rt.tview.AgoColumnButtonRadio gender1; gender1 = new com.sssw.rt.tview.AgoColumnButtonRadio(100, true, false, Color.white, AgoColumnBase.BORDER_NONE); gender1.setPropertyName("gender"); gender1.setPressedValue("M");
AgoColumnButtonRadio.getPropertyName()
,
AgoColumnButtonRadio.setPressedValue(Object value)
,
AgoColumnButtonRadio.initColumnRadioProperty(String propertyName, AgoFontIdentifier fontid, Color textColor, int alignment)
public final Object getPressedValue()
empGender = gender.getPressedValue();
AgoColumnButtonRadio.setPressedValue(Object value)
public final void setPressedValue(Object value)
value
- the value to write to the database column when radio button is pressed. It must be an appropriate data type for the database column.gender.setPressedValue("F");
AgoColumnButtonRadio.getPressedValue()
,
AgoColumnButtonRadio.setPropertyName(String propertyName)
,
AgoColumnButtonRadio.initColumnRadioProperty(String propertyName, AgoFontIdentifier fontid, Color textColor, int alignment)
public final String getDisplayText()
AgoColumnButtonRadio health = new AgoColumnButtonRadio(120, true, false, Color.green, AgoColumnBase.BORDER_NONE); health.initColumnRadioProperty("health", new AgoFontIdentifier("Dialog", 0, 12), Color.black, AgoColumnBase.ALIGN_LEFT); health.setDisplayText("Health Insurance"); String info = health.getDisplayText();
AgoColumnButtonRadio.setDisplayText(String text)
public final void setDisplayText(String text)
text
- the String representing the radio button's labelAgoColumnButtonRadio health = new AgoColumnButtonRadio(120, true, false, Color.green, AgoColumnBase.BORDER_NONE); health.initColumnRadioProperty("health", new AgoFontIdentifier("Dialog", 0, 12), Color.black, AgoColumnBase.ALIGN_LEFT); health.setDisplayText("Health Insurance"); beneformat.appendColumnFormat(health);
AgoColumnButtonRadio.getDisplayText()
public final String getGroup()
String groupName = gender.getGroup();
AgoColumnButtonRadio.setGroup(String group)
public final void setGroup(String group)
group
- the name of the radio button groupgender.setGroup("rb1");
AgoColumnButtonRadio.getGroup()
|
SilverStream Application Server 3.5 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |