Class StiScaleBase
java.lang.Object
com.stimulsoft.report.infographics.gauge.primitives.base.StiElementBase
com.stimulsoft.report.infographics.gauge.primitives.scales.StiScaleBase
- All Implemented Interfaces:
IStiJsonReportObject,IStiSerializable,IStiSerializableRef,IStiApplyStyleGauge,Cloneable
- Direct Known Subclasses:
StiLinearScale,StiRadialScale
public abstract class StiScaleBase
extends StiElementBase
implements IStiJsonReportObject, IStiSerializableRef
Copyright Stimulsoft
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected doubleprotected doubleFields inherited from interface com.stimulsoft.base.serializing.interfaceobject.IStiSerializableRef
REFERENCE_EMPTY, REFERENCE_REPORT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidvoidclone()Creates a new object that is a copy of the current instance.voiddrawElement(StiGaugeContextPainter context) the border of the component.getBrush()a brush to fill a component.abstract StiComponentIddoubleend width of the scale bar.getGauge()booleanvalue that indicates whether the scale should be shown in reverse mode.getItems()doublegetLeft()X coordinate of the scale relative to height of the scale container.doublethe major interval.doubleend value of the scale.doublestart value of the scale.doublethe minor interval.doublegetPosition(double value) intabstract StiGaugeElemenTypedoublestart width of the scale bar.doublegetTop()Y coordinate of the scale relative to height of the scale container.booleanisUp()voidLoadFromJsonObject(JSONObject jObject) voidvoidsetBorderBrush(StiBrush borderBrush) the border of the component.voida brush to fill a component.voidsetEndWidth(double endWidth) end width of the scale bar.voidvoidsetIsReversed(boolean isReversed) value that indicates whether the scale should be shown in reverse mode.voidvoidsetLeft(double left) X coordinate of the scale relative to height of the scale container.voidsetMajorInterval(double majorInterval) the major interval.voidsetMaximum(double maximum) end value of the scale.voidsetMinimum(double minimum) start value of the scale.voidsetMinorInterval(double minorInterval) the minor interval.voidsetReference(int reference) voidsetStartWidth(double startWidth) start width of the scale bar.voidsetTop(double top) Y coordinate of the scale relative to height of the scale container.Methods inherited from class com.stimulsoft.report.infographics.gauge.primitives.base.StiElementBase
applyStyle, isAllowApplyStyle, setAllowApplyStyle
-
Field Details
-
barGeometry
-
scaleHelper
-
gauge
-
startWidth
protected double startWidth -
endWidth
protected double endWidth
-
-
Constructor Details
-
StiScaleBase
public StiScaleBase()
-
-
Method Details
-
setReference
public void setReference(int reference) - Specified by:
setReferencein interfaceIStiSerializableRef
-
getReference
public int getReference()- Specified by:
getReferencein interfaceIStiSerializableRef
-
cleanReference
public void cleanReference() -
SaveToJsonObject
- Specified by:
SaveToJsonObjectin interfaceIStiJsonReportObject- Throws:
JSONException
-
LoadFromJsonObject
- Specified by:
LoadFromJsonObjectin interfaceIStiJsonReportObject- Throws:
JSONException
-
getComponentId
-
getPropName
-
clone
Description copied from class:StiElementBaseCreates a new object that is a copy of the current instance.- Overrides:
clonein classStiElementBase
-
isUp
public boolean isUp() -
getGauge
- Returns:
- the gauge
-
setGauge
- Parameters:
gauge- the gauge to set
-
getLeft
public double getLeft()X coordinate of the scale relative to height of the scale container.- Returns:
- the left
-
setLeft
public void setLeft(double left) X coordinate of the scale relative to height of the scale container.- Parameters:
left- the left to set
-
getTop
public double getTop()Y coordinate of the scale relative to height of the scale container.- Returns:
- the top
-
setTop
public void setTop(double top) Y coordinate of the scale relative to height of the scale container.- Parameters:
top- the top to set
-
getStartWidth
public double getStartWidth()start width of the scale bar.- Returns:
- the startWidth
-
setStartWidth
public void setStartWidth(double startWidth) start width of the scale bar.- Parameters:
startWidth- the startWidth to set
-
getEndWidth
public double getEndWidth()end width of the scale bar.- Returns:
- the endWidth
-
setEndWidth
public void setEndWidth(double endWidth) end width of the scale bar.- Parameters:
endWidth- the endWidth to set
-
getMajorInterval
public double getMajorInterval()the major interval.- Returns:
- the majorInterval
-
setMajorInterval
public void setMajorInterval(double majorInterval) the major interval.- Parameters:
majorInterval- the majorInterval to set
-
getMinorInterval
public double getMinorInterval()the minor interval.- Returns:
- the minorInterval
-
setMinorInterval
public void setMinorInterval(double minorInterval) the minor interval.- Parameters:
minorInterval- the minorInterval to set
-
getMinimum
public double getMinimum()start value of the scale.- Returns:
- the minimum
-
setMinimum
public void setMinimum(double minimum) start value of the scale.- Parameters:
minimum- the minimum to set
-
getMaximum
public double getMaximum()end value of the scale.- Returns:
- the maximum
-
setMaximum
public void setMaximum(double maximum) end value of the scale.- Parameters:
maximum- the maximum to set
-
getIsReversed
public boolean getIsReversed()value that indicates whether the scale should be shown in reverse mode.- Returns:
- the isReversed
-
setIsReversed
public void setIsReversed(boolean isReversed) value that indicates whether the scale should be shown in reverse mode.- Parameters:
isReversed- the isReversed to set
-
getBrush
a brush to fill a component.- Returns:
- the brush
-
setBrush
a brush to fill a component.- Parameters:
brush- the brush to set
-
getBorderBrush
the border of the component.- Returns:
- the borderBrush
-
setBorderBrush
the border of the component.- Parameters:
borderBrush- the borderBrush to set
-
getItems
- Returns:
- the items
-
setItems
- Parameters:
items- the items to set
-
getScaleType
-
prepare
-
calculateMinMaxScaleHelper
public void calculateMinMaxScaleHelper() -
calculateWidthScaleHelper
public void calculateWidthScaleHelper() -
getPosition
public double getPosition(double value) -
createNew
-
drawElement
- Overrides:
drawElementin classStiElementBase
-