Package com.storedobject.chart
Class Node
java.lang.Object
com.storedobject.chart.Node
- All Implemented Interfaces:
ComponentPart,ComponentProperty
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddEventListener(String eventName, Runnable action) connectWith(Node target) voidEncode the JSON string with the properties of this.getEdges()final longgetId()Each part should have a unique Id.final TooltipViewgetInfo()final StringgetName()Get the name of this part.intGet the current serial number (Serial number used internal purposes only).doubledoublesetCategory(Node.Type category) voidsetSerial(int serial) Set a serial number (Serial number used internal purposes only).setXCoord(double x) setYCoord(double y) voidvalidate()This method is invoked bySOChartto check if the component or part is valid or not.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.storedobject.chart.ComponentPart
className, getRenderingIndex, setName, setRenderingIndex
-
Constructor Details
-
Node
-
Node
-
Node
-
Node
-
-
Method Details
-
getXCoord
public double getXCoord() -
setXCoord
-
getYCoord
public double getYCoord() -
setYCoord
-
getCategory
-
setCategory
-
getInfo
-
setInfo
-
connectWith
-
addEventListener
-
getEventListeners
-
getName
Description copied from interface:ComponentPartGet the name of this part.- Specified by:
getNamein interfaceComponentPart- Returns:
- Name
-
getId
public final long getId()Description copied from interface:ComponentPartEach part should have a unique Id. (It can be a final variable and can be set by callingID.newID().- Specified by:
getIdin interfaceComponentPart- Returns:
- Unique Id.
-
setSerial
public void setSerial(int serial) Description copied from interface:ComponentPartSet a serial number (Serial number used internal purposes only). The implementation of this method must be in such a way that the serial number set here must be returned by theComponentPart.getSerial()method.- Specified by:
setSerialin interfaceComponentPart- Parameters:
serial- Serial number to set.
-
getSerial
public int getSerial()Description copied from interface:ComponentPartGet the current serial number (Serial number used internal purposes only). The serial number set by theComponentPart.setSerial(int)method should be returned by this method.- Specified by:
getSerialin interfaceComponentPart- Returns:
- Current serial number.
-
getEdges
-
setEdges
-
validate
public void validate()Description copied from interface:ComponentPartThis method is invoked bySOChartto check if the component or part is valid or not.- Specified by:
validatein interfaceComponentPart
-
encodeJSON
Description copied from interface:ComponentPropertyEncode the JSON string with the properties of this.- Specified by:
encodeJSONin interfaceComponentProperty- Parameters:
sb- Encoded JSON string to be appended to this.
-