Class NodeEdgeModel

java.lang.Object
eu.hansolo.fx.charts.forcedirectedgraph.NodeEdgeModel

public class NodeEdgeModel extends Object
authors: Michael Läuchli, MLaeuchli (github) Stefan Mettler, orizion (github)
  • Property Details

  • Field Details

    • DEFAULT

      public static String DEFAULT
  • Constructor Details

  • Method Details

    • setGroupColors

      public void setGroupColors(String group)
      Sets the group Key and colors on all nodes, in the colors of the group's associated color. The currentColorscheme will be created if it doesnt exist already
      Parameters:
      group -
    • setGroupColors

      public void setGroupColors()
      Sets the group Key and colors on all nodes to the current group key, in the colors of the group's associated color. The currentColorscheme will be created if it doesnt exist already
    • setGroupColorScheme

      public void setGroupColorScheme(String groupKey, HashMap<String,javafx.scene.paint.Color> colorscheme)
      The key "default" is used for nodes not matching any other entries in the scheme
      Parameters:
      colorscheme -
    • getOrCreateGroupColorScheme

      public HashMap<String,javafx.scene.paint.Color> getOrCreateGroupColorScheme(String group)
      Creates or returns (if it already exists) the color scheme for the given grouping key
      Parameters:
      group -
      Returns:
    • getOrCreateGroupColorScheme

      public HashMap<String,javafx.scene.paint.Color> getOrCreateGroupColorScheme()
      Get or create the colorscheme for the current group
      Returns:
    • getDistinctValuesPerGroupKey

      public HashMap<String,ArrayList<String>> getDistinctValuesPerGroupKey()
    • getDistinctValuesPerGroupKey

      public ArrayList<String> getDistinctValuesPerGroupKey(String groupKey)
    • getGroupValueColor

      public javafx.scene.paint.Color getGroupValueColor(String value, String key)
    • setGroupValueColor

      public void setGroupValueColor(String value, String key, javafx.scene.paint.Color color)
    • addColorTheme

      public void addColorTheme(List<javafx.scene.paint.Color> theme, String key)
    • instantiateColorScheme

      public void instantiateColorScheme(String colorThemeKey)
    • instantiateColorScheme

      public void instantiateColorScheme()
    • setCurrentColorThemeKey

      public void setCurrentColorThemeKey(String currentColorThemeKey)
    • getCurrentColorThemeKey

      public String getCurrentColorThemeKey()
    • getColorThemeKeys

      public Set<String> getColorThemeKeys()
    • isAlwaysNormalize

      public boolean isAlwaysNormalize()
      Gets the value of the property alwaysNormalize.
      Property description:
    • alwaysNormalizeProperty

      public javafx.beans.property.BooleanProperty alwaysNormalizeProperty()
      See Also:
    • setAlwaysNormalize

      public void setAlwaysNormalize(boolean alwaysNormalize)
      Sets the value of the property alwaysNormalize.
      Property description:
    • isNeverNormalize

      public boolean isNeverNormalize()
      Gets the value of the property neverNormalize.
      Property description:
    • neverNormalizeProperty

      public javafx.beans.property.BooleanProperty neverNormalizeProperty()
      See Also:
    • setNeverNormalize

      public void setNeverNormalize(boolean neverNormalize)
      Sets the value of the property neverNormalize.
      Property description:
    • isNormalizeIfNotBetweenZeroAndOne

      public boolean isNormalizeIfNotBetweenZeroAndOne()
      Gets the value of the property normalizeIfNotBetweenZeroAndOne.
      Property description:
    • normalizeIfNotBetweenZeroAndOneProperty

      public javafx.beans.property.BooleanProperty normalizeIfNotBetweenZeroAndOneProperty()
      See Also:
    • setNormalizeIfNotBetweenZeroAndOne

      public void setNormalizeIfNotBetweenZeroAndOne(boolean normalizeIfNotBetweenZeroAndOne)
      Sets the value of the property normalizeIfNotBetweenZeroAndOne.
      Property description:
    • setNodeSizeKey

      public void setNodeSizeKey(String key)
      Sets the attribute associated with the key key as the value of all nodes. This means effectively that now the Value of the attribute is used for the radius calculation of the node
      Parameters:
      key -
    • setNodeSizeFromAttributeNotNormalized

      public void setNodeSizeFromAttributeNotNormalized(String key)
    • setEdgeForceFromAttributeNormalized

      public void setEdgeForceFromAttributeNormalized(String key)
    • setEdgeWidthFromAttributeNormalized

      public void setEdgeWidthFromAttributeNormalized(String key)
    • setEdgeForceFromAttributeNotNormalized

      public void setEdgeForceFromAttributeNotNormalized(String key)
    • setEdgeWithFromAttributeNotNormalized

      public void setEdgeWithFromAttributeNotNormalized(String key)
    • printPositionsOnConsole

      public void printPositionsOnConsole()
    • getNumericAttributeKeysOfNodes

      public ArrayList<String> getNumericAttributeKeysOfNodes()
    • getStringAttributeKeysOfNodes

      public ArrayList<String> getStringAttributeKeysOfNodes()
      Returns a list of Strings representing all the attributes of a node
      Returns:
    • getNumericAttributeKeysOfEdges

      public ArrayList<String> getNumericAttributeKeysOfEdges()
    • setupConnectedNotes

      public void setupConnectedNotes()
    • getNodeAt

      public GraphNode getNodeAt(double X, double Y, double scaleFactor, double minRadius, double nodeSizeFactor)
      Iterats trough nodes and returns the first Node Found in that area
      Parameters:
      X - XPosition of click translated to Real Position (see xPositionDrawnToReal in Graphpanel)
      Y - YPosition of click translated to Real Position (see yPositionDrawnToReal in Graphpanel)
      scaleFactor - Factor that scales the drawn size of the Node
      minRadius - Minimal Radius tha drawn Node has
      Returns:
      First node found or null
    • getNodes

      public ArrayList<GraphNode> getNodes()
    • getEdges

      public ArrayList<GraphEdge> getEdges()
    • getCurrentSizeKey

      public String getCurrentSizeKey()
    • getCurrentGroupKey

      public String getCurrentGroupKey()
    • getCurrentForceKey

      public String getCurrentForceKey()
    • getCurrentEdgeWithKey

      public String getCurrentEdgeWithKey()
    • getNodeBorderColor

      public javafx.scene.paint.Color getNodeBorderColor()
      Gets the value of the property nodeBorderColor.
      Property description:
    • setNodeBorderColor

      public void setNodeBorderColor(javafx.scene.paint.Color COLOR)
      Sets the value of the property nodeBorderColor.
      Property description:
    • nodeBorderColorProperty

      public javafx.beans.property.ObjectProperty<javafx.scene.paint.Color> nodeBorderColorProperty()
      See Also:
    • isModified

      public boolean isModified()
    • setModified

      public void setModified(boolean modified)
    • isModifiedProperty

      public javafx.beans.property.BooleanProperty isModifiedProperty()
    • setEdgeWithKey

      public void setEdgeWithKey(String key)
    • setEdgeForceKey

      public void setEdgeForceKey(String key)