|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.grogra.imp.edit.Tool
public final class Tool
A Tool
represents a tool for interactive manipulation
of objects in a 2D- or 3D-view. A tool is composed of a set of
tool graphs, each represented by its root node of (a subclass of) class
ToolRoot
. Each tool graph is drawn as
part of the 2D- or 3D-view.
A Tool
operates on a single object, the tool target.
Field Summary |
---|
Fields inherited from interface de.grogra.graph.ChangeBoundaryListener |
---|
ATTRIBUTE_PRIORITY, TOPOLOGY_PRIORITY, UPDATE_PRIORITY |
Constructor Summary | |
---|---|
Tool(java.lang.Object object,
boolean asNode,
ToolRoot[] roots)
Creates a new Tool . |
Method Summary | |
---|---|
void |
attributeChanged(AttributeChangeEvent e)
|
void |
beginChange(GraphState gs)
|
static DisposableEventListener |
createToolListener(View view,
UIProperty tool)
|
void |
dispose()
|
void |
endChange(GraphState gs)
|
AttributeAccessor |
getAccessorOfObject(Attribute a)
|
boolean |
getBooleanOfObject(BooleanAttribute a,
boolean defaultValue)
|
byte |
getByteOfObject(ByteAttribute a,
byte defaultValue)
|
char |
getCharOfObject(CharAttribute a,
char defaultValue)
|
double |
getDoubleOfObject(DoubleAttribute a,
double defaultValue)
|
float |
getFloatOfObject(FloatAttribute a,
float defaultValue)
|
GraphState |
getGraphState()
Returns the GraphState of the workbench. |
int |
getIntOfObject(IntAttribute a,
int defaultValue)
|
long |
getLongOfObject(LongAttribute a,
long defaultValue)
|
java.lang.Object |
getObject()
Returns this tool's target. |
java.lang.Object |
getObjectOfObject(ObjectAttribute a,
java.lang.Object defaultValue)
|
int |
getPriority()
|
ToolRoot |
getRoot(int index)
Returns the tool root at position index in the
list of tool roots. |
short |
getShortOfObject(ShortAttribute a,
short defaultValue)
|
int |
getToolCount()
Returns the number of tool roots. |
View |
getView()
Returns the view in which this tool is displayed. |
void |
initialize(View view)
|
boolean |
isNode()
Determines whether the tool target is a node or an edge. |
boolean |
isWritable(Attribute a)
|
void |
setBooleanOfObject(BooleanAttribute a,
boolean value)
|
void |
setByteOfObject(ByteAttribute a,
byte value)
|
void |
setCharOfObject(CharAttribute a,
char value)
|
void |
setDoubleOfObject(DoubleAttribute a,
double value)
|
void |
setFloatOfObject(FloatAttribute a,
float value)
|
void |
setIntOfObject(IntAttribute a,
int value)
|
void |
setLongOfObject(LongAttribute a,
long value)
|
void |
setObjectOfObject(ObjectAttribute a,
java.lang.Object value)
|
void |
setShortOfObject(ShortAttribute a,
short value)
|
void |
setSubfield(ObjectAttribute a,
FieldChain field,
int[] indices,
java.lang.Object value)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Tool(java.lang.Object object, boolean asNode, ToolRoot[] roots)
Tool
.
object
- the tool targetasNode
- true
iff object
is a noderoots
- the set of tool rootsTool
Method Detail |
---|
public void attributeChanged(AttributeChangeEvent e)
attributeChanged
in interface AttributeChangeListener
public void beginChange(GraphState gs)
beginChange
in interface ChangeBoundaryListener
public static DisposableEventListener createToolListener(View view, UIProperty tool)
public void dispose()
dispose
in interface Disposable
public void endChange(GraphState gs)
endChange
in interface ChangeBoundaryListener
public AttributeAccessor getAccessorOfObject(Attribute a)
public boolean getBooleanOfObject(BooleanAttribute a, boolean defaultValue)
public byte getByteOfObject(ByteAttribute a, byte defaultValue)
public char getCharOfObject(CharAttribute a, char defaultValue)
public double getDoubleOfObject(DoubleAttribute a, double defaultValue)
public float getFloatOfObject(FloatAttribute a, float defaultValue)
public GraphState getGraphState()
GraphState
of the workbench.
public int getIntOfObject(IntAttribute a, int defaultValue)
public long getLongOfObject(LongAttribute a, long defaultValue)
public java.lang.Object getObject()
public java.lang.Object getObjectOfObject(ObjectAttribute a, java.lang.Object defaultValue)
public int getPriority()
getPriority
in interface ChangeBoundaryListener
public ToolRoot getRoot(int index)
index
in the
list of tool roots.
index
- the index into the list of tool roots
index
public short getShortOfObject(ShortAttribute a, short defaultValue)
public int getToolCount()
Tool
,
depending on the result of the initializations of each tool root.
public View getView()
public void initialize(View view)
public boolean isNode()
true
iff the tool target is a nodepublic boolean isWritable(Attribute a)
public void setBooleanOfObject(BooleanAttribute a, boolean value)
public void setByteOfObject(ByteAttribute a, byte value)
public void setCharOfObject(CharAttribute a, char value)
public void setDoubleOfObject(DoubleAttribute a, double value)
public void setFloatOfObject(FloatAttribute a, float value)
public void setIntOfObject(IntAttribute a, int value)
public void setLongOfObject(LongAttribute a, long value)
public void setObjectOfObject(ObjectAttribute a, java.lang.Object value)
public void setShortOfObject(ShortAttribute a, short value)
public void setSubfield(ObjectAttribute a, FieldChain field, int[] indices, java.lang.Object value)
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 |