com.stimulsoft.report.units
Class StiUnit

java.lang.Object
  extended by com.stimulsoft.base.serializing.StiSerializedObject
      extended by com.stimulsoft.report.units.StiUnit
All Implemented Interfaces:
IStiSerializable, IStiSerializableRef
Direct Known Subclasses:
StiCentimetersUnit, StiHundredthsOfInchUnit, StiInchesUnit, StiMillimetersUnit

public abstract class StiUnit
extends StiSerializedObject

Report units.


Field Summary
static StiCentimetersUnit Centimeters
           
static StiHundredthsOfInchUnit HundredthsOfInch
           
static StiInchesUnit Inches
           
static StiMillimetersUnit Millimeters
           
 
Fields inherited from interface com.stimulsoft.base.serializing.interfaceobject.IStiSerializableRef
REFERENCE_EMPTY, REFERENCE_REPORT
 
Constructor Summary
StiUnit()
           
 
Method Summary
 java.lang.Object clone()
           
abstract  double ConvertFromHInches(double value)
          Converts a value from hundredths of inch into units of this class.
 StiRectangle ConvertFromHInches(StiRectangle rect)
          Converts a rectangle from hundredths of inch into units of this class.
 StiSize ConvertFromHInches(StiSize size)
          Converts a size from hundredths of inch into units of this class.
abstract  double ConvertToHInches(double value)
          Converts a value from hundredths of inch into units of this class.
 StiRectangle ConvertToHInches(StiRectangle rect)
          Converts a rectangle from units of this class into hundredths of inch.
 StiSize ConvertToHInches(StiSize size)
          Converts a size from units of this class into hundredths of inch.
 StiRectangle ConvertToHInchesStiRectangle(StiRectangle rect)
           
abstract  double getFactor()
          Gets the ruler scale in hundredths of inch on the one step.
abstract  double getRollerStep()
          Gets ruler step.
abstract  java.lang.String getShortName()
          Gets the shor unit name.
static StiUnit GetUnitFromReportUnit(StiReportUnitType reportUnit)
           
static StiUnit LoadFromJsonObject(JSONObject jObject)
           
static JSONObject SaveToJsonObject(StiUnit unit)
           
 
Methods inherited from class com.stimulsoft.base.serializing.StiSerializedObject
cleanReference, getReference, setReference
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

Centimeters

public static StiCentimetersUnit Centimeters

HundredthsOfInch

public static StiHundredthsOfInchUnit HundredthsOfInch

Inches

public static StiInchesUnit Inches

Millimeters

public static StiMillimetersUnit Millimeters
Constructor Detail

StiUnit

public StiUnit()
Method Detail

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 java.lang.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 java.lang.Object clone()
Overrides:
clone in class java.lang.Object

SaveToJsonObject

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

LoadFromJsonObject

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