Package com.stimulsoft.base.drawing
Class StiBorder
java.lang.Object
com.stimulsoft.base.drawing.StiBorder
- All Implemented Interfaces:
IStiDefault,IStiSerializable,IStiSerializableToString,Cloneable
- Direct Known Subclasses:
StiAdvancedBorder
public class StiBorder
extends Object
implements Cloneable, IStiSerializable, IStiSerializableToString, IStiDefault
Class describes a border.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCreates 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, boolean dropShadow, double shadowSize, StiBrush shadowBrush) StiBorder(StiBorderSides side, StiColor color, double size, StiPenStyle style, Boolean topmost) Creates a new instance of the StiBorder class.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
Modifier and TypeMethodDescriptionclone()Creates a new object that is a copy of the current instance.voiddeserialize(String strObject) final voiddraw(StiGraphics g, StiRectangle rect, double zoom, StiColor emptyColor, StiHighlightState highlightState, Boolean isPrinting, Boolean isThumbPaint, double pageZoom) Draws this border on the indicated Graphics.booleangetColor()Gets or sets a border color.booleanGets or sets value which indicates drop shadow or not.Gets or sets the border shadow brush.doubleGets or sets Shadow Size.getSide()Gets or sets frame borders.doublegetSize()Gets or sets a border size.floatgetStyle()Gets or sets a border style.booleanGets or sets value which indicates that border sides will be drawn on top of all components.inthashCode()booleanGets value which indicates that all sides of border is present.booleanGets value which indicates that bottom side of border is present.booleanGets value indicates, that this object-frame is by default.static booleanisDefault(StiBorderSides side, StiColor color, double size, StiPenStyle style, boolean dropShadow, double shadowSize, boolean topmost) booleanGets value which indicates that left side of border is present.booleanGets value which indicates that right side of border is present.booleanGets value which indicates that top side of border is present.voidLoadFromJson(JSONObject jObject) voidvoidsetDropShadow(boolean value) voidsetShadowBrush(StiBrush value) voidsetShadowSize(double value) voidsetSide(StiBorderSides value) voidsetSide(StiEnumSet<StiBorderSides> value) voidsetSize(double value) voidsetStyle(StiPenStyle value) voidsetTopmost(boolean value)
-
Field Details
-
side
-
-
Constructor Details
-
StiBorder
public StiBorder()Creates a new instance of the StiBorder class. -
StiBorder
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, 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
-
-
Method Details
-
isDefault
public static boolean isDefault(StiBorderSides side, StiColor color, double size, StiPenStyle style, boolean dropShadow, double shadowSize, boolean topmost) -
clone
Creates a new object that is a copy of the current instance. -
hashCode
public int hashCode() -
equals
-
draw
public final void draw(StiGraphics g, StiRectangle rect, double zoom, StiColor emptyColor, StiHighlightState highlightState, Boolean isPrinting, 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
Gets or sets frame borders. -
setSide
-
setSide
-
getColor
Gets or sets a border color. -
setColor
-
getSizeOffset
public float getSizeOffset() -
getSize
public double getSize()Gets or sets a border size. -
setSize
public void setSize(double value) -
getStyle
Gets or sets a border style. -
setStyle
-
getShadowBrush
Gets or sets the border shadow brush. -
setShadowBrush
-
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:
isDefaultin interfaceIStiDefault
-
serialize
- Specified by:
serializein interfaceIStiSerializableToString
-
deserialize
- Specified by:
deserializein interfaceIStiSerializableToString
-
LoadFromJson
- Throws:
JSONException
-