|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.pietschy.command.Face
public class Face
The face class holds all the visiual information about a Command
. Faces are identified
by a FaceId
that references the parent command and the name of the face. Face names
may be any non empty string but are usually the defaults defined by DEFAULT
,
BUTTON
, TOOLBAR
, MENU
, POPUP
and HTML
. The commands
will determine the appropriate face based on the context in which a button or menu is created.
Field Summary | |
---|---|
static java.lang.String |
BUTTON
|
static java.lang.String |
DEFAULT
|
protected FaceId |
extendsId
|
protected FaceManager |
faceManager
|
static java.lang.String |
HTML
|
static java.lang.String |
MENU
|
protected java.beans.PropertyChangeSupport |
pcs
|
static java.lang.String |
POPUP
|
static java.lang.String |
TOOLBAR
|
Constructor Summary | |
---|---|
protected |
Face(FaceId id,
FaceManager manager)
Constructs a new empty face with the specified id, that uses the specified CommandManager to locating the face it extends. |
Method Summary | |
---|---|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
|
void |
addPropertyChangeListener(java.lang.String propertyName,
java.beans.PropertyChangeListener listener)
|
boolean |
canExtend(FaceId faceId)
|
javax.swing.KeyStroke |
getAccelerator()
|
java.lang.String |
getClientProperty(java.lang.String name)
|
java.lang.String |
getClientProperty(java.lang.String name,
java.lang.String defaultValue)
|
java.lang.String[] |
getClientPropertyNames()
|
java.lang.String |
getDescription()
|
javax.swing.Icon |
getDisabledIcon()
|
FaceId |
getExtendsId()
|
java.lang.Integer |
getHorizontalTextPosition()
Gets the horizontal text position of this face. |
javax.swing.Icon |
getIcon()
|
java.lang.Integer |
getIconTextGap()
Gets the vertical text position of this face. |
FaceId |
getId()
|
java.lang.String |
getLongDescription()
|
java.lang.Integer |
getMnemonic()
|
java.lang.Integer |
getMnemonicIndex()
|
java.lang.String |
getName()
|
javax.swing.Icon |
getPressedIcon()
|
javax.swing.Icon |
getRolloverIcon()
|
javax.swing.Icon |
getRolloverSelectedIcon()
|
javax.swing.Icon |
getSelectedIcon()
|
java.lang.String |
getText()
Returns the Test as displayed by attachments of this command. |
java.lang.Integer |
getVerticalTextPosition()
Gets the vertical text position of this face. |
boolean |
isAcceleratorInherited()
|
boolean |
isDisabledIconInherited()
|
boolean |
isIconInherited()
|
boolean |
isIconTextGapInherited()
|
boolean |
isMenuTooltipEnabled()
|
boolean |
isNameEqualTo(java.lang.String name)
Tests if this face's name is the same as the specified name. |
boolean |
isPressedIconInherited()
|
boolean |
isRolloverIconInherited()
|
boolean |
isRolloverSelectedIconInherited()
|
boolean |
isSelectedIconInherited()
|
protected void |
notifyMenuTooltipDefaultChanged(boolean newValue)
|
void |
putClientProperty(java.lang.String name,
java.lang.String value)
|
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
|
void |
removePropertyChangeListener(java.lang.String propertyName,
java.beans.PropertyChangeListener listener)
|
void |
setAccelerator(javax.swing.KeyStroke accelerator)
|
void |
setAcceleratorInherited(boolean acceleratorInherited)
|
void |
setDescription(java.lang.String string)
|
void |
setDisabledIcon(javax.swing.Icon icon)
|
void |
setDisabledIconInherited(boolean inherited)
|
void |
setExtendsId(FaceId extendsId)
|
void |
setHorizontalTextPosition(java.lang.Integer position)
Sets the horizontal position for the text on this face. |
void |
setIcon(javax.swing.Icon icon)
|
void |
setIconInherited(boolean iconInherited)
|
void |
setIconTextGap(java.lang.Integer gap)
|
void |
setIconTextGapInherited(boolean inherited)
|
void |
setLongDescription(java.lang.String string)
|
void |
setMenuTooltipEnabled(boolean menuTooltipEnabled)
|
void |
setMnemonic(java.lang.Integer mnemonic)
|
void |
setMnemonicIndex(java.lang.Integer mnemonicIndex)
Sets the mnemonic to use based on it character index in the string. |
void |
setPressedIcon(javax.swing.Icon icon)
|
void |
setPressedIconInherited(boolean inherited)
|
void |
setRolloverIcon(javax.swing.Icon icon)
|
void |
setRolloverIconInherited(boolean inherited)
|
void |
setRolloverSelectedIcon(javax.swing.Icon icon)
|
void |
setRolloverSelectedIconInherited(boolean inherited)
|
void |
setSelectedIcon(javax.swing.Icon selectedIcon)
|
void |
setSelectedIconInherited(boolean selectedIconInherited)
|
void |
setText(java.lang.String string)
Sets the text for the face. |
void |
setTextInherited(boolean textInherited)
|
void |
setVerticalTextPosition(java.lang.Integer position)
Sets the vertical position for the text on this face. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String DEFAULT
public static final java.lang.String BUTTON
public static final java.lang.String TOOLBAR
public static final java.lang.String MENU
public static final java.lang.String POPUP
public static final java.lang.String HTML
protected FaceId extendsId
protected java.beans.PropertyChangeSupport pcs
protected FaceManager faceManager
Constructor Detail |
---|
protected Face(FaceId id, FaceManager manager)
CommandManager
to locating the face it extends.
id
- the id of this face.manager
- the FaceManager
to use to locate the parent face.Method Detail |
---|
public FaceId getId()
public java.lang.String getName()
public boolean isNameEqualTo(java.lang.String name)
name
- the name to compare with this face's name.
public void putClientProperty(java.lang.String name, java.lang.String value)
public java.lang.String getClientProperty(java.lang.String name)
public java.lang.String getClientProperty(java.lang.String name, java.lang.String defaultValue)
public java.lang.String[] getClientPropertyNames()
public java.lang.String getText()
public java.lang.Integer getHorizontalTextPosition()
This attribute will be ignored if the verticalPosition
has
been configured as the vertical position on button is only useful if the horizontal position is
set to SwingConstants.CENTER
.
getVerticalTextPosition()
public java.lang.Integer getVerticalTextPosition()
Configuring this value will result in the horizontalTextPosition
being ignored.
getVerticalTextPosition()
public java.lang.Integer getIconTextGap()
public boolean isIconTextGapInherited()
public javax.swing.Icon getIcon()
public boolean isIconInherited()
public javax.swing.Icon getSelectedIcon()
public boolean isSelectedIconInherited()
public javax.swing.Icon getRolloverIcon()
public boolean isRolloverIconInherited()
public javax.swing.Icon getRolloverSelectedIcon()
public boolean isRolloverSelectedIconInherited()
public javax.swing.Icon getPressedIcon()
public boolean isPressedIconInherited()
public javax.swing.Icon getDisabledIcon()
public boolean isDisabledIconInherited()
public java.lang.Integer getMnemonic()
public java.lang.Integer getMnemonicIndex()
public javax.swing.KeyStroke getAccelerator()
public boolean isAcceleratorInherited()
public java.lang.String getDescription()
public java.lang.String getLongDescription()
public boolean isMenuTooltipEnabled()
public void setAccelerator(javax.swing.KeyStroke accelerator)
public void setAcceleratorInherited(boolean acceleratorInherited)
public void setIcon(javax.swing.Icon icon)
public void setIconInherited(boolean iconInherited)
public void setSelectedIcon(javax.swing.Icon selectedIcon)
public void setSelectedIconInherited(boolean selectedIconInherited)
public void setRolloverIcon(javax.swing.Icon icon)
public void setRolloverIconInherited(boolean inherited)
public void setRolloverSelectedIcon(javax.swing.Icon icon)
public void setRolloverSelectedIconInherited(boolean inherited)
public void setPressedIcon(javax.swing.Icon icon)
public void setPressedIconInherited(boolean inherited)
public void setDisabledIcon(javax.swing.Icon icon)
public void setDisabledIconInherited(boolean inherited)
public void setLongDescription(java.lang.String string)
public void setMnemonic(java.lang.Integer mnemonic)
public void setMnemonicIndex(java.lang.Integer mnemonicIndex)
mnemonicIndex
- public void setDescription(java.lang.String string)
public void setText(java.lang.String string)
string
- the new string for the face.public void setTextInherited(boolean textInherited)
public void setHorizontalTextPosition(java.lang.Integer position)
position
- the horizontal position of the text.getHorizontalTextPosition()
public void setVerticalTextPosition(java.lang.Integer position)
position
- the vertical position of the text.getVerticalTextPosition()
public void setIconTextGap(java.lang.Integer gap)
public void setIconTextGapInherited(boolean inherited)
public void setMenuTooltipEnabled(boolean menuTooltipEnabled)
public FaceId getExtendsId()
public void setExtendsId(FaceId extendsId)
public boolean canExtend(FaceId faceId)
protected void notifyMenuTooltipDefaultChanged(boolean newValue)
public void addPropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
public void removePropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |