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 Details

  • Constructor Details

    • 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, 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 Details

    • isDefault

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

      public Object clone()
      Creates a new object that is a copy of the current instance.
      Overrides:
      clone in class Object
      Returns:
      A new object that is a copy of this instance.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • 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

      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 String serialize()
      Specified by:
      serialize in interface IStiSerializableToString
    • deserialize

      public void deserialize(String strObject)
      Specified by:
      deserialize in interface IStiSerializableToString
    • LoadFromJson

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