|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.umd.cs.piccolo.PNode
at.tuwien.ifs.somtoolbox.apps.viewer.ArrowPNode
public class ArrowPNode
Class for arrows on the SOM Visualization (that indicate shifts in a SOM)
Nested Class Summary |
---|
Nested classes/interfaces inherited from class edu.umd.cs.piccolo.PNode |
---|
edu.umd.cs.piccolo.PNode.PSceneGraphDelegate |
Field Summary | |
---|---|
static int |
ADJACENT
|
private static Color |
ADJACENTCOLOR
|
private Line2D.Double |
arrow
|
private double |
arrowHeadLength
|
private float |
arrowHeadScale
|
private double |
arrowHeadWidth
|
static int |
CLUSTER
|
private static Color |
CLUSTERCOLOR
|
private Color |
color
|
private InputCorrections.CreationType |
creationType
|
private Polygon |
endHead
|
static int |
MAXARROWWIDTH
|
static int |
OUTLIER
|
private static Color |
OUTLIERCOLOR
|
private boolean |
selectionVisibility
|
private static long |
serialVersionUID
|
private boolean |
showEndHead
|
private boolean |
showStartHead
|
static int |
STABLE
|
private static Color |
STABLECOLOR
|
private Polygon |
startHead
|
private BasicStroke |
stroke
|
private edu.umd.cs.piccolo.PNode |
tooltipNode
|
private int |
type
|
private boolean |
typeVisibility
|
private double |
x1
|
private double |
x2
|
private double |
y1
|
private double |
y2
|
Fields inherited from class edu.umd.cs.piccolo.PNode |
---|
PROPERTY_BOUNDS, PROPERTY_CHILDREN, PROPERTY_CHILDREN_PICKABLE, PROPERTY_CLIENT_PROPERTIES, PROPERTY_CODE_BOUNDS, PROPERTY_CODE_CHILDREN, PROPERTY_CODE_CHILDREN_PICKABLE, PROPERTY_CODE_CLIENT_PROPERTIES, PROPERTY_CODE_FULL_BOUNDS, PROPERTY_CODE_PAINT, PROPERTY_CODE_PARENT, PROPERTY_CODE_PICKABLE, PROPERTY_CODE_TRANSFORM, PROPERTY_CODE_TRANSPARENCY, PROPERTY_CODE_VISIBLE, PROPERTY_FULL_BOUNDS, PROPERTY_PAINT, PROPERTY_PARENT, PROPERTY_PICKABLE, PROPERTY_TRANSFORM, PROPERTY_TRANSPARENCY, PROPERTY_VISIBLE, SCENE_GRAPH_DELEGATE |
Fields inherited from interface java.awt.print.Printable |
---|
NO_SUCH_PAGE, PAGE_EXISTS |
Constructor Summary | |
---|---|
ArrowPNode(double x1,
double y1,
double x2,
double y2)
Constructor that takes arrow coordinates |
|
ArrowPNode(InputCorrections.CreationType creationType,
String[][] attributes,
String tooltip,
Color color,
double width,
double height,
Point pointBegin,
Point pointEnd)
|
|
ArrowPNode(Point start,
Point end,
double offsetX,
double offsetY)
|
Method Summary | |
---|---|
private void |
calculateArrow()
Calculate the coordinates for the 3 points defining each arrowhead (the arrowhead is a triangle) and generate polygon objects with these points. |
static ArrowPNode |
createInputCorrectionArrow(InputCorrections.InputCorrection c,
InputCorrections.CreationType creationType,
GeneralUnitPNode sourceUnitNode,
GeneralUnitPNode targetUnitNode)
|
InputCorrections.CreationType |
getCreationType()
|
int |
getType()
|
boolean |
getVisible()
Is the visibility of this ArrowPNode currently set to true? |
protected void |
paint(edu.umd.cs.piccolo.util.PPaintContext paintContext)
Paints the arrow line with given color and stroke, adding arrowheads as applicable |
void |
setArrow(double x1,
double y1,
double x2,
double y2)
(Re)sets the coordinates of the arrow to (x1, y1) (x2, y2); produces a line and appropriate arrowheads and resets the Node's bounding box to hold the new arrow |
void |
setArrowHeadScale(float scale)
|
boolean |
setBounds(double x,
double y,
double w,
double h)
Set the bounds of this PNode object. |
void |
setColor(Color color)
|
void |
setLineWidth(double width)
|
void |
setProportionalWidth(double propWidth)
|
void |
setSelectionVisibility(boolean selectionVisibility)
|
void |
setType(int type)
|
void |
setTypeVisibility(boolean typeVisibility)
|
void |
setVisible(boolean visibility)
|
void |
showEndArrowHead(boolean state)
Show the arrowhead at the (x2,y2)-end of the line? |
void |
showStartArrowHead(boolean state)
Show the arrowhead at the (x1,y1)-end of the line? |
Methods inherited from class edu.umd.cs.piccolo.PNode |
---|
addActivity, addAttribute, addChild, addChild, addChildren, addClientProperty, addInputEventListener, addPropertyChangeListener, addPropertyChangeListener, animateToBounds, animateToColor, animateToPositionScaleRotation, animateToTransform, animateToTransparency, animateTransformToBounds, centerBoundsOnPoint, centerFullBoundsOnPoint, clone, computeFullBounds, endResizeBounds, findIntersectingNodes, fireChildPropertyChange, firePropertyChange, fullIntersects, fullPaint, fullPick, getAllNodes, getAllNodes, getAttribute, getAttribute, getBooleanAttribute, getBounds, getBoundsChanged, getBoundsReference, getBoundsVolatile, getChild, getChildBoundsInvalid, getChildBoundsVolatile, getChildPaintInvalid, getChildrenCount, getChildrenIterator, getChildrenPickable, getChildrenReference, getClientProperties, getClientProperty, getClientPropertyKeysEnumeration, getClientPropertyKeysIterator, getDoubleAttribute, getFullBounds, getFullBoundsInvalid, getFullBoundsReference, getGlobalBounds, getGlobalFullBounds, getGlobalRotation, getGlobalScale, getGlobalToLocalTransform, getGlobalTranslation, getHeight, getIntegerAttribute, getInverseTransform, getListenerList, getLocalToGlobalTransform, getOccluded, getOffset, getPaint, getPaintInvalid, getParent, getPickable, getPropertyChangeParentMask, getRoot, getRotation, getScale, getTransform, getTransformReference, getTransparency, getUnionOfChildrenBounds, getWidth, getX, getXOffset, getY, getYOffset, globalToLocal, globalToLocal, globalToLocal, indexOfChild, internalUpdateBounds, intersects, invalidateFullBounds, invalidateLayout, invalidatePaint, isAncestorOf, isDescendentOf, isDescendentOfRoot, isOpaque, layoutChildren, lerp, localToGlobal, localToGlobal, localToGlobal, localToParent, localToParent, localToParent, moveInBackOf, moveInFrontOf, moveToBack, moveToFront, offset, paintAfterChildren, paramString, parentBoundsChanged, parentToLocal, parentToLocal, parentToLocal, pick, pickAfterChildren, position, print, print, removeAllChildren, removeChild, removeChild, removeChildren, removeFromParent, removeInputEventListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaintFrom, reparent, replaceWith, resetBounds, rotate, rotateAboutPoint, rotateAboutPoint, rotateInPlace, scale, scaleAboutPoint, scaleAboutPoint, setBounds, setBoundsChanged, setChildBoundsInvalid, setChildBoundsVolatile, setChildPaintInvalid, setChildrenPickable, setFullBoundsInvalid, setGlobalRotation, setGlobalScale, setGlobalTranslation, setHeight, setOccluded, setOffset, setOffset, setPaint, setPaintInvalid, setParent, setPickable, setPropertyChangeParentMask, setRotation, setScale, setTransform, setTransparency, setWidth, setX, setY, signalBoundsChanged, startResizeBounds, toImage, toImage, toImage, toString, transformBy, translate, validateFullBounds, validateFullPaint |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private static final long serialVersionUID
private double x1
private double y1
private double x2
private double y2
private Line2D.Double arrow
private boolean typeVisibility
private boolean selectionVisibility
private boolean showStartHead
private boolean showEndHead
private edu.umd.cs.piccolo.PNode tooltipNode
private double arrowHeadLength
private double arrowHeadWidth
private Polygon startHead
private Polygon endHead
private Color color
private static final Color OUTLIERCOLOR
private static final Color STABLECOLOR
private static final Color ADJACENTCOLOR
private static final Color CLUSTERCOLOR
private BasicStroke stroke
private int type
private InputCorrections.CreationType creationType
private float arrowHeadScale
public static final int OUTLIER
public static final int STABLE
public static final int ADJACENT
public static final int CLUSTER
public static final int MAXARROWWIDTH
Constructor Detail |
---|
public ArrowPNode(Point start, Point end, double offsetX, double offsetY)
public ArrowPNode(double x1, double y1, double x2, double y2)
public ArrowPNode(InputCorrections.CreationType creationType, String[][] attributes, String tooltip, Color color, double width, double height, Point pointBegin, Point pointEnd)
Method Detail |
---|
public void showStartArrowHead(boolean state)
state
- arrowhead "on" or "off"?public void setArrowHeadScale(float scale)
public void showEndArrowHead(boolean state)
state
- arrowhead "on" or "off"?private void calculateArrow()
public void setArrow(double x1, double y1, double x2, double y2)
public boolean setBounds(double x, double y, double w, double h)
setBounds
in class edu.umd.cs.piccolo.PNode
PNode.setBounds(double, double, double, double)
protected void paint(edu.umd.cs.piccolo.util.PPaintContext paintContext)
paint
in class edu.umd.cs.piccolo.PNode
PNode.paint(edu.umd.cs.piccolo.util.PPaintContext)
public boolean getVisible()
getVisible
in class edu.umd.cs.piccolo.PNode
public int getType()
public InputCorrections.CreationType getCreationType()
public void setType(int type)
public void setLineWidth(double width)
public void setProportionalWidth(double propWidth)
public void setSelectionVisibility(boolean selectionVisibility)
public void setTypeVisibility(boolean typeVisibility)
public void setVisible(boolean visibility)
setVisible
in class edu.umd.cs.piccolo.PNode
public void setColor(Color color)
public static ArrowPNode createInputCorrectionArrow(InputCorrections.InputCorrection c, InputCorrections.CreationType creationType, GeneralUnitPNode sourceUnitNode, GeneralUnitPNode targetUnitNode)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |