|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.springframework.richclient.command.config.CommandButtonIconInfo
public class CommandButtonIconInfo
A parameter object consisting of the various icons that may be displayed on a single command button depending on its state.
The set of states for which this object maintains icons are as follows:
Field Summary | |
---|---|
static CommandButtonIconInfo |
BLANK_ICON_INFO
A CommandButtonIconInfo instance that can be used for command
buttons that have no icon information associated with them. |
Constructor Summary | |
---|---|
CommandButtonIconInfo(Icon icon)
Creates a new CommandButtonIconInfo with the given icon. |
|
CommandButtonIconInfo(Icon icon,
Icon selectedIcon)
Creates a new CommandButtonIconInfo with the given icons. |
|
CommandButtonIconInfo(Icon icon,
Icon selectedIcon,
Icon rolloverIcon)
Creates a new CommandButtonIconInfo with the given icons. |
|
CommandButtonIconInfo(Icon icon,
Icon selectedIcon,
Icon rolloverIcon,
Icon disabledIcon,
Icon pressedIcon)
Creates a new CommandButtonIconInfo with the given icons. |
Method Summary | |
---|---|
AbstractButton |
configure(AbstractButton button)
Configures the given command button with the icon values from this instance. |
boolean |
equals(Object o)
|
Icon |
getDisabledIcon()
Returns the icon to be displayed when the command button is in a disabled state. |
Icon |
getIcon()
Returns the icon associated with the application component, or null. |
Image |
getImage()
Returns the image from the main default icon of this instance if it is actually an instance of an ImageIcon . |
Icon |
getPressedIcon()
Returns the icon to be displayed when the command button is in a pressed state. |
Icon |
getRolloverIcon()
Returns the icon to be displayed when the mouse pointer rolls over the command button. |
Icon |
getSelectedIcon()
Returns the icon to be displayed when the command button is in a selected state. |
int |
hashCode()
|
void |
setDisabledIcon(Icon disabledIcon)
Sets the icon to be displayed when the command button is in a disabled state. |
void |
setIcon(Icon icon)
Sets the main default icon for the command button. |
void |
setPressedIcon(Icon pressedIcon)
Sets the icon to be displayed when the command button is in a pressed state. |
void |
setRolloverIcon(Icon rolloverIcon)
Sets the icon to be displayed when the mouse pointer rolls over the command button. |
void |
setSelectedIcon(Icon selectedIcon)
Sets the icon to be displayed when the command button is in a pressed state. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final CommandButtonIconInfo BLANK_ICON_INFO
CommandButtonIconInfo
instance that can be used for command
buttons that have no icon information associated with them.
Constructor Detail |
---|
public CommandButtonIconInfo(Icon icon)
CommandButtonIconInfo
with the given icon. No
optional icons will be associated with this instance.
icon
- The main displayable icon.public CommandButtonIconInfo(Icon icon, Icon selectedIcon)
CommandButtonIconInfo
with the given icons.
icon
- The main default icon. May be null.selectedIcon
- The icon to be displayed when the command button is
in a selected state. May be null.public CommandButtonIconInfo(Icon icon, Icon selectedIcon, Icon rolloverIcon)
CommandButtonIconInfo
with the given icons.
icon
- The main default icon. May be null.selectedIcon
- The icon to be displayed when the command button is
in a selected state.rolloverIcon
- The icon to be displayed when the mouse pointer rolls
over the command button. May be null.public CommandButtonIconInfo(Icon icon, Icon selectedIcon, Icon rolloverIcon, Icon disabledIcon, Icon pressedIcon)
CommandButtonIconInfo
with the given icons.
icon
- The main default icon. May be null.selectedIcon
- The icon to be displayed when the command button is
in a selected state.rolloverIcon
- The icon to be displayed when the mouse pointer rolls
over the command button. May be null.disabledIcon
- The icon to be displayed when the command button is
in a disabled state. May be null.pressedIcon
- The icon to be displayed when the command button is in
a pressed state. May be null.Method Detail |
---|
public AbstractButton configure(AbstractButton button)
configure
in interface ButtonConfigurer
button
- The button to be configured with icons. Must not be null.
IllegalArgumentException
- if button
is null.public Image getImage()
ImageIcon
.
getImage
in interface VisualizedElement
ImageIcon
.public Icon getIcon()
getIcon
in interface VisualizedElement
public Icon getDisabledIcon()
public Icon getPressedIcon()
public Icon getRolloverIcon()
public Icon getSelectedIcon()
public void setIcon(Icon icon)
icon
- The main default icon for the command button. May be null.public void setDisabledIcon(Icon disabledIcon)
disabledIcon
- The icon for the button in a disabled state. May be
null.public void setPressedIcon(Icon pressedIcon)
pressedIcon
- The icon for the button in a pressed state. May be
null.public void setRolloverIcon(Icon rolloverIcon)
rolloverIcon
- The icon for the button in a rolled over. May be
null.public void setSelectedIcon(Icon selectedIcon)
selectedIcon
- The icon for the button in a pressed state. May be
null.public String toString()
toString
in class Object
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |