|
JGraph |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.Dictionary<K,V>
java.util.Hashtable
org.jgraph.graph.AttributeMap
public class AttributeMap
Nested Class Summary | |
---|---|
static class |
AttributeMap.SerializablePoint2D
|
static class |
AttributeMap.SerializableRectangle2D
|
Constructor Summary | |
---|---|
AttributeMap()
|
|
AttributeMap(Map map)
|
Method Summary | |
---|---|
AttributeMap |
applyMap(Map change)
Apply the change to the target . |
Object |
applyValue(Object key,
Object value)
Apply the key to value and return
the old value. |
Object |
clone()
Returns a clone of map , from keys to values. |
List |
clonePoints(List points)
Returns a list where all instances of PortView are replaced by their correspnding Point instance. |
List |
clonePoints(List points,
boolean convertPortViews)
Returns a list where all instances of PortView are replaced by their correspnding Point instance. |
Point2D |
createPoint()
|
Point2D |
createPoint(double x,
double y)
|
Point2D |
createPoint(Point2D p)
|
Rectangle2D |
createRect()
|
Rectangle2D |
createRect(double x,
double y,
double w,
double h)
|
Rectangle2D |
createRect(double x,
double y,
double w,
double h,
double grow1,
double grow2)
|
Rectangle2D |
createRect(Point2D pt)
|
Rectangle2D |
createRect(Point2D pt,
double size)
|
Rectangle2D |
createRect(Rectangle2D rect)
|
Rectangle2D |
createRect(Rectangle2D rect,
double grow1,
double grow2)
|
Map |
diff(Map newState)
Returns a new map that contains all (key, value)-pairs of newState where either key is not used or value is
different for key in oldState . |
void |
scale(double sx,
double sy,
Point2D origin)
Scales map by the given amount. |
static void |
translate(Collection c,
double dx,
double dy)
Translates the maps in c using
translate(Map, int, int) . |
void |
translate(double dx,
double dy)
Translates map by the given amount. |
Object |
valueChanged(Object newValue)
A hook for subclassers to handle in-place edit. |
Methods inherited from class java.util.Hashtable |
---|
clear, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keys, keySet, put, putAll, rehash, remove, size, toString, values |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public AttributeMap()
public AttributeMap(Map map)
Method Detail |
---|
public Point2D createPoint()
public Point2D createPoint(Point2D p)
public Point2D createPoint(double x, double y)
public Rectangle2D createRect()
public Rectangle2D createRect(double x, double y, double w, double h)
public Rectangle2D createRect(Point2D pt)
public Rectangle2D createRect(Point2D pt, double size)
public Rectangle2D createRect(Rectangle2D rect)
public Rectangle2D createRect(double x, double y, double w, double h, double grow1, double grow2)
public Rectangle2D createRect(Rectangle2D rect, double grow1, double grow2)
public AttributeMap applyMap(Map change)
change
to the target
.
change
must be a Map
previously obtained
from this object. Returns a map that may be used to undo the change to
target.
public Object applyValue(Object key, Object value)
key
to value
and return
the old value.
public Object valueChanged(Object newValue)
public List clonePoints(List points)
public List clonePoints(List points, boolean convertPortViews)
public static void translate(Collection c, double dx, double dy)
c
using
translate(Map, int, int)
.
public void translate(double dx, double dy)
map
by the given amount.
public void scale(double sx, double sy, Point2D origin)
map
by the given amount.
public Map diff(Map newState)
newState
where either key is not used or value is
different for key in oldState
. In other words, this
method removes the common entries from oldState and newState, and returns
the "difference" between the two.
This method never returns null.
public Object clone()
map
, from keys to values. If the map
contains bounds or points, these are cloned as well. References to
PortViews
are replaces by points.
clone
in class Hashtable
|
JGraph |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |