Package snap.styler

Class Styler

java.lang.Object
snap.styler.Styler

public class Styler extends Object
A class to handle getting/setting style attributes for Paint/Border/Effect tools.
  • Constructor Details

    • Styler

      public Styler()
      Constructor.
  • Method Details

    • getBorder

      public Border getBorder()
      Returns the selected border.
    • setBorder

      public void setBorder(Border aBorder)
      Sets the selected border.
    • setBorderStrokeColor

      public void setBorderStrokeColor(Color aColor)
      Sets the selected border stroke color.
    • setBorderStrokeWidth

      public void setBorderStrokeWidth(double aWidth)
      Sets the selected border stroke width.
    • setBorderStrokeDashArray

      public void setBorderStrokeDashArray(double[] theDashes)
      Sets the selected border stroke dash array.
    • setBorderStrokeDashPhase

      public void setBorderStrokeDashPhase(double aValue)
      Sets the selected border stroke dash array.
    • setBorderShowEdge

      public void setBorderShowEdge(Pos aPos, boolean aValue)
      Sets the selected border show edge.
    • getFill

      public Paint getFill()
      Returns the fill of currently selected view.
    • setFill

      public void setFill(Paint aPaint)
      Sets the fill of currently selected views.
    • getFillColor

      public Color getFillColor()
      Returns the color of currently selected view.
    • setFillColor

      public void setFillColor(Color aColor)
      Sets the color of currently selected view.
    • getEffect

      public Effect getEffect()
      Returns the currently selected effect.
    • setEffect

      public void setEffect(Effect anEffect)
      Sets the currently selected effect.
    • getOpacity

      public double getOpacity()
      Returns the currently selected opacity.
    • setOpacity

      public void setOpacity(double aValue)
      Sets the currently selected opacity.
    • getFont

      public Font getFont()
      Returns the current font.
    • setFont

      public void setFont(Font aFont)
      Sets the current font.
    • getFontDefault

      public Font getFontDefault()
      Returns the default font.
    • isUnderlined

      public boolean isUnderlined()
      Returns whether current text is underlined.
    • setUnderlined

      public void setUnderlined(boolean aValue)
      Sets whether current text is underlined.
    • getTextBorder

      public Border getTextBorder()
      Returns the outline state of the currently selected shape (null if none).
    • setTextBorder

      public void setTextBorder(Border aBorder)
      Sets the currently selected shapes to be outlined.
    • getTextColor

      public Color getTextColor()
      Returns the text color current text.
    • setTextColor

      public void setTextColor(Color aColor)
      Sets the text color current text.
    • setFontName

      public void setFontName(String aName)
      Resets the current font to given font name (preserving size).
    • setFontFamily

      public void setFontFamily(String aName)
      Resets the current font to given family name (preserving size).
    • setFontSize

      public void setFontSize(double aSize, boolean isRelative)
      Sets the font size of editor's selected shape(s).
    • setFontBold

      public void setFontBold(boolean aFlag)
      Sets the "boldness" of text in the currently selected shapes.
    • setFontItalic

      public void setFontItalic(boolean aFlag)
      Sets the italic state of text in the currently selected shapes.
    • getClientView

      public View getClientView()
      Returns the client View.