|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.springframework.binding.value.support.AbstractPropertyChangePublisher
org.springframework.richclient.command.config.CommandFaceDescriptor
public class CommandFaceDescriptor
A parameter object that contains the information to describe the visual representation of a command object.
Field Summary | |
---|---|
static String |
ICON_INFO_PROPERTY
The property name used when firing events for the iconInfo property. |
static String |
ICON_PROPERTY
The property name used when firing events for the icon property. |
static String |
LABEL_INFO_PROPERTY
The property name used when firing events for the labelInfo property. |
static String |
LARGE_ICON_INFO_PROPERTY
The property name used when firing events for the largeIconInfo property. |
static String |
LARGE_ICON_PROPERTY
The property name used when firing events for the largeIcon property. |
Fields inherited from class org.springframework.binding.value.support.AbstractPropertyChangePublisher |
---|
logger |
Fields inherited from interface org.springframework.richclient.core.DescribedElement |
---|
CAPTION_PROPERTY, DESCRIPTION_PROPERTY, DISPLAY_NAME_PROPERTY |
Constructor Summary | |
---|---|
CommandFaceDescriptor()
Creates a new CommandFaceDescriptor with a blank label and no icon or caption. |
|
CommandFaceDescriptor(CommandButtonLabelInfo labelInfo)
Creates a new CommandFaceDescriptor whose label information is provided by the
given CommandButtonLabelInfo instance. |
|
CommandFaceDescriptor(String encodedLabel)
Creates a new CommandFaceDescriptor that uses the given encoded label descriptor
to provide the label properties. |
|
CommandFaceDescriptor(String encodedLabel,
Icon icon,
String caption)
Creates a new CommandFaceDescriptor that uses the given encoded label descriptor
to provide the label properties, along with the given icon and caption. |
Method Summary | |
---|---|
void |
configure(AbstractButton button,
AbstractCommand command,
CommandButtonConfigurer configurer)
Configures the given button and command using the given configurer and the information contained in this instance. |
void |
configure(Action action)
Configures the given action with the information contained in this descriptor. |
void |
configureIcon(AbstractButton button)
Configures the given button with the icon information contained in this descriptor. |
void |
configureIconInfo(AbstractButton button,
boolean useLargeIcons)
Configures the given button with the icon information contained in this descriptor. |
void |
configureLabel(AbstractButton button)
Configures the given button with the label information contained in this descriptor. |
KeyStroke |
getAccelerator()
Returns the keystroke accelerator associated with the command. |
String |
getCaption()
Returns the caption for this object. |
String |
getDescription()
Returns a description of this object. |
String |
getDisplayName()
Returns the display name of this object. |
Icon |
getIcon()
Returns the icon associated with the application component, or null. |
protected CommandButtonIconInfo |
getIconInfo()
Returns the label information for the command. |
Image |
getImage()
Returns the image associated with the application component, or null. |
protected CommandButtonLabelInfo |
getLabelInfo()
Returns the command button label info object. |
Icon |
getLargeIcon()
Returns the main default large icon associated with the command. |
protected CommandButtonIconInfo |
getLargeIconInfo()
Returns the large icon information object for the command. |
int |
getMnemonic()
Returns the mnemonic to be associated with the command. |
int |
getMnemonicIndex()
Returns the zero-based index of the mnemonic character within the label text associated with the command. |
String |
getText()
Returns the label text specified by this descriptor. |
boolean |
isBlank()
Returns true if no command label information is provided by this descriptor. |
void |
setButtonLabelInfo(String encodedLabelInfo)
Sets the label information for the command using the given encoded label descriptor. |
void |
setCaption(String shortDescription)
|
void |
setDescription(String longDescription)
|
void |
setIcon(Icon icon)
Set the main default icon to be associated with the command. |
void |
setIconInfo(CommandButtonIconInfo iconInfo)
|
void |
setLabelInfo(CommandButtonLabelInfo labelInfo)
|
void |
setLargeIcon(Icon icon)
Sets the main default large icon for the command. |
void |
setLargeIconInfo(CommandButtonIconInfo largeIconInfo)
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String LABEL_INFO_PROPERTY
labelInfo
property.
public static final String ICON_PROPERTY
icon
property.
public static final String LARGE_ICON_PROPERTY
largeIcon
property.
public static final String ICON_INFO_PROPERTY
iconInfo
property.
public static final String LARGE_ICON_INFO_PROPERTY
largeIconInfo
property.
Constructor Detail |
---|
public CommandFaceDescriptor(String encodedLabel)
CommandFaceDescriptor
that uses the given encoded label descriptor
to provide the label properties.
encodedLabel
- The encoded label descriptor. May be null or empty to define a blank label.CommandButtonLabelInfo.valueOf(String)
public CommandFaceDescriptor(String encodedLabel, Icon icon, String caption)
CommandFaceDescriptor
that uses the given encoded label descriptor
to provide the label properties, along with the given icon and caption.
encodedLabel
- The encoded label descriptor. May be null or empty.icon
- The main default icon to be displayed by the command. May be null.caption
- The caption to be displayed on rollover of the command. May be null or empty.CommandButtonLabelInfo.valueOf(String)
public CommandFaceDescriptor()
CommandFaceDescriptor
with a blank label and no icon or caption.
public CommandFaceDescriptor(CommandButtonLabelInfo labelInfo)
CommandFaceDescriptor
whose label information is provided by the
given CommandButtonLabelInfo
instance.
labelInfo
- The label information for the command.Method Detail |
---|
public boolean isBlank()
public String getText()
public String getDisplayName()
getDisplayName
in interface DescribedElement
null
.public String getCaption()
getCaption
in interface DescribedElement
null
.public String getDescription()
getDescription
in interface DescribedElement
null
.public int getMnemonic()
public int getMnemonicIndex()
public Image getImage()
getImage
in interface VisualizedElement
public Icon getIcon()
getIcon
in interface VisualizedElement
public Icon getLargeIcon()
public KeyStroke getAccelerator()
protected CommandButtonLabelInfo getLabelInfo()
protected CommandButtonIconInfo getIconInfo()
protected CommandButtonIconInfo getLargeIconInfo()
public void setCaption(String shortDescription)
setCaption
in interface DescriptionConfigurable
public void setDescription(String longDescription)
setDescription
in interface DescriptionConfigurable
public void setButtonLabelInfo(String encodedLabelInfo)
encodedLabelInfo
- The encoded label descriptor. May be null or empty.CommandButtonLabelInfo.valueOf(String)
public void setLabelInfo(CommandButtonLabelInfo labelInfo)
setLabelInfo
in interface CommandLabelConfigurable
public void setIconInfo(CommandButtonIconInfo iconInfo)
setIconInfo
in interface CommandIconConfigurable
public void setLargeIconInfo(CommandButtonIconInfo largeIconInfo)
setLargeIconInfo
in interface CommandIconConfigurable
public void setIcon(Icon icon)
icon
- The main default icon. May be null.public void setLargeIcon(Icon icon)
icon
- The large icon. May be null.public void configureLabel(AbstractButton button)
button
- The button to be configured. Must not be null.
IllegalArgumentException
- if button
is null.public void configureIcon(AbstractButton button)
button
- The button to be configured. Must not be null.
IllegalArgumentException
- if button
is null.public void configureIconInfo(AbstractButton button, boolean useLargeIcons)
button
- The button to be configured. Must not be null.useLargeIcons
- Set to true to configure the button with large icons. False will use
default size icons.
IllegalArgumentException
- if button
is null.public void configure(AbstractButton button, AbstractCommand command, CommandButtonConfigurer configurer)
button
- The button to be configured. Must not be null.command
- The command to be configured. May be null.configurer
- The configurer. Must not be null.
IllegalArgumentException
- if button
or configurer
are null.public void configure(Action action)
action
- The action to be configured. Must not be null.
IllegalArgumentException
- if action
is null.public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |