public abstract class GJointSkin
extends java.lang.Object
GJoint. Responsible for visualizing joints in the graph editor.
A custom joint skin must extend this class. It must also provide a constructor taking exactly one
GJoint parameter.
The root JavaFX node of this skin is a DraggableBox.
| Type | Property and Description |
|---|---|
javafx.beans.property.BooleanProperty |
selected
The property storing whether the joint is selected or not.
|
| Constructor and Description |
|---|
GJointSkin(de.tesis.dynaware.grapheditor.model.GJoint joint)
Creates a new
GJointSkin. |
| Modifier and Type | Method and Description |
|---|---|
GraphEditor |
getGraphEditor()
Gets the graph editor instance that this skin is a part of.
|
abstract double |
getHeight()
Gets the height of the joint.
|
de.tesis.dynaware.grapheditor.model.GJoint |
getJoint()
Gets the joint model element represented by the skin.
|
DraggableBox |
getRoot()
Gets the root JavaFX node of the skin.
|
abstract double |
getWidth()
Gets the width of the joint.
|
void |
initialize()
Initializes the joint skin.
|
boolean |
isSelected()
Gets whether the joint is selected or not.
|
javafx.beans.property.BooleanProperty |
selectedProperty()
The property storing whether the joint is selected or not.
|
void |
setGraphEditor(GraphEditor graphEditor)
Sets the graph editor instance that this skin is a part of.
|
void |
setSelected(boolean isSelected)
Sets whether the joint is selected or not.
|
public javafx.beans.property.BooleanProperty selectedProperty
isSelected(),
setSelected(boolean)public GJointSkin(de.tesis.dynaware.grapheditor.model.GJoint joint)
GJointSkin.joint - the GJoint represented by the skinpublic de.tesis.dynaware.grapheditor.model.GJoint getJoint()
GJoint represented by the skinpublic DraggableBox getRoot()
DraggableBox containing the skin's root JavaFX nodepublic void setGraphEditor(GraphEditor graphEditor)
graphEditor - a GraphEditor instancepublic GraphEditor getGraphEditor()
This is provided for advanced skin customisation purposes only. Use at your own risk.
GraphEditor instance that this skin is a part ofpublic boolean isSelected()
true if the joint is selected, false if notpublic void setSelected(boolean isSelected)
isSelected - true if the joint is selected, false if notpublic javafx.beans.property.BooleanProperty selectedProperty()
isSelected(),
setSelected(boolean)public void initialize()
The skin's layout values are loaded from the GJoint at this point.
public abstract double getWidth()
For robust behaviour this should return the correct width at all times. Note that getRoot().getWidth() does not meet this condition as it will return 0 until the joint's node is added to the scene graph and layed out.
public abstract double getHeight()
For robust behaviour this should return the correct height at all times. Note that getRoot().getHeight() does not meet this condition as it will return 0 until the joint's node is added to the scene graph and layed out.
Copyright © 2014 TESIS DYNAware. All Rights Reserved.