Class NodeExport

java.lang.Object
com.sparsity.sparksee.gdb.NodeExport

public class NodeExport extends Object
Stores the node exporting values.

When 'fit' is set to TRUE, then 'height' and 'width' will be ignored.

Some properties may be ignored depending on the exportation type.

Default values are:

Label: "" (empty string).

Shape: Box.

Color: 10863606 (0xa5c3f6).

Label color: 0 (Ox000000, Black).

Height: 25px.

Width: 25px.

Fit: TRUE.

Font size: 10.

Author:
Sparsity Technologies http://www.sparsity-technologies.com
  • Constructor Details

    • NodeExport

      public NodeExport()
      Creates a new instance.

  • Method Details

    • getLabelColorRGB

      public int getLabelColorRGB()
      Gets the node label color.

      Returns:
      The node label color.
    • setLabel

      public void setLabel(String label)
      Sets the node label.

      Parameters:
      label - [in] The node label.
    • setWidth

      public void setWidth(int width)
      Gets the node width.

      Parameters:
      width - The node width in pixels.
    • setImage

      public void setImage(String image)
      Sets the node image.

      Parameters:
      image - [in] The node image. The image should be a path to a local file or an URL. The image usage in the export depends on the exported format and shape. For Graphviz: Graphviz expects only local image paths as images in dot files unless you plan on using something like it's "dot_url_resolve.py" script to automatically download them. The Image shape is not directly supported for Graphviz. For Html: The vis.js html exports only show the image if the node shape selected is Image or Circle (that will be translated as "circularimage").
    • setColorRGB

      public void setColorRGB(int color)
      Sets the node color.

      Parameters:
      color - The node color.
    • setFontSize

      public void setFontSize(int size)
      Sets the node label font size.

      Parameters:
      size - [in] The node label font size.
    • setHeight

      public void setHeight(int height)
      Sets the node height.

      Parameters:
      height - [in] The node height in pixels.
    • setDefaults

      public void setDefaults()
      Sets to default values.

    • getLabel

      public String getLabel()
      Gets the node label.

      Returns:
      The node label.
    • getHeight

      public int getHeight()
      Gets the node height.

      Returns:
      The node height in pixels.
    • getTitle

      public String getTitle()
      Gets the node title.

      Returns:
      The node title.
    • setLabelColor

      public void setLabelColor(Color c)
      Sets the color of the label.

      Parameters:
      c - New value.
    • getWidth

      public int getWidth()
      Gets the node width.

      Returns:
      The node width in pixels.
    • copyDefaults

      public void copyDefaults(NodeExport source)
      Sets the default values using a refrerence NodeExport.

      Parameters:
      source - null
    • getImage

      public String getImage()
      Gets the node image.

      Returns:
      The node image.
    • getLabelColor

      public Color getLabelColor()
      Gets the color of the label.

    • getColor

      public Color getColor()
      Gets the color of the node.

    • getShape

      public NodeShape getShape()
      Gets the node shape.

      Returns:
      The node shape.
    • setLabelColorRGB

      public void setLabelColorRGB(int color)
      Sets the node label color.

      Parameters:
      color - [in] The node label color.
    • isFit

      public boolean isFit()
      Gets whether the node size is fitted to the label or not.

      Returns:
      If TRUE, then the node size is fitted to the label, otherwise the size is fixed with the values of 'height' and 'width'.
    • getColorRGB

      public int getColorRGB()
      Gets the node color.

      Returns:
      The node color.
    • setFit

      public void setFit(boolean fit)
      Sets the node fit property.

      Parameters:
      fit - [in] If TRUE, then the node size is fitted to the label ('height' and 'width' will be ignored), otherwise the size is fixed with the values of 'height' and 'width'.
    • getFontSize

      public int getFontSize()
      Gets the node label font size.

      Returns:
      The node label font size.
    • setColor

      public void setColor(Color c)
      Sets the color of the node.

      Parameters:
      c - New value.
    • setTitle

      public void setTitle(String title)
      Sets the node title.

      Parameters:
      title - [in] The node title.
    • setShape

      public void setShape(NodeShape shape)
      Sets the node shape.

      Parameters:
      shape - [in] The node shape.