public class GraphEditorProperties
extends java.lang.Object
For example, should the editor have 'bounds', or should objects be draggable outside the editor area?
If a bound is active, objects that are dragged or resized in the editor should stop when they hit the edge, and the editor region will not try to grow in size. Otherwise it will grow up to its max size.
Also stores properties for whether the grid is visible and/or snap-to-grid is on.
| Type | Property and Description |
|---|---|
javafx.beans.property.ObjectProperty<javafx.scene.paint.Color> |
gridColor
Gets the grid color property.
|
javafx.beans.property.DoubleProperty |
gridSpacing
Gets the grid spacing property.
|
javafx.beans.property.BooleanProperty |
gridVisible
Gets the grid-visible property.
|
javafx.beans.property.BooleanProperty |
snapToGrid
Gets the snap-to-grid property.
|
| Modifier and Type | Field and Description |
|---|---|
static double |
DEFAULT_MAX_HEIGHT |
static double |
DEFAULT_MAX_WIDTH |
| Constructor and Description |
|---|
GraphEditorProperties()
Creates a new editor properties instance containing a set of default properties.
|
GraphEditorProperties(GraphEditorProperties editorProperties)
Copy constructor.
|
| Modifier and Type | Method and Description |
|---|---|
java.util.Map<java.lang.String,java.lang.String> |
getCustomProperties()
Additional properties that may be added and referred to in custom skin implementations.
|
double |
getEastBoundValue()
Gets the value of the east bound.
|
javafx.scene.paint.Color |
getGridColor()
Gets the grid color.
|
double |
getGridSpacing()
Gets the current grid spacing in pixels.
|
double |
getNorthBoundValue()
Gets the value of the north bound.
|
double |
getSouthBoundValue()
Gets the value of the south bound.
|
double |
getWestBoundValue()
Gets the value of the west bound.
|
javafx.beans.property.ObjectProperty<javafx.scene.paint.Color> |
gridColorProperty()
Gets the grid color property.
|
javafx.beans.property.DoubleProperty |
gridSpacingProperty()
Gets the grid spacing property.
|
javafx.beans.property.BooleanProperty |
gridVisibleProperty()
Gets the grid-visible property.
|
boolean |
isEastBoundActive()
Gets whether the east bound is active.
|
boolean |
isGridVisible()
Checks if the background grid is visible.
|
boolean |
isNorthBoundActive()
Gets whether the north bound is active.
|
boolean |
isSnapToGridOn()
Checks if snap-to-grid is on.
|
boolean |
isSouthBoundActive()
Gets whether the south bound is active.
|
boolean |
isWestBoundActive()
Gets whether the west bound is active.
|
void |
setEastBound(boolean eastBound)
Sets whether the east bound is active.
|
void |
setEastBoundValue(double eastBoundValue)
Sets the value of the east bound.
|
void |
setGridColor(javafx.scene.paint.Color gridColor)
Sets the new grid color.
|
void |
setGridSpacing(double gridSpacing)
Sets the grid spacing to be used if the grid is visible and/or snap-to-grid is enabled.
|
void |
setGridVisible(boolean gridVisible)
Sets whether the background grid should be visible or not.
|
void |
setNorthBoundValue(double northBoundValue)
Sets the value of the north bound.
|
void |
setSnapToGrid(boolean snapToGrid)
Sets whether snap-to-grid should be on.
|
void |
setSouthBound(boolean southBound)
Sets whether the south bound is active.
|
void |
setSouthBoundValue(double southBoundValue)
Sets the value of the south bound.
|
void |
setWestBoundValue(double westBoundValue)
Sets the value of the west bound.
|
javafx.beans.property.BooleanProperty |
snapToGridProperty()
Gets the snap-to-grid property.
|
public javafx.beans.property.BooleanProperty gridVisibleProperty
isGridVisible(),
setGridVisible(boolean)public javafx.beans.property.BooleanProperty snapToGridProperty
setSnapToGrid(boolean)public javafx.beans.property.DoubleProperty gridSpacingProperty
getGridSpacing(),
setGridSpacing(double)public javafx.beans.property.ObjectProperty<javafx.scene.paint.Color> gridColorProperty
getGridColor(),
setGridColor(Color)public static final double DEFAULT_MAX_WIDTH
public static final double DEFAULT_MAX_HEIGHT
public GraphEditorProperties()
public GraphEditorProperties(GraphEditorProperties editorProperties)
Creates a new editor properties instance with all values copied over from an existing instance.
editorProperties - an existing GraphEditorProperties instancepublic boolean isNorthBoundActive()
true if the north bound is active, false if notpublic boolean isSouthBoundActive()
true if the south bound is active, false if notpublic void setSouthBound(boolean southBound)
southBound - true if the south bound is active, false if notpublic boolean isEastBoundActive()
true if the east bound is active, false if notpublic void setEastBound(boolean eastBound)
eastBound - true if the east bound is active, false if notpublic boolean isWestBoundActive()
true if the west bound is active, false if notpublic double getNorthBoundValue()
public void setNorthBoundValue(double northBoundValue)
northBoundValue - the value of the north boundpublic double getSouthBoundValue()
public void setSouthBoundValue(double southBoundValue)
southBoundValue - the value of the south boundpublic double getEastBoundValue()
public void setEastBoundValue(double eastBoundValue)
eastBoundValue - the value of the east boundpublic double getWestBoundValue()
public void setWestBoundValue(double westBoundValue)
westBoundValue - the value of the west boundpublic boolean isGridVisible()
true if the background grid is visible, false if notpublic void setGridVisible(boolean gridVisible)
gridVisible - true if the background grid should be visible, false if notpublic javafx.beans.property.BooleanProperty gridVisibleProperty()
isGridVisible(),
setGridVisible(boolean)public boolean isSnapToGridOn()
true if snap-to-grid is on, false if notpublic void setSnapToGrid(boolean snapToGrid)
snapToGrid - true if snap-to-grid should be on, false if notpublic javafx.beans.property.BooleanProperty snapToGridProperty()
setSnapToGrid(boolean)public double getGridSpacing()
public void setGridSpacing(double gridSpacing)
Integer values are recommended to avoid sub-pixel positioning effects.
gridSpacing - the grid spacing to be usedpublic javafx.beans.property.DoubleProperty gridSpacingProperty()
getGridSpacing(),
setGridSpacing(double)public javafx.scene.paint.Color getGridColor()
public void setGridColor(javafx.scene.paint.Color gridColor)
gridColor - the new grid Colorpublic javafx.beans.property.ObjectProperty<javafx.scene.paint.Color> gridColorProperty()
getGridColor(),
setGridColor(Color)public java.util.Map<java.lang.String,java.lang.String> getCustomProperties()
Copyright © 2014 TESIS DYNAware. All Rights Reserved.