public static class Force.Node<T>
extends com.google.gwt.core.client.JavaScriptObject
Force
, The class provides
accessors for the nodes key attributes, its position, previous position,
fixed (immovable) and weight (number of links).
These attributes do not need to be set before passing the nodes to the layout; if they are not set, suitable defaults will be initialized by the layout when start is called. However, be aware that if you are storing other data on your nodes, your data attributes should not conflict with the above properties used by the layout.
Modifier | Constructor and Description |
---|---|
protected |
Node() |
Modifier and Type | Method and Description |
---|---|
T |
datum() |
void |
datum(T datum) |
boolean |
fixed() |
void |
fixed(boolean fixed)
sets a boolean indicating whether node position is locked.
|
int |
index() |
double |
px() |
void |
px(double px)
sets the previous the x coordinate
|
double |
py() |
void |
py(double py)
sets the previous y coordinate
|
int |
weight() |
double |
x() |
void |
x(double x)
sets the x coordinate
|
double |
y() |
void |
y(double y)
sets the y coordinate
|
public final int index()
public final double x()
public final void x(double x)
public final double y()
public final void y(double y)
public final double px()
public final void px(double px)
public final double py()
public final void py(double py)
public final boolean fixed()
public final void fixed(boolean fixed)
public final int weight()
public final T datum()
public final void datum(T datum)
datum
- the user datum of this nodeCopyright © 2017 gwt-d3. All rights reserved.