com.stimulsoft.base.drawing
Class StiBorder

java.lang.Object
  extended by com.stimulsoft.base.drawing.StiBorder
All Implemented Interfaces:
IStiDefault, IStiSerializable, IStiSerializableToString, java.lang.Cloneable
Direct Known Subclasses:
StiAdvancedBorder

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

Class describes a border.


Field Summary
 StiEnumSet<StiBorderSides> side
           
 
Constructor Summary
StiBorder()
          Creates a new instance of the StiBorder class.
StiBorder(StiBorderSides side, StiColor color, double size, StiPenStyle style)
          Creates a new instance of the StiBorder class.
StiBorder(StiBorderSides side, StiColor color, double size, StiPenStyle style, java.lang.Boolean topmost)
          Creates a new instance of the StiBorder class.
StiBorder(StiBorderSides side, StiColor color, double size, StiPenStyle style, boolean dropShadow, double shadowSize, StiBrush shadowBrush)
           
StiBorder(StiEnumSet<StiBorderSides> side, StiColor color, double size, StiPenStyle style)
           
StiBorder(StiEnumSet<StiBorderSides> side, StiColor color, double size, StiPenStyle style, boolean dropShadow, double shadowSize, StiBrush shadowBrush)
          Creates a new instance of the StiBorder class.
StiBorder(StiEnumSet<StiBorderSides> side, StiColor color, double size, StiPenStyle style, boolean dropShadow, double shadowSize, StiBrush shadowBrush, boolean topmost)
          Creates a new instance of the StiBorder class.
StiBorder(StiEnumSet<StiBorderSides> side, StiColor color, int size, StiPenStyle style, boolean dropShadow, double shadowSize, StiBrush shadowBrush)
           
 
Method Summary
 java.lang.Object clone()
          Creates a new object that is a copy of the current instance.
 void deserialize(java.lang.String strObject)
          Десериализация объекта из строки.
 void draw(StiGraphics g, StiRectangle rect, double zoom, StiColor emptyColor, StiHighlightState highlightState, java.lang.Boolean isPrinting, java.lang.Boolean isThumbPaint, double pageZoom)
          Draws this border on the indicated Graphics.
 boolean equals(java.lang.Object obj)
           
 StiColor getColor()
          Gets or sets a border color.
 boolean getDropShadow()
          Gets or sets value which indicates drop shadow or not.
 StiBrush getShadowBrush()
          Gets or sets the border shadow brush.
 double getShadowSize()
          Gets or sets Shadow Size.
 StiEnumSet<StiBorderSides> getSide()
          Gets or sets frame borders.
 double getSize()
          Gets or sets a border size.
 float getSizeOffset()
           
 StiPenStyle getStyle()
          Gets or sets a border style.
 boolean getTopmost()
          Gets or sets value which indicates that border sides will be drawn on top of all components.
 int hashCode()
           
 boolean isAllBorderSidesPresent()
          Gets value which indicates that all sides of border is present.
 boolean isBottomBorderSidePresent()
          Gets value which indicates that bottom side of border is present.
 boolean isDefault()
          Gets value indicates, that this object-frame is by default.
static boolean isDefault(StiBorderSides side, StiColor color, double size, StiPenStyle style, boolean dropShadow, double shadowSize, boolean topmost)
           
 boolean isLeftBorderSidePresent()
          Gets value which indicates that left side of border is present.
 boolean isRightBorderSidePresent()
          Gets value which indicates that right side of border is present.
 boolean isTopBorderSidePresent()
          Gets value which indicates that top side of border is present.
 void LoadFromJson(JSONObject jObject)
           
 java.lang.String serialize()
          Сериализация объекта в строку.
 void setColor(StiColor value)
           
 void setDropShadow(boolean value)
           
 void setShadowBrush(StiBrush value)
           
 void setShadowSize(double value)
           
 void setSide(StiBorderSides value)
           
 void setSide(StiEnumSet<StiBorderSides> value)
           
 void setSize(double value)
           
 void setStyle(StiPenStyle value)
           
 void setTopmost(boolean value)
           
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

side

public StiEnumSet<StiBorderSides> side
Constructor Detail

StiBorder

public StiBorder()
Creates a new instance of the StiBorder class.


StiBorder

public StiBorder(StiBorderSides side,
                 StiColor color,
                 double size,
                 StiPenStyle style)
Creates a new instance of the StiBorder class.

Parameters:
side - Border sides.
color - Border color.
size - Border size.
style - Border style.

StiBorder

public StiBorder(StiBorderSides side,
                 StiColor color,
                 double size,
                 StiPenStyle style,
                 java.lang.Boolean topmost)
