java.lang.Object
eu.hansolo.fx.charts.data.ChartItem
eu.hansolo.fx.charts.forcedirectedgraph.GraphNode
- All Implemented Interfaces:
Item,Comparable<ChartItem>
Represents a Node in a Force Directed Graph, containing double and string values
authors: Michael Läuchli, MLaeuchli (github)
Stefan Mettler, orizion (github)
-
Property Summary
PropertiesTypePropertyDescriptionjavafx.beans.property.ObjectProperty<javafx.geometry.Point2D>javafx.beans.property.ObjectProperty<javafx.geometry.Point2D>javafx.beans.property.BooleanProperty -
Field Summary
Fields inherited from class eu.hansolo.fx.charts.data.ChartItem
FINISHED_EVENT, observers, SELECTED_EVENT, UPDATE_EVENT -
Constructor Summary
ConstructorsConstructorDescriptionGraphNode(String NAME, javafx.scene.paint.Color COLOR, Map<String, Double> NUMERIC_ATTRIBUTES, Map<String, String> STRING_ATTRIBUTES) GraphNode(javafx.geometry.Point2D POSITION, String NAME, javafx.scene.paint.Color COLOR, Map<String, Double> NUMERIC_ATTRIBUTES, Map<String, String> STRING_ATTRIBUTES) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddConnection(GraphNode node) booleancontainedIn(double x, double y, double nodeScaleFactor, double generalScaleFactor, double minRadius) booleanjavafx.beans.property.ObjectProperty<javafx.geometry.Point2D>javafx.geometry.Point2DgetDisp()Gets the value of the property disp.doublejavafx.geometry.Point2DGets the value of the property position.doubleCalculates radius from valuegetStringAttribute(String key) Returns the given string attribute, or the empty string if the attribute wasnt foundbooleanGets the value of the property selected.javafx.beans.property.ObjectProperty<javafx.geometry.Point2D>javafx.beans.property.BooleanPropertyvoidsetDisp(javafx.geometry.Point2D disp) Sets the value of the property disp.voidsetNumericAttribute(String key, double value) voidsetPosition(javafx.geometry.Point2D position) Sets the value of the property position.voidsetSelected(boolean SELECTED) Sets the value of the property selected.voidsetSizeKey(String key) Sets the key for the value which contributes towards the size of the node and sets the value of the attribute as the value of the nodeMethods inherited from class eu.hansolo.fx.charts.data.ChartItem
addChartEvtObserver, animatedProperty, categoryProperty, compareTo, descriptionProperty, equals, fillProperty, fireChartEvt, getAnimationDuration, getCategory, getDescription, getFill, getIndex, getMetadata, getName, getOldValue, getStroke, getSymbol, getTextFill, getTimestamp, getTimestampAdDateTime, getTimestampAsDateTime, getTimestampAsLocalDate, getTimestampAsLocalDate, getUnit, getValue, getX, getY, indexProperty, isAnimated, isEmptyItem, isEmptyProperty, metadataProperty, nameProperty, removeAllChartEvtObservers, removeChartEvtObserver, setAnimated, setAnimationDuration, setCategory, setDescription, setFill, setIndex, setIsEmpty, setMetadata, setName, setStroke, setSymbol, setTextFill, setTimestamp, setTimestamp, setTimestamp, setUnit, setValue, setX, setY, strokeProperty, symbolProperty, textFillProperty, timestampProperty, toString, unitProperty, valueProperty, xProperty, yProperty
-
Property Details
-
disp
public javafx.beans.property.ObjectProperty<javafx.geometry.Point2D> dispProperty- See Also:
-
position
public javafx.beans.property.ObjectProperty<javafx.geometry.Point2D> positionProperty- See Also:
-
selected
public javafx.beans.property.BooleanProperty selectedProperty- Overrides:
selectedPropertyin classChartItem- See Also:
-
-
Constructor Details
-
GraphNode
-
GraphNode
-
GraphNode
-
GraphNode
- Parameters:
numericAttributes-stringAttributes-
-
GraphNode
-
-
Method Details
-
containedIn
public boolean containedIn(double x, double y, double nodeScaleFactor, double generalScaleFactor, double minRadius) -
getRadius
public double getRadius()Calculates radius from value- Returns:
-
getSizeKey
-
setSizeKey
Sets the key for the value which contributes towards the size of the node and sets the value of the attribute as the value of the node- Parameters:
key-
-
addConnection
-
getNumericAttribute
-
setNumericAttribute
-
getStringAttribute
Returns the given string attribute, or the empty string if the attribute wasnt found- Parameters:
key-- Returns:
-
containsNumericAttribute
-
setDisp
public void setDisp(javafx.geometry.Point2D disp) Sets the value of the property disp.- Property description:
-
getDisp
public javafx.geometry.Point2D getDisp()Gets the value of the property disp.- Property description:
-
dispProperty
public javafx.beans.property.ObjectProperty<javafx.geometry.Point2D> dispProperty()- See Also:
-
getPosition
public javafx.geometry.Point2D getPosition()Gets the value of the property position.- Property description:
-
setPosition
public void setPosition(javafx.geometry.Point2D position) Sets the value of the property position.- Property description:
-
positionProperty
public javafx.beans.property.ObjectProperty<javafx.geometry.Point2D> positionProperty()- See Also:
-
isSelected
public boolean isSelected()Gets the value of the property selected.- Overrides:
isSelectedin classChartItem- Property description:
-
setSelected
public void setSelected(boolean SELECTED) Sets the value of the property selected.- Overrides:
setSelectedin classChartItem- Property description:
-
selectedProperty
public javafx.beans.property.BooleanProperty selectedProperty()- Overrides:
selectedPropertyin classChartItem- See Also:
-
getConnectedNodes
-
getNumericAttributeKeys
-
getStringAttributeKeys
-