|
SilverStream Application Server 3.5 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Button | +--com.sssw.rt.atlas.AtButton | +--com.sssw.rt.form.AgcButtonText
The AgcButtonText control (Text Button), unlike the other buttons in the SilverStream control set, is not a data bound control. Text Button controls let users execute actions.
Typically the programmer defines the actions that execute on the button's actionPerformed event. A Text Button control might be used in a database application where the user presses buttons to add, delete, or navigate records.
Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT,
CENTER_ALIGNMENT,
LEFT_ALIGNMENT,
RIGHT_ALIGNMENT,
TOP_ALIGNMENT |
Constructor Summary | |
AgcButtonText()
|
Method Summary | |
Color |
getBackgroundColor()
Deprecated. replaced by Component.getBackground() . |
AgoFontIdentifier |
getFontIdentifier()
Returns the SilverStream font object (AgoFontIdentifier) for the control's text. |
String |
getText()
Gets the text that is displayed on the button. |
Color |
getTextColor()
Deprecated. replaced by Component.getForeground() . |
void |
setBackgroundColor(Color backgroundcolor)
Deprecated. replaced by Component.setBackground(Color) . |
void |
setFontIdentifier(AgoFontIdentifier fontidentifier)
Assigns the SilverStream font object (AgoFontIdentifier) to the control's text. |
void |
setText(String text)
Sets the text that is displayed on the button. |
void |
setTextColor(Color color)
Deprecated. replaced by Component.setForeground(Color) . |
void |
simulateClick()
Simulates the user pressing the text button. |
Methods inherited from class com.sssw.rt.atlas.AtButton |
deliverMouseEvent,
deliverMouseMoveEvent,
doAtCommand,
enableAtCommands,
fireActionPerformed,
getHelper,
getToolTipText,
getToolTipText,
grabFocus,
isFocusTraversable,
isRequestFocusEnabled,
preprocessKeyEvent,
processActionEvent,
processEvent,
requestFocus,
setRequestFocusEnabled,
setToolTipText |
Methods inherited from class java.awt.Button |
addActionListener,
addNotify,
getActionCommand,
getLabel,
paramString,
removeActionListener,
setActionCommand,
setLabel |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Constructor Detail |
public AgcButtonText()
Method Detail |
public AgoFontIdentifier getFontIdentifier()
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 Style can be one of these values:
The Font Size can be any integer.
The following code fragment illustrates how to construct a new AgoFontIdentifier object (called newFont) and how to call the getFontIdentifier() method:
AgoFontIdentifier font; font = ControlName1.getFontIdentifier();
AgcButtonText.setFontIdentifier(AgoFontIdentifier)
public void setFontIdentifier(AgoFontIdentifier fontidentifier)
fontidentifier
- specifies the AgoFontIdentifier object that assigns the font for the control.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 Style can be one of these values:
The Font Size can be any integer.
This code fragment illustrates how to construct a new AgoFontIdentifier object (called newFont) and how to call the setFontIdentifier() method:
AgoFontIdentifier newFont; String newName; int newSize; int newStyle; newName="TimesRoman"; newSize=20; newStyle=AgoFontIdentifier.ITALIC; newFont=new AgoFontIdentifier(newName, newStyle, newSize); ControlName1.setFontIdentifier(newFont);
AgcButtonText.getFontIdentifier()
public String getText()
public void setText(String text)
public Color getBackgroundColor()
Component.getBackground()
.
Set the control's background Color at runtime using the setBackgroundColor() method.
This example illustrates how to obtain the background Color of a control.
Color bgColor; bgColor = ControlName1.getBackgroundColor();
AgcButtonText.setBackgroundColor(Color)
public void setBackgroundColor(Color backgroundcolor)
Component.setBackground(Color)
.
backgroundcolor
- the instance of a java.awt.Color object or one of the Color constants, for example,
Color.red.For controls that support it, the Transparent property must be false for the background Color to show.
The following example illustrates how to set the background Color on a control using one of the Color constants:
ControlName1.setBackgroundColor(Color.white);
This example illustrates how to create a new Color and then use it to set the background Color:
Color colLabelColor = new Color(247, 247, 222); ControlName1.setBackgroundColor(colLabelColor);
AgcButtonText.getBackgroundColor()
public Color getTextColor()
Component.getForeground()
.
The following code fragment illustrates how to use the getTextColor() method.
Color c; c = ControlName1.getTextColor();
AgcButtonText.setTextColor(Color)
public void setTextColor(Color color)
Component.setForeground(Color)
.
color
- The following code fragment illustrates how to set the text Color to red.
ControlName1.setTextColor(Color.red);
public void simulateClick()
The following code fragment illustrates how to use the simulateClick() method.
ControlName1.simulateClick();
|
SilverStream Application Server 3.5 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |