java.lang.Object
eu.hansolo.fx.charts.data.ChartItem
eu.hansolo.fx.charts.forcedirectedgraph.GraphNode
All Implemented Interfaces:
Item, Comparable<ChartItem>

public class GraphNode extends 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 Details

  • Constructor Details

  • 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

      public String getSizeKey()
    • setSizeKey

      public void setSizeKey(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 node
      Parameters:
      key -
    • addConnection

      public void addConnection(GraphNode node)
    • getNumericAttribute

      public double getNumericAttribute(String key)
    • setNumericAttribute

      public void setNumericAttribute(String key, double value)
    • getStringAttribute

      public String getStringAttribute(String key)
      Returns the given string attribute, or the empty string if the attribute wasnt found
      Parameters:
      key -
      Returns:
    • containsNumericAttribute

      public boolean containsNumericAttribute(String key)
    • 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:
      isSelected in class ChartItem
      Property description:
    • setSelected

      public void setSelected(boolean SELECTED)
      Sets the value of the property selected.
      Overrides:
      setSelected in class ChartItem
      Property description:
    • selectedProperty

      public javafx.beans.property.BooleanProperty selectedProperty()
      Overrides:
      selectedProperty in class ChartItem
      See Also:
    • getConnectedNodes

      public ArrayList<GraphNode> getConnectedNodes()
    • getNumericAttributeKeys

      public ArrayList<String> getNumericAttributeKeys()
    • getStringAttributeKeys

      public ArrayList<String> getStringAttributeKeys()