Package com.storedobject.chart
Class AbstractPart
java.lang.Object
com.storedobject.chart.AbstractPart
- All Implemented Interfaces:
ComponentPart,ComponentProperty
- Direct Known Subclasses:
AbstractDataZoom,Chart,ComposedPart,Shape,VisiblePart
Represents an abstract
ComponentPart with some common base properties.- Author:
- Syam
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidEncode the JSON string with the properties of this.booleanfinal longgetId()Get a unique Id for this part.protected StringgetName()Get the name of this part.final intGet the current serial number (Serial number used for internal purposes only).final intgetZ()Get the Z (determines the overlap order when displayed on the screen) of this.inthashCode()protected booleanhasId()Whether Id needs to be sent as part of the JSON or not.final voidsetSerial(int serial) Set a serial number (Serial number used for internal purposes only).final voidsetZ(int z) Set the Z (determines the overlap order when displayed on the screen) of this.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.storedobject.chart.ComponentPart
className, getRenderingIndex, setName, setRenderingIndex, validate
-
Constructor Details
-
AbstractPart
public AbstractPart()
-
-
Method Details
-
getId
public final long getId()Get a unique Id for this part.- Specified by:
getIdin interfaceComponentPart- Returns:
- Unique Id.
-
hasId
protected boolean hasId()Whether Id needs to be sent as part of the JSON or not.- Returns:
- True/false.
-
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.
-
getLabelTag
-
getName
Get the name of this part. It could be null if not set or not supported.- Specified by:
getNamein interfaceComponentPart- Returns:
- Default is
null.
-
getSerial
public final int getSerial()Description copied from interface:ComponentPartGet the current serial number (Serial number used for 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.
-
setSerial
public final void setSerial(int serial) Description copied from interface:ComponentPartSet a serial number (Serial number used for 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.
-
equals
-
hashCode
-
getZ
public final int getZ()Get the Z (determines the overlap order when displayed on the screen) of this.- Returns:
- Z value.
-
setZ
public final void setZ(int z) Set the Z (determines the overlap order when displayed on the screen) of this.- Parameters:
z- Z value to set.
-