com.stimulsoft.report.components
Class StiMargins

java.lang.Object
  extended by com.stimulsoft.report.components.StiMargins
All Implemented Interfaces:
IStiDefault, IStiSerializable, IStiSerializableToString, java.lang.Cloneable

public class StiMargins
extends java.lang.Object
implements IStiSerializableToString, java.lang.Cloneable, IStiDefault

Describes the class that realizes object margins.


Field Summary
static StiMargins Empty
           
 
Constructor Summary
StiMargins()
          Creates a new object of the type StiMargins.
StiMargins(double left, double right, double top, double bottom)
          Creates a new object of the type StiMargins.
 
Method Summary
 java.lang.Object clone()
          Creates a new object that is a copy of the current instance.
 void deserialize(java.lang.String strObject)
          Десериализация объекта из строки.
 StiMargins deserializeString(java.lang.String stringValue)
           
 boolean equals(java.lang.Object obj)
          Tests to see whether the specified object is a StiSize with the same dimensions as this StiSize.
 double getBottom()
          Gets or sets bottom magin size on the object.
 double getLeft()
          Gets or sets left magin size on the object.
 double getRight()
          Gets or sets right magin size on the object.
 double getTop()
          Gets or sets top magin size on the object.
 int hashCode()
          Returns a hash code for this StiSize structure.
 boolean isDefault()
           
 boolean isEmpty()
           
 void LoadFromJsonObject(JSONObject jObject)
           
 JSONObject SaveToJsonObject(StiJsonSaveMode mode, double defLeft, double defRight, double defTop, double defBotttom)
           
 java.lang.String serialize()
          Сериализация объекта в строку.
 void setBottom(double value)
           
 void setLeft(double value)
           
 void setRight(double value)
           
 void setTop(double value)
           
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

Empty

public static StiMargins Empty
Constructor Detail

StiMargins

public StiMargins()
Creates a new object of the type StiMargins.


StiMargins

public StiMargins(double left,
                  double right,
                  double top,
                  double bottom)
Creates a new object of the type StiMargins.

Parameters:
left - Left magin size on the object.
right - Right magin size on the object.
top - Top magin size on the object.
bottom - Bottom magin size on the object.
Method Detail

getLeft

public final double getLeft()
Gets or sets left magin size on the object.


setLeft

public final void setLeft(double value)

getRight

public final double getRight()
Gets or sets right magin size on the object.


setRight

public final void setRight(double value)

getTop

public final double getTop()
Gets or sets top magin size on the object.


setTop

public final void setTop(double value)

getBottom

public final double getBottom()
Gets or sets bottom magin size on the object.


setBottom

public final void setBottom(double value)

isEmpty

public final boolean isEmpty()

equals

public boolean equals(java.lang.Object obj)
Tests to see whether the specified object is a StiSize with the same dimensions as this StiSize.

Overrides:
equals in class java.lang.Object
Parameters:
obj - The Object to test.
Returns:
This method returns true if obj is a StiSize and has the same width and height as this StiSize; otherwise, false.

hashCode

public int hashCode()
Returns a hash code for this StiSize structure.

Overrides:
hashCode in class java.lang.Object
Returns:
An integer value that specifies a hash value for this StiSize structure.

clone

public final java.lang.Object clone()
Creates a new object that is a copy of the current instance.

Overrides:
clone in class java.lang.Object
Returns:
A new object that is a copy of this instance.

deserialize

public void deserialize(java.lang.String strObject)
Description copied from interface: IStiSerializableToString
Десериализация объекта из строки. Все свойства объекта устанавливаются за счет распарсивания строки.

Specified by:
deserialize in interface IStiSerializableToString

deserializeString

public StiMargins deserializeString(java.lang.String stringValue)

serialize

public java.lang.String serialize()
Description copied from interface: IStiSerializableToString
Сериализация объекта в строку.

Specified by:
serialize in interface IStiSerializableToString
Returns:
строковое представление объекта

isDefault

public boolean isDefault()
Specified by:
isDefault in interface IStiDefault

SaveToJsonObject

public JSONObject SaveToJsonObject(StiJsonSaveMode mode,
                                   double defLeft,
                                   double defRight,
                                   double defTop,
                                   double defBotttom)
                            throws JSONException
Throws:
JSONException

LoadFromJsonObject

public void LoadFromJsonObject(JSONObject jObject)
                        throws JSONException
Throws:
JSONException