Creates a new instance of the StiBorder class.

Parameters:
side - Border sides.
color - Border color.
size - Border size.
style - Border style.

StiBorder

public StiBorder(StiEnumSet<StiBorderSides> side,
                 StiColor color,
                 double size,
                 StiPenStyle style,
                 boolean dropShadow,
                 double shadowSize,
                 StiBrush shadowBrush)
Creates a new instance of the StiBorder class.

Parameters:
side - Border sides.
color - Border color.
size - Border size.
style - Border style.
dropShadow - Drop shadow or not.
shadowSize - Shadow size.
shadowBrush - Brush for drawing shadow of border.

StiBorder

public StiBorder(StiEnumSet<StiBorderSides> side,
                 StiColor color,
                 double size,
                 StiPenStyle style,
                 boolean dropShadow,
                 double shadowSize,
                 StiBrush shadowBrush,
                 boolean topmost)
Creates a new instance of the StiBorder class.

Parameters:
side - Border sides.
color - Border color.
size - Border size.
style - Border style.
dropShadow - Drop shadow or not.
shadowSize - Shadow size.
shadowBrush - Brush for drawing shadow of border.
topmost - Value which indicates that border sides will be drawn on top of all components.

StiBorder

public StiBorder(StiEnumSet<StiBorderSides> side,
                 StiColor color,
                 int size,
                 StiPenStyle style,
                 boolean dropShadow,
                 double shadowSize,
                 StiBrush shadowBrush)

StiBorder

public StiBorder(StiBorderSides side,
                 StiColor color,
                 double size,
                 StiPenStyle style,
                 boolean dropShadow,
                 double shadowSize,
                 StiBrush shadowBrush)

StiBorder

public StiBorder(StiEnumSet<StiBorderSides> side,
                 StiColor color,
                 double size,
                 StiPenStyle style)
Method Detail

isDefault

public static boolean isDefault(StiBorderSides side,
                                StiColor color,
                                double size,
                                StiPenStyle style,
                                boolean dropShadow,
                                double shadowSize,
                                boolean topmost)

clone

public 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.

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

draw

public final void draw(StiGraphics g,
                       StiRectangle rect,
                       double zoom,
                       StiColor emptyColor,
                       StiHighlightState highlightState,
                       java.lang.Boolean isPrinting,
                       java.lang.Boolean isThumbPaint,
                       double pageZoom)
Draws this border on the indicated Graphics.

Parameters:
g - Graphics on which a border can be drawn.
rect - The rectangle that indicates an area of the border drawing.
zoom - The scale of a border to draw.
emptyStiColor - The color of space between double lines (used only when border style equal Double).

isTopBorderSidePresent

public boolean isTopBorderSidePresent()
Gets value which indicates that top side of border is present.


isBottomBorderSidePresent

public boolean isBottomBorderSidePresent()
Gets value which indicates that bottom side of border is present.


isLeftBorderSidePresent

public boolean isLeftBorderSidePresent()
Gets value which indicates that left side of border is present.


isRightBorderSidePresent

public boolean isRightBorderSidePresent()
Gets value which indicates that right side of border is present.


isAllBorderSidesPresent

public boolean isAllBorderSidesPresent()
Gets value which indicates that all sides of border is present.


getSide

public StiEnumSet<StiBorderSides> getSide()
Gets or sets frame borders.


setSide

public void setSide(StiEnumSet<StiBorderSides> value)

setSide

public void setSide(StiBorderSides value)

getColor

public StiColor getColor()
Gets or sets a border color.


setColor

public void setColor(StiColor value)

getSizeOffset

public float getSizeOffset()

getSize

public double getSize()
Gets or sets a border size.


setSize

public void setSize(double value)

getStyle

public StiPenStyle getStyle()
Gets or sets a border style.


setStyle

public void setStyle(StiPenStyle value)

getShadowBrush

public StiBrush getShadowBrush()
Gets or sets the border shadow brush.


setShadowBrush

public void setShadowBrush(StiBrush value)

getShadowSize

public double getShadowSize()
Gets or sets Shadow Size.


setShadowSize

public void setShadowSize(double value)

getDropShadow

public boolean getDropShadow()
Gets or sets value which indicates drop shadow or not.


setDropShadow

public void setDropShadow(boolean value)

getTopmost

public boolean getTopmost()
Gets or sets value which indicates that border sides will be drawn on top of all components.


setTopmost

public void setTopmost(boolean value)

isDefault

public boolean isDefault()
Gets value indicates, that this object-frame is by default.

Specified by:
isDefault in interface IStiDefault

serialize

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

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

deserialize

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

Specified by:
deserialize in interface IStiSerializableToString

LoadFromJson

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