com.stimulsoft.report.infographics.gauge.indicators
Class StiNeedle

java.lang.Object
  extended by com.stimulsoft.report.infographics.gauge.primitives.base.StiElementBase
      extended by com.stimulsoft.report.infographics.gauge.primitives.base.StiGaugeElement
          extended by com.stimulsoft.report.infographics.gauge.primitives.indicators.StiIndicatorBase
              extended by com.stimulsoft.report.infographics.gauge.indicators.StiNeedle
All Implemented Interfaces:
IStiJsonReportObject, IStiSerializable, IStiSerializableRef, IStiApplyStyleGauge, java.lang.Cloneable

public class StiNeedle
extends StiIndicatorBase

Copyright Stimulsoft


Field Summary
 
Fields inherited from interface com.stimulsoft.base.serializing.interfaceobject.IStiSerializableRef
REFERENCE_EMPTY, REFERENCE_REPORT
 
Constructor Summary
StiNeedle()
           
 
Method Summary
 void applyStyle(IStiGaugeStyle style)
          Apply style to component which release this interface.
 StiGaugeElement createNew()
           
 void drawElement(StiGaugeContextPainter context)
           
 StiBrush getBrush()
           
 StiBrush getCapBorderBrush()
          the border of the cap.
 double getCapBorderWidth()
          the border thickness of the cap.
 StiBrush getCapBrush()
          a brush to fill a cap.
 StiPoint getCenterPoint()
          the center coordinate, around which it rotates.
 StiComponentId getComponentId()
           
 StiGaugeElementSkin getCustomSkin()
           
 StiGaugeElemenType getElementType()
           
 double getEndWidth()
           
 StiFont getFont()
          font of component.
 java.lang.String getFormat()
          the format string for the ShowValue property.
 java.lang.String getLocalizeName()
           
 double getOffsetNeedle()
           
 double getRelativeHeight()
          the height factor relative to the height of the basic component.
 double getRelativeWidth()
          the width ratio relative to the height of the basic component.
 StiNeedleSkin getSkin()
          the skin of the component rendering.
 double getStartWidth()
           
 StiBrush getTextBrush()
          a brush to draw text.
 void interactiveClick(StiRectangle rect, StiPoint p)
           
 boolean isAutoCalculateCenterPoint()
          a value indicating whether to calculate CenterPoint for the indicator automatically.
 boolean isShowValue()
          a value indicating whether to display a current value of the indicator.
 void LoadFromJsonObject(JSONObject jObject)
           
 JSONObject SaveToJsonObject(StiJsonSaveMode mode)
           
 void setAutoCalculateCenterPoint(boolean autoCalculateCenterPoint)
          a value indicating whether to calculate CenterPoint for the indicator automatically.
 void setBrush(StiBrush brush)
           
 void setCapBorderBrush(StiBrush capBorderBrush)
          the border of the cap.
 void setCapBorderWidth(double capBorderWidth)
          the border thickness of the cap.
 void setCapBrush(StiBrush capBrush)
          a brush to fill a cap.
 void setCenterPoint(StiPoint centerPoint)
          the center coordinate, around which it rotates.
 void setCustomSkin(StiGaugeElementSkin customSkin)
           
 void setEndWidth(double endWidth)
           
 void setFont(StiFont font)
          font of component.
 void setFormat(java.lang.String format)
          the format string for the ShowValue property.
 void setOffsetNeedle(double offsetNeedle)
           
 void setRelativeHeight(double relativeHeight)
          the height factor relative to the height of the basic component.
 void setRelativeWidth(double relativeWidth)
          the width ratio relative to the height of the basic component.
 void setShowValue(boolean showValue)
          a value indicating whether to display a current value of the indicator.
 void setSkin(StiNeedleSkin skin)
          the skin of the component rendering.
 void setStartWidth(double startWidth)
           
 void setTextBrush(StiBrush textBrush)
          a brush to draw text.
 
Methods inherited from class com.stimulsoft.report.infographics.gauge.primitives.indicators.StiIndicatorBase
clone, getBorderBrush, getBorderWidth, getGetValueEvent, getPlacement, getValue, getValueObj, InvokeGetValue, prepareGaugeElement, setBorderBrush, setBorderWidth, setGetValueEvent, setPlacement, setValue, setValueObj
 
Methods inherited from class com.stimulsoft.report.infographics.gauge.primitives.base.StiGaugeElement
cleanReference, getAnimation, getReference, getScale, setAnimation, setReference, setScale
 
Methods inherited from class com.stimulsoft.report.infographics.gauge.primitives.base.StiElementBase
isAllowApplyStyle, setAllowApplyStyle
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StiNeedle

public StiNeedle()
Method Detail

SaveToJsonObject

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

LoadFromJsonObject

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

getComponentId

public StiComponentId getComponentId()

applyStyle

public void applyStyle(IStiGaugeStyle style)
Description copied from interface: IStiApplyStyleGauge
Apply style to component which release this interface.

Specified by:
applyStyle in interface IStiApplyStyleGauge
Overrides:
applyStyle in class StiElementBase

getFormat

public java.lang.String getFormat()
the format string for the ShowValue property.

Returns:
the format

setFormat

public void setFormat(java.lang.String format)
the format string for the ShowValue property.

Parameters:
format - the format to set

isShowValue

public boolean isShowValue()
a value indicating whether to display a current value of the indicator.

Returns:
the showValue

setShowValue

public void setShowValue(boolean showValue)
a value indicating whether to display a current value of the indicator.

Parameters:
showValue - the showValue to set

getTextBrush

public StiBrush getTextBrush()
a brush to draw text.

Returns:
the textBrush

setTextBrush

public void setTextBrush(StiBrush textBrush)
a brush to draw text.

Parameters:
textBrush - the textBrush to set

getFont

public StiFont getFont()
font of component.

Returns:
the font

setFont

public void setFont(StiFont font)
font of component.

Parameters:
font - the font to set

getCapBrush

public StiBrush getCapBrush()
a brush to fill a cap.

Returns:
the capBrush

setCapBrush

public void setCapBrush(StiBrush capBrush)
a brush to fill a cap.

Parameters:
capBrush - the capBrush to set

getCapBorderBrush

public StiBrush getCapBorderBrush()
the border of the cap.

Returns:
the capBorderBrush

setCapBorderBrush

public void setCapBorderBrush(StiBrush capBorderBrush)
the border of the cap.

Parameters:
capBorderBrush - the capBorderBrush to set

getCapBorderWidth

public double getCapBorderWidth()
the border thickness of the cap.

Returns:
the capBorderWidth

setCapBorderWidth

public void setCapBorderWidth(double capBorderWidth)
the border thickness of the cap.

Parameters:
capBorderWidth - the capBorderWidth to set

getOffsetNeedle

public double getOffsetNeedle()
Returns:
the offsetNeedle

setOffsetNeedle

public void setOffsetNeedle(double offsetNeedle)
Parameters:
offsetNeedle - the offsetNeedle to set

getStartWidth

public double getStartWidth()
Returns:
the startWidth

setStartWidth

public void setStartWidth(double startWidth)
Parameters:
startWidth - the startWidth to set

getEndWidth

public double getEndWidth()
Returns:
the endWidth

setEndWidth

public void setEndWidth(double endWidth)
Parameters:
endWidth - the endWidth to set

isAutoCalculateCenterPoint

public boolean isAutoCalculateCenterPoint()
a value indicating whether to calculate CenterPoint for the indicator automatically.

Returns:
the autoCalculateCenterPoint

setAutoCalculateCenterPoint

public void setAutoCalculateCenterPoint(boolean autoCalculateCenterPoint)
a value indicating whether to calculate CenterPoint for the indicator automatically.

Parameters:
autoCalculateCenterPoint - the autoCalculateCenterPoint to set

getCenterPoint

public StiPoint getCenterPoint()
the center coordinate, around which it rotates. The minimum value - Point (0,0), the maximum - Point (1,1).

Returns:
the centerPoint

setCenterPoint

public void setCenterPoint(StiPoint centerPoint)
the center coordinate, around which it rotates. The minimum value - Point (0,0), the maximum - Point (1,1).

Parameters:
centerPoint - the centerPoint to set

getRelativeHeight

public double getRelativeHeight()
the height factor relative to the height of the basic component.

Returns:
the relativeHeight

setRelativeHeight

public void setRelativeHeight(double relativeHeight)
the height factor relative to the height of the basic component.

Parameters:
relativeHeight - the relativeHeight to set

getRelativeWidth

public double getRelativeWidth()
the width ratio relative to the height of the basic component.

Returns:
the relativeWidth

setRelativeWidth

public void setRelativeWidth(double relativeWidth)
the width ratio relative to the height of the basic component.

Parameters:
relativeWidth - the relativeWidth to set

getSkin

public StiNeedleSkin getSkin()
the skin of the component rendering.

Returns:
the skin

setSkin

public void setSkin(StiNeedleSkin skin)
the skin of the component rendering.

Parameters:
skin - the skin to set

getCustomSkin

public StiGaugeElementSkin getCustomSkin()
Returns:
the customSkin

setCustomSkin

public void setCustomSkin(StiGaugeElementSkin customSkin)
Parameters:
customSkin - the customSkin to set

getBrush

public StiBrush getBrush()
Overrides:
getBrush in class StiIndicatorBase
Returns:
the brush

setBrush

public void setBrush(StiBrush brush)
Overrides:
setBrush in class StiIndicatorBase
Parameters:
brush - the brush to set

getElementType

public StiGaugeElemenType getElementType()
Overrides:
getElementType in class StiGaugeElement

getLocalizeName

public java.lang.String getLocalizeName()
Overrides:
getLocalizeName in class StiGaugeElement

createNew

public StiGaugeElement createNew()
Overrides:
createNew in class StiGaugeElement

drawElement

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

interactiveClick

public void interactiveClick(StiRectangle rect,
                             StiPoint p)