Class NodeExport
java.lang.Object
com.sparsity.sparksee.gdb.NodeExport
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcopyDefaults(NodeExport source) Sets the default values using a refrerence NodeExport.getColor()Gets the color of the node.intGets the node color.intGets the node label font size.intGets the node height.getImage()Gets the node image.getLabel()Gets the node label.Gets the color of the label.intGets the node label color.getShape()Gets the node shape.getTitle()Gets the node title.intgetWidth()Gets the node width.booleanisFit()Gets whether the node size is fitted to the label or not.voidSets the color of the node.voidsetColorRGB(int color) Sets the node color.voidSets to default values.voidsetFit(boolean fit) Sets the node fit property.voidsetFontSize(int size) Sets the node label font size.voidsetHeight(int height) Sets the node height.voidSets the node image.voidSets the node label.voidSets the color of the label.voidsetLabelColorRGB(int color) Sets the node label color.voidSets the node shape.voidSets the node title.voidsetWidth(int width) Gets the node width.
-
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
-
setWidth
public void setWidth(int width) Gets the node width.- Parameters:
width- The node width in pixels.
-
setImage
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
-
getHeight
public int getHeight()Gets the node height.- Returns:
- The node height in pixels.
-
getTitle
-
setLabelColor
-
getWidth
public int getWidth()Gets the node width.- Returns:
- The node width in pixels.
-
copyDefaults
Sets the default values using a refrerence NodeExport.- Parameters:
source- null
-
getImage
-
getLabelColor
Gets the color of the label. -
getColor
Gets the color of the node. -
getShape
-
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
-
setTitle
-
setShape
-