Class StiUnit

All Implemented Interfaces:
IStiSerializable, IStiSerializableRef
Direct Known Subclasses:
StiCentimetersUnit, StiHundredthsOfInchUnit, StiInchesUnit, StiMillimetersUnit

public abstract class StiUnit extends StiSerializedObject
Report units.
  • Field Details

  • Constructor Details

    • StiUnit

      public StiUnit()
  • Method Details

    • GetUnitFromReportUnit

      public static StiUnit GetUnitFromReportUnit(StiReportUnitType reportUnit)
    • getRollerStep

      public abstract double getRollerStep()
      Gets ruler step.
    • getFactor

      public abstract double getFactor()
      Gets the ruler scale in hundredths of inch on the one step.
    • getShortName

      public abstract String getShortName()
      Gets the shor unit name.
    • ConvertToHInches

      public abstract double ConvertToHInches(double value)
      Converts a value from hundredths of inch into units of this class.
      Parameters:
      value - Value for conversion.
      Returns:
      Converted value.
    • ConvertFromHInches

      public abstract double ConvertFromHInches(double value)
      Converts a value from hundredths of inch into units of this class.
      Parameters:
      value - Value for conversion.
      Returns:
      Converted value.
    • ConvertToHInches

      public final StiRectangle ConvertToHInches(StiRectangle rect)
      Converts a rectangle from units of this class into hundredths of inch.
      Parameters:
      rect - Rectangle for conversion.
      Returns:
      Converted rectangle.
    • ConvertToHInchesStiRectangle

      public final StiRectangle ConvertToHInchesStiRectangle(StiRectangle rect)
    • ConvertFromHInches

      public final StiRectangle ConvertFromHInches(StiRectangle rect)
      Converts a rectangle from hundredths of inch into units of this class.
      Parameters:
      rect - Rectangle for conversion.
      Returns:
      Converted rectangle.
    • ConvertToHInches

      public final StiSize ConvertToHInches(StiSize size)
      Converts a size from units of this class into hundredths of inch.
      Parameters:
      size - Size for conversion.
      Returns:
      Converted size.
    • ConvertFromHInches

      public final StiSize ConvertFromHInches(StiSize size)
      Converts a size from hundredths of inch into units of this class.
      Parameters:
      size - Size for conversion.
      Returns:
      Converted size.
    • clone

      public Object clone()
      Overrides:
      clone in class Object
    • SaveToJsonObject

      public static JSONObject SaveToJsonObject(StiUnit unit) throws JSONException
      Throws:
      JSONException
    • LoadFromJsonObject

      public static StiUnit LoadFromJsonObject(JSONObject jObject) throws JSONException
      Throws:
      JSONException