|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.rad.genui.UIResource<C>
javax.rad.genui.UIComponent<C>
javax.rad.genui.component.AbstractUIActionComponent<C>
javax.rad.genui.component.AbstractUIButton<C>
C - instance of IButtonpublic abstract class AbstractUIButton<C extends IButton>
Platform and technology independent button. It is designed for use with AWT, Swing, SWT, JSP, JSF, ... .
| Field Summary |
|---|
| Fields inherited from class javax.rad.genui.UIComponent |
|---|
bTranslate, lLastTranslationModified, parent, popupMenu |
| Fields inherited from class javax.rad.genui.UIResource |
|---|
uiResource |
| Fields inherited from interface javax.rad.ui.IAlignmentConstants |
|---|
ALIGN_BOTTOM, ALIGN_CENTER, ALIGN_DEFAULT, ALIGN_LEFT, ALIGN_RIGHT, ALIGN_STRETCH, ALIGN_TOP |
| Constructor Summary | |
|---|---|
protected |
AbstractUIButton(C pButton)
Creates a new instance of AbstractUIButton. |
| Method Summary | |
|---|---|
int |
getHorizontalTextPosition()
Returns the horizontal position of the text relative to the icon. |
int |
getImageTextGap()
Returns the amount of space between the text and the icon displayed in this button. |
IImage |
getMouseOverImage()
Gets the image for the button when the mouse is over. |
IImage |
getPressedImage()
Gets the image for the button when the button is pressed. |
int |
getVerticalTextPosition()
Returns the vertical position of the text relative to the icon. |
boolean |
isBorderOnMouseEntered()
Gets, if the border should only be shown on mouse entered. |
boolean |
isBorderPainted()
Gets whether the border will be painted. |
boolean |
isDefaultButton()
Gets the value of the defaultButton property,
which if true means that this button is the current
default button. |
void |
setBorderOnMouseEntered(boolean pBorderOnMouseEntered)
Sets, if the border should only be shown on mouse entered. |
void |
setBorderPainted(boolean pBorderPainted)
Sets whether the border will be painted. |
void |
setDefaultButton(boolean pDefault)
Sets the defaultButton property. |
void |
setHorizontalTextPosition(int pHorizontalPosition)
Sets the horizontal position of the text relative to the icon. |
void |
setImageTextGap(int pImageTextGap)
If both the icon and text properties are set, this property defines the space between them. |
void |
setMouseOverImage(IImage pImage)
Sets the image for the button when the mouse is over. |
void |
setPressedImage(IImage pImage)
Sets the image for the button when the button is pressed. |
void |
setVerticalTextPosition(int pVerticalPosition)
Sets the vertical position of the text relative to the icon. |
| Methods inherited from class javax.rad.genui.component.AbstractUIActionComponent |
|---|
eventAction, getAccelerator, getActionCommand, getHorizontalAlignment, getImage, getMargins, getText, getVerticalAlignment, isPreserveAspectRatio, setAccelerator, setActionCommand, setHorizontalAlignment, setImage, setMargins, setMargins, setPreserveAspectRatio, setText, setVerticalAlignment, updateTranslation |
| Methods inherited from class javax.rad.genui.UIResource |
|---|
eventResourceChanged, eventResourceChanged, fireResourceChanged, getObject, getObjectNames, getUIResource, hasResourceHandler, putObject, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface javax.rad.ui.component.IActionComponent |
|---|
eventAction, getAccelerator, getActionCommand, getMargins, setAccelerator, setActionCommand, setMargins |
| Methods inherited from interface javax.rad.ui.component.IIcon |
|---|
getImage, isPreserveAspectRatio, setImage, setPreserveAspectRatio |
| Methods inherited from interface javax.rad.ui.component.ILabel |
|---|
getText, setText |
| Methods inherited from interface javax.rad.ui.IResource |
|---|
getResource |
| Methods inherited from interface javax.rad.ui.IAlignmentConstants |
|---|
getHorizontalAlignment, getVerticalAlignment, setHorizontalAlignment, setVerticalAlignment |
| Constructor Detail |
|---|
protected AbstractUIButton(C pButton)
AbstractUIButton.
pButton - the IButton.IButton| Method Detail |
|---|
public int getImageTextGap()
getImageTextGap in interface IButtonIButton.setImageTextGap(int)public void setImageTextGap(int pImageTextGap)
The default value of this property is 4 pixels.
This is a JavaBeans bound property.
setImageTextGap in interface IButtonpImageTextGap - the image gapIButton.getImageTextGap()public void setVerticalTextPosition(int pVerticalPosition)
setVerticalTextPosition in interface IButtonpVerticalPosition - one of the following values:
public int getVerticalTextPosition()
getVerticalTextPosition in interface IButtonpublic void setHorizontalTextPosition(int pHorizontalPosition)
setHorizontalTextPosition in interface IButtonpHorizontalPosition - one of the following values:
public int getHorizontalTextPosition()
getHorizontalTextPosition in interface IButtonpublic boolean isBorderOnMouseEntered()
isBorderOnMouseEntered in interface IButtonpublic void setBorderOnMouseEntered(boolean pBorderOnMouseEntered)
setBorderOnMouseEntered in interface IButtonpBorderOnMouseEntered - true, if the border should only be shown on mouse entered.public void setBorderPainted(boolean pBorderPainted)
true, the border will be painted.
The default value is that the border will be painted.
setBorderPainted in interface IButtonpBorderPainted - true to paint the border, otherwise falsepublic boolean isBorderPainted()
isBorderPainted in interface IButtontrue when the border will be painted, otherwise falsepublic void setMouseOverImage(IImage pImage)
setMouseOverImage in interface IButtonpImage - the mouse over imagepublic IImage getMouseOverImage()
getMouseOverImage in interface IButtonpublic void setPressedImage(IImage pImage)
setPressedImage in interface IButtonpImage - the mouse pressed imagepublic IImage getPressedImage()
getPressedImage in interface IButtonpublic void setDefaultButton(boolean pDefault)
defaultButton property.
The default button is the button which will be activated
when a UI-defined activation event (typically the Enter key)
occurs, regardless of whether or not the button
has keyboard focus (unless there is another component within
which consumes the activation event)
For default activation to work, the button must be enabled.
setDefaultButton in interface IButtonpDefault - true to set this button as default button, otherwise falseIButton.isDefaultButton()public boolean isDefaultButton()
defaultButton property,
which if true means that this button is the current
default button.
isDefaultButton in interface IButtontrue if this button is defined as default button, otherwise falseIButton.setDefaultButton(boolean)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||