javax.rad.ui.component
Interface IActionComponent

All Superinterfaces:
IAlignmentConstants, IComponent, IIcon, ILabel, INamedObject, IResource
All Known Subinterfaces:
IButton, ICheckBox, ICheckBoxMenuItem, IMenu, IMenuItem, IRadioButton, IToggleActionComponent, IToggleButton
All Known Implementing Classes:
AbstractUIActionComponent, AbstractUIButton, AbstractUIMenuItem, AbstractUIToggleButton, SwingAbstractButton, SwingButton, SwingCheckBox, SwingCheckBoxMenuItem, SwingMenu, SwingMenuItem, SwingRadioButton, SwingToggleButton, UIButton, UICheckBox, UICheckBoxMenuItem, UIMenu, UIMenuItem, UIRadioButton, UIToggleButton

public interface IActionComponent
extends IIcon, ILabel

Platform and technology independent action component definition. It is designed for use with AWT, Swing, SWT, JSP, JSF, ... .

See Also:
Button, JButton

Field Summary
 
Fields inherited from interface javax.rad.ui.IAlignmentConstants
ALIGN_BOTTOM, ALIGN_CENTER, ALIGN_LEFT, ALIGN_RIGHT, ALIGN_STRETCH, ALIGN_TOP
 
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.
 IInsets getMargins()
          Returns the margin between the component's border and the text.
 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 setMargins(IInsets pMargins)
          Sets space for margin between the button's border and the text.
 
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.IComponent
capture, eventComponentMoved, eventComponentResized, eventKeyPressed, eventKeyReleased, eventKeyTyped, eventMouseClicked, eventMouseEntered, eventMouseExited, eventMousePressed, eventMouseReleased, getBackground, getBounds, getCursor, getEventSource, getFactory, getFont, getForeground, getLocation, getLocationRelativeTo, getMaximumSize, getMinimumSize, getName, getParent, getPreferredSize, getSize, getToolTipText, isBackgroundSet, isCursorSet, isEnabled, isFocusable, isFontSet, isForegroundSet, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isVisible, requestFocus, setBackground, setBounds, setCursor, setEnabled, setEventSource, setFocusable, setFont, setForeground, setLocation, setLocationRelativeTo, setMaximumSize, setMinimumSize, setName, setParent, setPreferredSize, setSize, setToolTipText, setVisible
 
Methods inherited from interface javax.rad.ui.IResource
getResource
 
Methods inherited from interface javax.rad.ui.IAlignmentConstants
getHorizontalAlignment, getVerticalAlignment, setHorizontalAlignment, setVerticalAlignment
 

Method Detail

setAccelerator

void setAccelerator(Key pKey)
Sets the key combination which invokes the component's action listeners without selecting. It is the UI's responsibility to install the correct action.

Parameters:
pKey - the Key which will serve as an accelerator

getAccelerator

Key getAccelerator()
Returns the Key which serves as an accelerator for the button.

Returns:
a Key object identifying the accelerator key

getActionCommand

String getActionCommand()
Returns the command name of the action event fired by this action component. If the command name is null (default) then this method returns the label of the button.

Returns:
the action command.

setActionCommand

void setActionCommand(String pActionCommand)
Sets the command name for the action event fired by this action component. By default this action command is set to match the label of the button.

Parameters:
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.
See Also:
ActionEvent

eventAction

ActionHandler eventAction()
The EventHandler for the action event.

Returns:
the EventHandler for the action event.

setMargins

void setMargins(IInsets pMargins)
Sets space for margin between the button's border and the text. Setting to null will cause the action component to use the default margin.

Parameters:
pMargins - the space between the border and the test

getMargins

IInsets getMargins()
Returns the margin between the component's border and the text.

Returns:
an IInsets object specifying the margin between the component's border and the text
See Also:
setMargins(IInsets)


Copyright © 2009 SIB Visions GmbH. All Rights Reserved.