public abstract class GConnectorSkin
extends java.lang.Object
GConnector. Responsible for visualizing connectors in the graph editor.
A custom connector skin must extend this class. It must also provide a constructor taking exactly one
GConnector parameter.
The root JavaFX node must be created by the skin implementation and returned in the getRoot() method.
| Constructor and Description |
|---|
GConnectorSkin(de.tesis.dynaware.grapheditor.model.GConnector connector)
Creates a new
GConnectorSkin. |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
applyStyle(GConnectorStyle style)
Applys the specified style to the connector.
|
de.tesis.dynaware.grapheditor.model.GConnector |
getConnector()
Gets the connector model element represented by the skin.
|
GraphEditor |
getGraphEditor()
Gets the graph editor instance that this skin is a part of.
|
abstract double |
getHeight()
Gets the height of the connector skin.
|
abstract javafx.scene.Node |
getRoot()
Gets the root JavaFX node of the skin.
|
abstract double |
getWidth()
Gets the width of the connector skin.
|
void |
setGraphEditor(GraphEditor graphEditor)
Sets the graph editor instance that this skin is a part of.
|
public GConnectorSkin(de.tesis.dynaware.grapheditor.model.GConnector connector)
GConnectorSkin.connector - the GConnector represented by the skinpublic de.tesis.dynaware.grapheditor.model.GConnector getConnector()
GConnector represented by the skinpublic 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 abstract javafx.scene.Node getRoot()
Nodepublic abstract double getWidth()
public abstract double getHeight()
public abstract void applyStyle(GConnectorStyle style)
This is called by the library during various mouse events. For example when a connector is dragged over another connector in an attempt to create a new connection.
style - the GConnectorStyle to applyCopyright © 2014 TESIS DYNAware. All Rights Reserved.