|
||||||||||
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 |
---|
lLastTranslationModified, parent |
Fields inherited from class javax.rad.genui.UIResource |
---|
uiResource |
Fields inherited from interface javax.rad.ui.IAlignmentConstants |
---|
ALIGN_BOTTOM, ALIGN_CENTER, 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, setAccelerator, setActionCommand, setHorizontalAlignment, setImage, setMargins, setMargins, setText, setVerticalAlignment, updateTranslation |
Methods inherited from class javax.rad.genui.UIResource |
---|
equals, getUIResource, hashCode, 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, setImage |
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 IButton
IButton.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 IButton
pImageTextGap
- the image gapIButton.getImageTextGap()
public void setVerticalTextPosition(int pVerticalPosition)
setVerticalTextPosition
in interface IButton
pVerticalPosition
- one of the following values:
public int getVerticalTextPosition()
getVerticalTextPosition
in interface IButton
public void setHorizontalTextPosition(int pHorizontalPosition)
setHorizontalTextPosition
in interface IButton
pHorizontalPosition
- one of the following values:
public int getHorizontalTextPosition()
getHorizontalTextPosition
in interface IButton
public boolean isBorderOnMouseEntered()
isBorderOnMouseEntered
in interface IButton
public void setBorderOnMouseEntered(boolean pBorderOnMouseEntered)
setBorderOnMouseEntered
in interface IButton
pBorderOnMouseEntered
- 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 IButton
pBorderPainted
- true
to paint the border, otherwise false
public boolean isBorderPainted()
isBorderPainted
in interface IButton
true
when the border will be painted, otherwise false
public void setMouseOverImage(IImage pImage)
setMouseOverImage
in interface IButton
pImage
- the mouse over imagepublic IImage getMouseOverImage()
getMouseOverImage
in interface IButton
public void setPressedImage(IImage pImage)
setPressedImage
in interface IButton
pImage
- the mouse pressed imagepublic IImage getPressedImage()
getPressedImage
in interface IButton
public 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 IButton
pDefault
- true
to set this button as default button, otherwise false
IButton.isDefaultButton()
public boolean isDefaultButton()
defaultButton
property,
which if true
means that this button is the current
default button.
isDefaultButton
in interface IButton
true
if this button is defined as default button, otherwise false
IButton.setDefaultButton(boolean)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |