All Implemented Interfaces:
IStiJsonReportObject, IStiSerializable, IStiSerializableRef, IStiApplyStyleGauge, Cloneable

public class StiNeedle extends StiIndicatorBase
Copyright Stimulsoft
  • Constructor Details

    • StiNeedle

      public StiNeedle()
  • Method Details

    • 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
      Parameters:
      style -
    • getFormat

      public String getFormat()
      the format string for the ShowValue property.
      Returns:
      the format
    • setFormat

      public void setFormat(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 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)
      Specified by:
      interactiveClick in class StiIndicatorBase