Package com.storedobject.chart
Class Toolbox
java.lang.Object
com.storedobject.chart.AbstractPart
com.storedobject.chart.VisiblePart
com.storedobject.chart.Toolbox
- All Implemented Interfaces:
Component,ComponentPart,ComponentProperty,HasPosition,VisibleProperty
Toolbox provides certain utilities (Example: "Download the chart display as an image"). Each utility is
accessed via a
ToolboxButton part that can be added to the Toolbox using the method
addButton(ToolboxButton...). Some standard buttons are already available as static classes in this
class itself.- Author:
- Syam
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic final classDownload tool button.static final classRestore tool button.static final classZoom tool button. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddButton(ToolboxButton... buttons) Add too buttons.voidEncode the JSON string with the properties of this.final PositiongetPosition(boolean create) Get the position of this on the chart display area.voidremoveButton(ToolboxButton... buttons) Remove tool buttons.final voidsetPosition(Position position) Set the position of this.voidChange the orientation of the toolbox display to vertical.voidvalidate()This method is invoked bySOChartto check if the component or part is valid or not.Methods inherited from class com.storedobject.chart.VisiblePart
isVisible, setVisibleMethods inherited from class com.storedobject.chart.AbstractPart
equals, getId, getLabelTag, getName, getSerial, getZ, hashCode, hasId, setSerial, setZMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.storedobject.chart.ComponentPart
className, getId, getName, getRenderingIndex, getSerial, setName, setRenderingIndex, setSerialMethods inherited from interface com.storedobject.chart.VisibleProperty
hide, show
-
Constructor Details
-
Toolbox
public Toolbox()Constructor. -
Toolbox
-
-
Method Details
-
encodeJSON
Description copied from interface:ComponentPropertyEncode the JSON string with the properties of this.- Specified by:
encodeJSONin interfaceComponentProperty- Overrides:
encodeJSONin classAbstractPart- Parameters:
sb- Encoded JSON string to be appended to this.
-
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- Overrides:
validatein classVisiblePart
-
getPosition
Description copied from interface:HasPositionGet the position of this on the chart display area. (Iftrueis passed as the parameter, a new position will be created if not already exists).- Specified by:
getPositionin interfaceHasPosition- Parameters:
create- Whether to create it or not.- Returns:
- Position.
-
setPosition
Description copied from interface:HasPositionSet the position of this.- Specified by:
setPositionin interfaceHasPosition- Parameters:
position- Position to set.
-
showVertically
public void showVertically()Change the orientation of the toolbox display to vertical. -
addButton
Add too buttons.- Parameters:
buttons- Buttons to add.
-
removeButton
Remove tool buttons.- Parameters:
buttons- Buttons to remove.
-