com.stimulsoft.report.infographics.gauge.primitives.scales
Class StiScaleBase

java.lang.Object
  extended by com.stimulsoft.report.infographics.gauge.primitives.base.StiElementBase
      extended by com.stimulsoft.report.infographics.gauge.primitives.scales.StiScaleBase
All Implemented Interfaces:
IStiJsonReportObject, IStiSerializable, IStiSerializableRef, IStiApplyStyleGauge, java.lang.Cloneable
Direct Known Subclasses:
StiLinearScale, StiRadialScale

public abstract class StiScaleBase
extends StiElementBase
implements IStiJsonReportObject, IStiSerializableRef

Copyright Stimulsoft


Nested Class Summary
 class StiScaleBase.StiScaleHelper
           
 
Field Summary
 IStiScaleBarGeometry barGeometry
           
 StiGauge gauge
           
 StiScaleBase.StiScaleHelper scaleHelper
           
 
Fields inherited from interface com.stimulsoft.base.serializing.interfaceobject.IStiSerializableRef
REFERENCE_EMPTY, REFERENCE_REPORT
 
Constructor Summary
StiScaleBase()
           
 
Method Summary
 void cleanReference()
           
 java.lang.Object clone()
          Creates a new object that is a copy of the current instance.
 StiScaleBase createNew()
           
 void drawElement(StiGaugeContextPainter context)
           
 StiBrush getBorderBrush()
          the border of the component.
 StiBrush getBrush()
          a brush to fill a component.
abstract  StiComponentId getComponentId()
           
 double getEndWidth()
          end width of the scale bar.
 StiGauge getGauge()
           
 boolean getIsReversed()
          value that indicates whether the scale should be shown in reverse mode.
 StiGaugeElementCollection getItems()
           
 double getLeft()
          X coordinate of the scale relative to height of the scale container.
 double getMajorInterval()
          the major interval.
 double getMaximum()
          end value of the scale.
 double getMinimum()
          start value of the scale.
 double getMinorInterval()
          the minor interval.
 double getPosition(double value)
           
 java.lang.String getPropName()
           
 int getReference()
           
abstract  StiGaugeElemenType getScaleType()
           
 double getStartWidth()
          start width of the scale bar.
 double getTop()
          Y coordinate of the scale relative to height of the scale container.
 boolean isUp()
           
 void LoadFromJsonObject(JSONObject jObject)
           
 void prepare(StiGauge gauge)
           
 JSONObject SaveToJsonObject(StiJsonSaveMode mode)
           
 void setBorderBrush(StiBrush borderBrush)
          the border of the component.
 void setBrush(StiBrush brush)
          a brush to fill a component.
 void setEndWidth(double endWidth)
          end width of the scale bar.
 void setGauge(StiGauge gauge)
           
 void setIsReversed(boolean isReversed)
          value that indicates whether the scale should be shown in reverse mode.
 void setItems(StiGaugeElementCollection items)
           
 void setLeft(double left)
          X coordinate of the scale relative to height of the scale container.
 void setMajorInterval(double majorInterval)
          the major interval.
 void setMaximum(double maximum)
          end value of the scale.
 void setMinimum(double minimum)
          start value of the scale.
 void setMinorInterval(double minorInterval)
          the minor interval.
 void setReference(int reference)
          Установить значение ссылки.
 void setStartWidth(double startWidth)
          start width of the scale bar.
 void setTop(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
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

barGeometry

public IStiScaleBarGeometry barGeometry

scaleHelper

public StiScaleBase.StiScaleHelper scaleHelper

gauge

public StiGauge gauge
Constructor Detail

StiScaleBase

public StiScaleBase()
Method Detail

setReference

public void setReference(int reference)
Description copied from interface: IStiSerializableRef
Установить значение ссылки.

Specified by:
setReference in interface IStiSerializableRef
Parameters:
reference - значение ссылки

getReference

public int getReference()
Specified by:
getReference in interface IStiSerializableRef
Returns:
значение ссылки.

cleanReference

public void cleanReference()

SaveToJsonObject

public JSONObject SaveToJsonObject(StiJsonSaveMode mode)
                            throws JSONException
Specified by:
SaveToJsonObject in interface IStiJsonReportObject
Throws:
JSONException

LoadFromJsonObject

public void LoadFromJsonObject(JSONObject jObject)
                        throws JSONException
Specified by:
LoadFromJsonObject in interface IStiJsonReportObject
Throws:
JSONException

getComponentId

public abstract StiComponentId getComponentId()

getPropName

public java.lang.String getPropName()

clone

public java.lang.Object clone()
Description copied from class: StiElementBase
Creates a new object that is a copy of the current instance.

Overrides:
clone in class StiElementBase

isUp

public boolean isUp()

getGauge

public StiGauge getGauge()
Returns:
the gauge

setGauge

public void setGauge(StiGauge gauge)
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

public StiBrush getBrush()
a brush to fill a component.

Returns:
the brush

setBrush

public void setBrush(StiBrush brush)
a brush to fill a component.

Parameters:
brush - the brush to set

getBorderBrush

public StiBrush getBorderBrush()
the border of the component.

Returns:
the borderBrush

setBorderBrush

public void setBorderBrush(StiBrush borderBrush)
the border of the component.

Parameters:
borderBrush - the borderBrush to set

getItems

public StiGaugeElementCollection getItems()
Returns:
the items

setItems

public void setItems(StiGaugeElementCollection items)
Parameters:
items - the items to set

getScaleType

public abstract StiGaugeElemenType getScaleType()

prepare

public void prepare(StiGauge gauge)

getPosition

public double getPosition(double value)

createNew

public StiScaleBase createNew()

drawElement

public void drawElement(StiGaugeContextPainter context)
Overrides:
drawElement in class StiElementBase