|
||||||||||
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>
C
- instance of IActionComponentpublic abstract class AbstractUIActionComponent<C extends IActionComponent>
Platform and technology independent action component. 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 |
AbstractUIActionComponent(C pActionComponent)
Creates a new instance of AbstractUIActionComponent . |
Method Summary | |
---|---|
ActionHandler |
eventAction()
The EventHandler for the action event. |
Key |
getAccelerator()
Returns the Key which serves as an accelerator
for the button. |
String |
getActionCommand()
Returns the command name of the action event fired by this action component. |
int |
getHorizontalAlignment()
Returns the alignment along the x axis. |
IImage |
getImage()
Returns the default image. |
IInsets |
getMargins()
Returns the margin between the component's border and the text. |
String |
getText()
Returns the text string that the label displays. |
int |
getVerticalAlignment()
Returns the alignment along the y axis. |
void |
setAccelerator(Key pKey)
Sets the key combination which invokes the component's action listeners without selecting. |
void |
setActionCommand(String pActionCommand)
Sets the command name for the action event fired by this action component. |
void |
setHorizontalAlignment(int pHorizontalAlignment)
Sets the horizontal alignment. |
void |
setImage(IImage pImage)
Sets the default image. |
void |
setMargins(IInsets pMargins)
Sets space for margin between the button's border and the text. |
void |
setMargins(int pTop,
int pLeft,
int pBottom,
int pRight)
Sets the insets with primitive types. |
void |
setText(String pText)
Defines the single line of text this component will display. |
void |
setVerticalAlignment(int pVerticalAlignment)
Sets the vertical alignment. |
void |
updateTranslation()
Notification for updating the translation. |
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.IResource |
---|
getResource |
Constructor Detail |
---|
protected AbstractUIActionComponent(C pActionComponent)
AbstractUIActionComponent
.
pActionComponent
- the IActionComponent
.IActionComponent
Method Detail |
---|
public String getText()
getText
in interface ILabel
ILabel.setText(java.lang.String)
public void setText(String pText)
setText
in interface ILabel
pText
- the textpublic IImage getImage()
getImage
in interface IIcon
IIcon.setImage(IImage)
public void setImage(IImage pImage)
setImage
in interface IIcon
pImage
- the imageIIcon.getImage()
public int getHorizontalAlignment()
getHorizontalAlignment
in interface IAlignmentConstants
public void setHorizontalAlignment(int pHorizontalAlignment)
setHorizontalAlignment
in interface IAlignmentConstants
pHorizontalAlignment
- the new vertical alignmentpublic int getVerticalAlignment()
getVerticalAlignment
in interface IAlignmentConstants
public void setVerticalAlignment(int pVerticalAlignment)
setVerticalAlignment
in interface IAlignmentConstants
pVerticalAlignment
- the new vertical alignmentpublic void setAccelerator(Key pKey)
setAccelerator
in interface IActionComponent
pKey
- the Key
which will serve as an acceleratorpublic Key getAccelerator()
Key
which serves as an accelerator
for the button.
getAccelerator
in interface IActionComponent
Key
object identifying the accelerator keypublic String getActionCommand()
null
(default) then this method
returns the label of the button.
getActionCommand
in interface IActionComponent
public void setActionCommand(String pActionCommand)
setActionCommand
in interface IActionComponent
pActionCommand
- a string used to set the action command.
If the string is null
then the action command
is set to match the text of the action component.ActionEvent
public ActionHandler eventAction()
eventAction
in interface IActionComponent
public IInsets getMargins()
getMargins
in interface IActionComponent
IInsets
object specifying the margin
between the component's border and the textIActionComponent.setMargins(IInsets)
public void setMargins(IInsets pMargins)
null
will cause the action component to
use the default margin.
setMargins
in interface IActionComponent
pMargins
- the space between the border and the testpublic void setMargins(int pTop, int pLeft, int pBottom, int pRight)
pTop
- the top insets.pLeft
- the left insets.pBottom
- the bottom insets.pRight
- the right insets.public void updateTranslation()
UIComponent
will be added to a displayable containment hierarchy,
when its containment hierarchy is made displayable or the translation table will
be changed.
updateTranslation
in class UIComponent<C extends IActionComponent>
UIComponent.setTranslation(TranslationMap)
,
UIComponent.addNotify()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |