public class NodeView extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
METRIC
Node-Shape Integer Metric
|
Node |
nodeData
Node Data Model
|
int |
nodeShape
Shape int of Node
|
static int |
OPERATOR
Node-Shape Integer Operator
|
static int |
OUTPUT
Node-Shape Integer Output
|
NodeView |
parent
Parent of Node
|
static int |
SOURCE
Node-Shape Integer Source
|
static int |
TARGET
Node-Shape Integer Target
|
int |
x
Position on x-Axis
|
int |
y
Position on y-Axis
|
| Constructor and Description |
|---|
NodeView(int x,
int y,
int nodeShape,
String label,
GraphBuildView gbv,
Node node)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
addChildWithOutDataLinking(NodeView child)
Adds a Child without Linking the Data Models
|
boolean |
addParent(NodeView parent)
Adds a Parent to the NodeView, and links the Data Models
|
boolean |
contains(int x,
int y)
Proof if Point is in the Node
|
boolean |
containsLinkMid(int x,
int y)
Proof if Point is in the LinkMid
|
void |
deleteNode()
Delete the Node unlink Children and Parent in Data and View Model
|
void |
deleteParent(NodeView parent)
Deletes Parent from NodeView and unlinks data models
|
void |
displayNode()
Draw Node to GraphBuildView
|
void |
drawLink()
Draw the Links on Canvas to the Childs
|
int |
getHeight()
returns height
|
int |
getMidLinkX()
returns midLinkX
|
int |
getMidLinkY()
returns midLinkY
|
int |
getWidth()
returns width
|
void |
setXY(int x,
int y)
Set Position of NodeView on Canvas
|
String |
toString() |
public static final int METRIC
public static final int OUTPUT
public static final int OPERATOR
public static final int SOURCE
public static final int TARGET
public int x
public int y
public int nodeShape
public Node nodeData
public NodeView parent
public NodeView(int x,
int y,
int nodeShape,
String label,
GraphBuildView gbv,
Node node)
x - Position on x-Axisy - Position on y-AxisnodeShape - Shape int of Nodelabel - Label to displaygbv - Canvas to Draw Nodenode - Node-Datamodelpublic void displayNode()
public void setXY(int x,
int y)
x - Position on x-Axisy - Position on y-Axispublic boolean contains(int x,
int y)
x - Position on x-Axis to proofy - Position on y-Axis to proofpublic boolean containsLinkMid(int x,
int y)
x - Position on x-Axis to proofy - Position on y-Axis to proofpublic boolean addParent(NodeView parent)
parent - parent to addpublic void deleteParent(NodeView parent)
parent - parent nodepublic void addChildWithOutDataLinking(NodeView child)
child - Child to Addedpublic void drawLink()
public void deleteNode()
public int getWidth()
public int getHeight()
public int getMidLinkX()
public int getMidLinkY()
Copyright © 2019. All rights reserved.