|
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.Container | +--javax.swing.JComponent | +--javax.swing.JPanel | +--com.sssw.rt.atlas.AtPanel | +--com.sssw.rt.form.PvBasePanel | +--com.sssw.rt.form.AgcButtonRaw
A SilverStream framework component.
Inner classes inherited from class javax.swing.JPanel |
JPanel.AccessibleJPanel |
Inner classes inherited from class javax.swing.JComponent |
JComponent.AccessibleJComponent |
Field Summary | |
static int |
IMAGEPOSITION_ABOVE
The image is positioned above the button text. |
static int |
IMAGEPOSITION_BELOW
The image is positioned below the button text. |
static int |
IMAGEPOSITION_BENEATH
The image is positioned underneath the button text. |
static int |
IMAGEPOSITION_LEFT
The image is positioned to the left of the button text. |
static int |
IMAGEPOSITION_RIGHT
The image is positioned to the right of the button text. |
Fields inherited from class com.sssw.rt.atlas.AtPanel |
BGIMAGE_DRAW_CENTERED,
BGIMAGE_DRAW_NORMAL,
BGIMAGE_DRAW_STRETCH,
BGIMAGE_DRAW_TILED |
Fields inherited from class javax.swing.JComponent |
accessibleContext,
listenerList,
TOOL_TIP_TEXT_KEY,
ui,
UNDEFINED_CONDITION,
WHEN_ANCESTOR_OF_FOCUSED_COMPONENT,
WHEN_FOCUSED,
WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT,
CENTER_ALIGNMENT,
LEFT_ALIGNMENT,
RIGHT_ALIGNMENT,
TOP_ALIGNMENT |
Constructor Summary | |
AgcButtonRaw()
|
Method Summary | |
void |
addActionListener(ActionListener listener)
|
String |
getButtonGroup()
Get the button group. |
Image |
getDisabledDownImage()
Get the Image that is displayed when the button is disabled and in the pressed state. |
Color |
getDisabledTextColor()
Get the color that is used for the button text when the button is disabled. |
Image |
getDisabledUpImage()
Get the Image that is displayed when the button is disabled and in the unpressed state. |
Image |
getDownImage()
Get the Image that is displayed when the button is in the pressed state. |
String |
getDownToolTipText()
Get the tooltip text that is displayed when the button is in the pressed state. |
Color |
getForeground()
Gets the color of the button text. |
Image |
getHoverImage()
Get the Image that is displayed when the mouse pointer is over the button. |
boolean |
getHoverMode()
Get the hover mode. |
Color |
getHoverTextColor()
Get the color used for the button text when the mouse pointer is over the button. |
int |
getImagePosition()
Get the location of the button image relative to the button text. |
boolean |
getPush()
Get the push type. |
boolean |
getRadio()
Get the radio type. |
boolean |
getState()
Get the state (pressed or unpressed) of the button. |
String |
getText()
Get the button text. |
Color |
getTextBackgroundColor()
Get the text background color. |
Color |
getTextColor()
Deprecated. replaced by AgcButtonRaw.getForeground() . |
boolean |
getToggle()
Get the toggle type. |
Image |
getUpImage()
Get the Image that is displayed when the button is in the unpressed state. |
Object |
getValue()
Returns the user-specified Object mapped to the current button state. |
void |
removeActionListener(ActionListener listener)
|
void |
setBackground(Color backgroundcolor)
Set the background color. |
void |
setButtonGroup(String buttongroup)
Set the button group. |
void |
setCheckedValue(Object value)
Use this method to set an associated value with the checked state of a button. |
void |
setDisabledDownImage(Image disableddownimage)
Set the Image that is displayed when the button is disabled and in the pressed state. |
void |
setDisabledTextColor(Color disabledtextcolor)
Set the color that is used for the button text when the button is disabled. |
void |
setDisabledUpImage(Image disabledupimage)
Set the Image that is displayed when the button is disabled and in the unpressed state. |
void |
setDownImage(Image pressedimage)
Set the Image that is displayed when the button is in the pressed state. |
void |
setDownToolTipText(String text)
Set the tooltip text that is displayed when the button is in the pressed state. |
void |
setForeground(Color textcolor)
Sets the color of the button text. |
void |
setHoverImage(Image hoverimage)
Set the Image that is displayed when the mouse pointer is over the button. |
void |
setHoverMode(boolean hovermode)
Set the hover mode. |
void |
setHoverTextColor(Color hovertextcolor)
Set the color used for the button text when the mouse pointer is over the button. |
void |
setImagePosition(int imageposition)
Set the location of the button image relative to the button text. |
void |
setPush()
Set the push type. |
void |
setRadio()
Set the radio type. |
void |
setState(boolean state)
Set the state (pressed or unpressed) of the button. |
void |
setText(String text)
Set the button text. |
void |
setTextBackgroundColor(Color textbackgroundcolor)
Set the text background color. |
void |
setTextColor(Color textcolor)
Deprecated. use AgcButtonRaw.setForeground(Color) to set the color of the button text. |
void |
setToggle()
Set the toggle type. |
void |
setUncheckedValue(Object value)
Use this method to set an associated value with the unchecked state of a button. |
void |
setUpImage(Image image)
Set the Image that is displayed when the button is in the unpressed state. |
void |
setValue(Object value)
Sets the value for an AgcCheckBox or group of AgcButtonRadio buttons. |
void |
simulateClick()
Simulate what would happen if the user clicked and released the button. |
Methods inherited from class com.sssw.rt.form.PvBasePanel |
getBackgroundColor,
getFontIdentifier,
setBackgroundColor,
setFontIdentifier |
Methods inherited from class com.sssw.rt.atlas.AtPanel |
addImpl,
addNotify,
clientPaint,
clientPaint,
deliverMouseEvent,
deliverMouseMoveEvent,
doAtCommand,
drawTiledImage,
enableAtCommands,
getBackgroundImage,
getBackgroundImageMode,
getHelper,
getTransparent,
hide,
hideToolTip,
imageUpdate,
isFocusTraversable,
isOptimizedDrawingEnabled,
ownedImage,
paintBorder,
paintComponent,
paintImmediately,
paintImmediately,
paintNow,
preprocessKeyEvent,
processEvent,
reshape,
setBackgroundImage,
setBackgroundImageMode,
setTransparent,
show,
showToolTip |
Methods inherited from class javax.swing.JPanel |
getAccessibleContext,
getUIClassID,
paramString,
updateUI |
Methods inherited from class java.awt.Container |
add,
add,
add,
add,
add,
addContainerListener,
countComponents,
deliverEvent,
doLayout,
findComponentAt,
findComponentAt,
getComponent,
getComponentAt,
getComponentAt,
getComponentCount,
getComponents,
getLayout,
insets,
invalidate,
isAncestorOf,
layout,
list,
list,
locate,
minimumSize,
paintComponents,
preferredSize,
printComponents,
processContainerEvent,
remove,
remove,
removeAll,
removeContainerListener,
setCursor,
setLayout,
validate,
validateTree |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Methods implemented from interface com.sssw.rt.form.AgiControl |
getComponent,
getHelpInfo,
setHelpInfo |
Field Detail |
public static final int IMAGEPOSITION_ABOVE
AgcButtonRaw.getImagePosition()
,
AgcButtonRaw.setImagePosition(int)
public static final int IMAGEPOSITION_BELOW
AgcButtonRaw.getImagePosition()
,
AgcButtonRaw.setImagePosition(int)
public static final int IMAGEPOSITION_BENEATH
AgcButtonRaw.getImagePosition()
,
AgcButtonRaw.setImagePosition(int)
public static final int IMAGEPOSITION_LEFT
AgcButtonRaw.getImagePosition()
,
AgcButtonRaw.setImagePosition(int)
public static final int IMAGEPOSITION_RIGHT
AgcButtonRaw.getImagePosition()
,
AgcButtonRaw.setImagePosition(int)
Constructor Detail |
public AgcButtonRaw()
Method Detail |
public void addActionListener(ActionListener listener)
listener
- public void removeActionListener(ActionListener listener)
listener
- public boolean getPush()
public void setPush()
public boolean getToggle()
public void setToggle()
public boolean getRadio()
public void setRadio()
public String getText()
AgcButtonRaw.setText(String)
public void setText(String text)
text
- the text to set.AgcButtonRaw.getText()
public Color getTextColor()
AgcButtonRaw.getForeground()
.
AgcButtonRaw.setForeground(Color)
,
AgcButtonRaw.getForeground()
public void setTextColor(Color textcolor)
AgcButtonRaw.setForeground(Color)
to set the color of the button text.
textcolor
- an instance of a java.awt.Color object.The text color defaults to the java.awt.Color.black value.
The following code fragment illustrates how to assign a new hover text color.
// Use a light shade of blue for the text color Button1.setDisabledTextColor(new Color(83, 237, 237));
AgcButtonRaw.getTextColor()
public void setForeground(Color textcolor)
textcolor
- an instance of a java.awt.Color object.The text color defaults to the java.awt.Color.black value.
The following code fragment illustrates how to assign a new text color to a button.
// Use a light shade of blue for the text color Button1.setForeground(new Color(83, 237, 237));
AgcButtonRaw.getForeground()
public Color getForeground()
AgcButtonRaw.setForeground(Color)
public Color getHoverTextColor()
AgcButtonRaw.setHoverTextColor(Color)
public void setHoverTextColor(Color hovertextcolor)
hovertextcolor
- an instance of a java.awt.Color object.The hover text color defaults to the java.awt.Color.white value. The hover text color will not be displayed unless the hover mode is set to true.
The following code fragment illustrates how to assign a new hover text color.
// Use a shade of purple for the hover text Button1.setDisabledTextColor(new Color(129, 24, 231));
AgcButtonRaw.getHoverTextColor()
,
AgcButtonRaw.setHoverMode(boolean)
,
AgcButtonRaw.setHoverImage(Image)
public Color getDisabledTextColor()
AgcButtonRaw.setDisabledTextColor(Color)
public void setDisabledTextColor(Color disabledtextcolor)
disabletextcolor
- an instance of a java.awt.Color object.The disabled text color defaults to the java.awt.Color.gray value.
The following code fragment illustrates how to assign a new disabled text color.
// Use a dark shade of gray for the disabled text Button1.setDisabledTextColor(new Color(128, 128, 128));
AgcButtonRaw.getDisabledTextColor()
public void setBackground(Color backgroundcolor)
backgroundcolor
- public Color getTextBackgroundColor()
AgcButtonRaw.setTextBackgroundColor(Color)
public void setTextBackgroundColor(Color textbackgroundcolor)
textbackgroundcolor
- an instance of a java.awt.Color object.AgcButtonRaw.getTextBackgroundColor()
public void setCheckedValue(Object value)
value
-
The value is returned via the getValue()
call depending on what state the
button is in. Used primarily for Radio and Checkbox buttons.
AgcButtonRaw.setUncheckedValue(Object)
,
AgcButtonRaw.getValue()
public void setUncheckedValue(Object value)
value
- The value is returned via the getValue() call depending on what state the button is in. Used primarily for Checkbox buttons; radio buttons ignore this value.
AgcButtonRaw.setCheckedValue(Object)
,
AgcButtonRaw.getValue()
public Object getValue()
AgcButtonRaw.setValue(Object)
,
AgcButtonRaw.setUncheckedValue(Object)
,
AgcButtonRaw.setCheckedValue(Object)
public void setValue(Object value)
value
- an Object that represents the value this button or group should be
set to.The state of the checkbox or button group will reflect the set value. For example, for a radio button if the value is equal to the checked value, that radio button will be set, and all other buttons in the group will be unchecked. A call to getValue() on any of the buttons in the group will return this value. It may be that no radio button is checked, if the value set with this method doesn't match any of the radio buttons' checked values.
AgcButtonRaw.getValue()
public boolean getState()
The state is true if the button is pressed, false if it is unpressed.
AgcButtonRaw.setState(boolean)
public void setState(boolean state)
state
- a boolean value.If the state is set to true if the button appears pressed, if false it appears unpressed.
The following code fragment illustrates how the button state might be set to reflect a mode in the application (the button will be pressed if the application is in find mode, unpressed if it is not).
// call user-defined method to determine the mode boolean findmode = isFindMode(); Button1.setState(findmode);
AgcButtonRaw.getState()
public int getImagePosition()
For a list of return values, see the fields for this class.
AgcButtonRaw.setImagePosition(int)
public void setImagePosition(int imageposition)
imageposition
- an int value.The image position defaults to IMAGEPOSITION_LEFT. For a list of settable values, see the fields for this class.
The following code fragment illustrates how to set the image position.
// Set the image position such that the button text is drawn below the button image Button1.setImagePosition(AgcButtonRaw.IMAGEPOSITION_ABOVE);
AgcButtonRaw.getImagePosition()
public String getButtonGroup()
public void setButtonGroup(String buttongroup)
buttongroup
- a string identifier for this group.public Image getUpImage()
AgcButtonRaw.setUpImage(Image)
public void setUpImage(Image image)
image
- an instance of a java.awt.Image object.
The following code fragment illustrates how to assign an image to a button.
This example obtains the image from the current database using the getImage()
method.
Image img; img = getImage("up.gif"); Button1.setUpImage(img);
AgcButtonRaw.getUpImage()
public Image getDownImage()
AgcButtonRaw.setDownImage(Image)
public void setDownImage(Image pressedimage)
pressedimage
- an instance of a java.awt.Image object.
The following code fragment illustrates how to assign an image to a button.
This example obtains the image from the current database using the getImage()
method.
Image img; img = getImage("down.gif"); Button1.setDownImage(img);
AgcButtonRaw.getDownImage()
public Image getHoverImage()
AgcButtonRaw.setHoverImage(Image)
public void setHoverImage(Image hoverimage)
hoverimage
- an instance of a java.awt.Image object.The hover image will not be displayed unless the hover mode is set to true.
The following code fragment illustrates how to assign an image to a button.
This example obtains the image from the current database using the getImage()
method.
Image img; img = getImage("hover.gif"); Button1.setHoverImage(img);
AgcButtonRaw.getHoverImage()
,
AgcButtonRaw.setHoverMode(boolean)
public Image getDisabledUpImage()
AgcButtonRaw.setDisabledUpImage(Image)
public void setDisabledUpImage(Image disabledupimage)
disabledupimage
- an instance of a java.awt.Image object.
The following code fragment illustrates how to assign an image to a button.
This example obtains the image from the current database using the getImage()
method.
Image img; img = getImage("disabledup.gif"); Button1.setDisabledUpImage(img);
AgcButtonRaw.getDisabledUpImage()
public Image getDisabledDownImage()
AgcButtonRaw.setDisabledDownImage(Image)
public void setDisabledDownImage(Image disableddownimage)
disableddownimage
- an instance of a java.awt.Image object.
The following code fragment illustrates how to assign an image to a button.
This example obtains the image from the current database using the getImage()
method.
Image img; img = getImage("disableddown.gif"); Button1.setDisabledDownImage(img);
AgcButtonRaw.getDisabledDownImage()
public void setDownToolTipText(String text)
text
- a java.lang.String object.If the down tooltip text is not specified, the regular tooltip text is displayed when the button is in the pressed state.
The following code fragment illustrates how to set the down tooltip text.
Button1.setDownToolTipText("Turn off find mode");
AgcButtonRaw.getDownToolTipText()
,
AgiControl.setToolTipText(String)
,
AgiControl.getToolTipText()
public String getDownToolTipText()
AgcButtonRaw.setDownToolTipText(String)
public boolean getHoverMode()
The hover mode specifies whether the button image or button text color should change when the mouse pointer is over the button.
AgcButtonRaw.setHoverMode(boolean)
,
AgcButtonRaw.setHoverImage(Image)
,
AgcButtonRaw.setHoverTextColor(Color)
public void setHoverMode(boolean hovermode)
hovermode
- a boolean value.When the hover mode is set to true, the hover image and/or the hover text color is displayed when the mouse pointer is over the button).
AgcButtonRaw.getHoverMode()
,
AgcButtonRaw.setHoverImage(Image)
,
AgcButtonRaw.setHoverTextColor(Color)
public void simulateClick()
This method causes the application to:
|
SilverStream Application Server 3.5 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |