Package com.storedobject.chart
Class Position
java.lang.Object
com.storedobject.chart.Position
- All Implemented Interfaces:
ComponentProperty
Representation of a position within the chart display. Chart display always occupies a rectangular part
of the screen and the size of
this rectangle is determined by the methods used from Vaadin's
HasSize
on the
chart (SOChart
implements HasSize
interface). Using the same
standard used by CSS for absolute positioning, a part that supports positioning can use this class to define its
positioning requirements within the chart's boundary. Only just enough details need to be set for both horizontal
and vertical positions. For example: if "left" and "right" are specified, "width" will be automatically
computed. Each attribute can use absolute pixels values or percentage values. For example, left = 30% means
a horizontal position of 30% of the chart's width from the left edge of the chart.- Author:
- Syam
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Align to the bottom side (vertical).void
Align to the center (vertical).void
alignTop()
Align to the top side (vertical).void
center()
Center it.void
Encode the JSON string with the properties of this.void
Justify to the center (horizontal).void
Justify to the left side (horizontal).void
Justify to the right side (horizontal).void
Set the "bottom" size.void
Set the "height".void
Set the "left" size.void
Set the "right" size.void
Set the "top" size.void
Set the "width".
-
Constructor Details
-
Position
public Position()Constructor.
-
-
Method Details
-
setLeft
-
setRight
-
setTop
-
setBottom
-
setWidth
-
setHeight
-
justifyLeft
public void justifyLeft()Justify to the left side (horizontal). -
justifyCenter
public void justifyCenter()Justify to the center (horizontal). -
justifyRight
public void justifyRight()Justify to the right side (horizontal). -
alignTop
public void alignTop()Align to the top side (vertical). -
alignCenter
public void alignCenter()Align to the center (vertical). -
alignBottom
public void alignBottom()Align to the bottom side (vertical). -
center
public void center()Center it. -
encodeJSON
Description copied from interface:ComponentProperty
Encode the JSON string with the properties of this.- Specified by:
encodeJSON
in interfaceComponentProperty
- Parameters:
sb
- Encoded JSON string to be appended to this.
-