|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--DrawingKey
DrawingKey
implements DrawableKey
for it is a specific type that
draws Object keys. Its constructor needs the Object key it will draw.
DrawableKey
Constructor Summary | |
DrawingKey(java.lang.Object k)
Constructor that instantiates the DrawingIntegerKey using the given Object k. |
Method Summary | |
java.lang.Object |
clone()
Returns a copy of this AffineTransform object. |
void |
drawKey(java.awt.Graphics2D g2)
Draws the key, first setting all values for the Graphics2D g2. |
void |
drawKey(java.awt.Graphics2D g2,
java.awt.geom.AffineTransform a)
Draws the key in the given Graphics2D, using the AffineTransform passed to it. |
void |
fillKey(java.awt.Graphics2D g2)
Draws the key filling the given Graphics2D. |
java.lang.Object |
getKey()
Gets the Object key of the DrawableKey . |
KeySettings |
getSettings()
Gets the KeySettings of the key. |
boolean |
isSettingsSaved()
Returns true if the KeySettings are currently saved for the DrawingTree. |
void |
restoreSettings()
Restores the settings for the tree, decrementing the count of saves by one. |
void |
saveSettings()
Saves the settings for the tree, incrementing the count of saves by one and setting the previous settings accordingly. |
void |
setKey(java.lang.Object k)
Sets the Object key of the DrawableKey . |
void |
setKeySettings(KeySettings s)
Sets the KeySettings of the DrawableKey . |
void |
setSettings(KeySettings s)
Sets the KeySettings of the DrawableKey . |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DrawingKey(java.lang.Object k)
DrawingIntegerKey
using the given Object k.
k
- the Object
drawn to the screen.Method Detail |
public java.lang.Object clone()
AffineTransform
object.
clone
in interface DrawableKey
clone
in class java.lang.Object
Object
that is a copy of this
AffineTransform
object.public void setKey(java.lang.Object k)
Object
key of the DrawableKey
.
k
- Object
key for use in drawing the key.public java.lang.Object getKey()
Object
key of the DrawableKey
.
Object
key used for drawing the key.public void setSettings(KeySettings s)
KeySettings
of the DrawableKey
.
These settings are used for drawing the key in a given Graphics2D.
setSettings
in interface DrawableKey
s
- KeySettings
for use in drawing the key.public void setKeySettings(KeySettings s)
KeySettings
of the DrawableKey
.
These settings are used for drawing the key in a given Graphics2D.
setKeySettings
in interface DrawableKey
s
- KeySettings
for use in drawing the key.public KeySettings getSettings()
KeySettings
of the key.
getSettings
in interface DrawableKey
KeySettings
for use in drawing the key.public boolean isSettingsSaved()
KeySettings are currently saved for the DrawingTree.
- Specified by:
isSettingsSaved
in interface DrawableKey
- Returns:
- true if the settings are saved.
public void saveSettings()
saveSettings
in interface DrawableKey
public void restoreSettings()
restoreSettings
in interface DrawableKey
public void fillKey(java.awt.Graphics2D g2)
fillKey
in interface DrawableKey
g2
- Graphics2D that fills with the key.public void drawKey(java.awt.Graphics2D g2, java.awt.geom.AffineTransform a)
drawKey
in interface DrawableKey
g2
- Graphics2D that this fills with the key.a
- AffineTransform
that transforms the key, assuming no previous transforms occur.public void drawKey(java.awt.Graphics2D g2)
drawKey
or
fillKey
.
drawKey
in interface DrawableKey
g2
- Graphics2D that the key is painted to.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |