|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Graphic
Graphic defines the root abstraction of a graphic object
taxonomy, specifying the methods common to a lightweight set of graphic objects.
| Field Summary | |
|---|---|
static boolean |
DEFAULT_AUTO_EDIT
Default auto edit value. |
static float[] |
DEFAULT_BLINK_PATTERN
Default blink pattern value. |
static boolean |
DEFAULT_BLINKING
Default blinking value. |
static boolean |
DEFAULT_DRAG_SELECTABLE
Default drag selectable value. |
static int |
DEFAULT_MAX_SCALE
Default max scale value. |
static int |
DEFAULT_MIN_SCALE
Default min scale value. |
static boolean |
DEFAULT_PICKABLE
Default pickable value. |
static boolean |
DEFAULT_SELECTED
Default selected value. |
static boolean |
DEFAULT_VISIBLE
Default visible value. |
static double |
DEFAULT_Z_ORDER
Default z order value. |
| Method Summary | |
|---|---|
void |
addGraphicListener(GraphicListener listener)
Adds the given GraphicListener to this Graphic's list of
listeners. |
Graphic |
cloneGraphic()
Creates a new Graphic of the same type as this object. |
void |
dispose()
Method that can be called when an object is no longer needed. |
void |
fireGraphicEvent(GraphicEvent ge)
Calls the graphic event method of all GraphicListeners in this
Graphic's list of listeners. |
boolean |
getAutoEdit()
Returns the auto edit value. |
boolean |
getBlinking()
Returns the blinking value. |
float[] |
getBlinkPattern()
Returns the blink pattern value. |
Object |
getClientProperty(Object key)
Returns the value of the property with the specified key. |
boolean |
getDragSelectable()
Returns the drag selectable value. |
GraphicStyle |
getGraphicStyle()
Returns the GraphicStyle for this Graphic. |
double |
getMaxScale()
Returns the max scale value. |
double |
getMinScale()
Returns the min scale value. |
String |
getName()
Returns the name assigned to this Graphic. |
Graphic |
getParent()
Returns the parent of this Graphic. |
boolean |
getPickable()
Returns the pickable value. |
boolean |
getSelected()
Returns the selected value. |
Symbology |
getSymbology()
Returns a symbology object that will be used to override some, if not all, of the graphical properties of Graphics using this style. |
boolean |
getVisible()
Returns the visible value. |
double |
getZOrderHint()
Returns the z order hint value. |
boolean |
isPassingEventsToParent()
Returns a boolean indicating whether mouse events on this Graphic will
be passed to the parent Graphic in addition to being passed to any
listeners on this object. |
boolean |
isShowingAnchorHandles()
Returns the boolean flag that indicates whether this object is showing anchor handles. |
boolean |
isShowingEditHandles()
Returns the boolean flag that specifies whether this object is showing its edit handles. |
void |
putClientProperty(Object key,
Object value)
Adds an arbitrary key/value "client property" to this Graphic. |
void |
refresh()
Flags this Graphic object as needing to be redrawn,
due to changes to the internal data of the object which affect the
rendering of the object. |
void |
removeGraphicListener(GraphicListener listener)
Removes the given GraphicListener from this Graphic's list of
listeners. |
void |
setAutoEdit(boolean autoEdit)
Sets the auto edit value. |
void |
setBlinking(boolean blinking)
Sets the blinking value. |
void |
setBlinkPattern(float[] blinkPattern)
Sets the blink pattern value. |
void |
setDragSelectable(boolean dragSelectable)
Sets the drag selectable value. |
void |
setGraphicStyle(GraphicStyle style)
Sets the GraphicStyle for this Graphic. |
void |
setMaxScale(double maxScale)
Sets the max scale value. |
void |
setMinScale(double minScale)
Sets the min scale value. |
void |
setName(String name)
Sets the name of this Graphic to the given value. |
void |
setParent(Graphic parent)
Sets the parent of this Graphic. |
void |
setPassingEventsToParent(boolean passToParent)
Sets a boolean indicating whether mouse events on this Graphic should
be passed to the parent Graphic in addition to being passed to any
listeners on this object. |
void |
setPickable(boolean pickable)
Sets the pickable value. |
void |
setSelected(boolean selected)
Sets the selected value. |
void |
setShowingAnchorHandles(boolean showingHandles)
Sets a boolean flag indicating whether this object is to show anchor handles. |
void |
setShowingEditHandles(boolean showingHandles)
Sets a boolean flag specifying whether this object is to show its edit handles. |
void |
setSymbology(Symbology symbology)
Sets the symbology object that will be used to override some, if not all, of the graphical properties of Graphics using this style. |
void |
setVisible(boolean visible)
Sets the visible value. |
void |
setZOrderHint(double zOrderHint)
Sets the z order hint value. |
| Field Detail |
|---|
static final boolean DEFAULT_AUTO_EDIT
static final boolean DEFAULT_DRAG_SELECTABLE
static final boolean DEFAULT_PICKABLE
static final boolean DEFAULT_SELECTED
static final boolean DEFAULT_BLINKING
static final float[] DEFAULT_BLINK_PATTERN
static final int DEFAULT_MAX_SCALE
static final int DEFAULT_MIN_SCALE
static final boolean DEFAULT_VISIBLE
static final double DEFAULT_Z_ORDER
| Method Detail |
|---|
void dispose()
Graphic in any
way after its dispose method has been called.
void refresh()
Graphic object as needing to be redrawn,
due to changes to the internal data of the object which affect the
rendering of the object.
The actual flag set/unset mechanism is implementation-specific.
The implementation also choses the manner and timing in which both
the flag is checked and the Graphic object is redrawn.
An application would call this method when any geometric
information for this Graphic object has changed;
for example, when the underlying Geometry instance
is changed or data in that instance has changed.
void setName(String name)
Graphic to the given value.
name - the new name to assign to this Graphic.String getName()
Graphic.
Graphic.void setParent(Graphic parent)
Graphic.
parent - the parent of this Graphic.Graphic getParent()
Graphic. Currently, only
AggregateGraphics have Graphic children.
Graphic.void setGraphicStyle(GraphicStyle style)
GraphicStyle for this Graphic.
Graphics may share style property objects with other
Graphics.
GraphicStyle getGraphicStyle()
GraphicStyle for this Graphic.
Implementations should return a reference to their internal
GraphicStyle object, so that users may modify this
Graphic's style properties directly through the
style object.
GraphicStyle.Object getClientProperty(Object key)
putClientProperty will return a
non-null value.
putClientProperty(java.lang.Object, java.lang.Object)
void putClientProperty(Object key,
Object value)
Graphic.
The get/putClientProperty methods provide access to a small
per-instance hashtable. Callers can use get/putClientProperty
to annotate Graphics that were created by another module.
If value is null this method will remove the property. Changes to client
properties are reported with property change events. The name of the
property (for the sake of property change events) is key.toString().
The clientProperty dictionary is not intended to support large scale
extensions to Graphic nor should be it considered an alternative to
subclassing when designing a new component.
key - the Object containing the key string.value - the Object that is the client data.getClientProperty(java.lang.Object)void setPassingEventsToParent(boolean passToParent)
Graphic should
be passed to the parent Graphic in addition to being passed to any
listeners on this object. The default is false, indicating that events
will not be passed to the parent. If the boolean is true, then the
event will be passed to the parent after having been passed to the
listeners on this object.
passToParent - true if events should be passed to the
parent graphic, false if they should not.boolean isPassingEventsToParent()
Graphic will
be passed to the parent Graphic in addition to being passed to any
listeners on this object. The default is false, indicating that events
will not be passed to the parent. If the boolean is true, then the
event will be passed to the parent after having been passed to the
listeners on this object.
true if this graphic pass the events to the parent graphic.void setShowingEditHandles(boolean showingHandles)
showingHandles - true if this object show its edit handles.boolean isShowingEditHandles()
true means it is showing its handles.void setShowingAnchorHandles(boolean showingHandles)
boolean isShowingAnchorHandles()
Graphic cloneGraphic()
Graphic of the same type as this object. The resulting
object should be identical in all respects to the original.
Object.clone() instead.void addGraphicListener(GraphicListener listener)
GraphicListener to this Graphic's list of
listeners. GraphicListeners are notified of key, mouse, and change events that
affect this Graphic.
listener - the GraphicListener to add.void removeGraphicListener(GraphicListener listener)
GraphicListener from this Graphic's list of
listeners.
listener - the GraphicListener to remove.void fireGraphicEvent(GraphicEvent ge)
GraphicListeners in this
Graphic's list of listeners. The listeners need to
determine which subclassed event is called and what event-specific
action was taken.
ge - the GraphicEvent to give to the listeners.GraphicListener,
GraphicEvent,
GraphicChangeEvent,
GraphicMouseEventboolean getAutoEdit()
void setAutoEdit(boolean autoEdit)
autoEdit - the auto edit value.boolean getDragSelectable()
void setDragSelectable(boolean dragSelectable)
dragSelectable - the drag selectable value.boolean getPickable()
void setPickable(boolean pickable)
pickable - the pickable value.boolean getSelected()
void setSelected(boolean selected)
selected - the selected value.boolean getBlinking()
void setBlinking(boolean blinking)
blinking - the blinking value.float[] getBlinkPattern()
void setBlinkPattern(float[] blinkPattern)
blinkPattern - the blink pattern value.Symbology getSymbology()
void setSymbology(Symbology symbology)
double getMaxScale()
void setMaxScale(double maxScale)
maxScale - the max scale value.double getMinScale()
void setMinScale(double minScale)
minScale - the min scale value.double getZOrderHint()
void setZOrderHint(double zOrderHint)
zOrderHint - the z order hint value.boolean getVisible()
void setVisible(boolean visible)
visible - the visible value.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||