Package snap.styler
Class Styler
java.lang.Object
snap.styler.Styler
A class to handle getting/setting style attributes for Paint/Border/Effect tools.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns the selected border.Returns the client View.Returns the currently selected effect.getFill()
Returns the fill of currently selected view.Returns the color of currently selected view.getFont()
Returns the current font.Returns the default font.double
Returns the currently selected opacity.Returns the outline state of the currently selected shape (null if none).Returns the text color current text.boolean
Returns whether current text is underlined.void
Sets the selected border.void
setBorderShowEdge
(Pos aPos, boolean aValue) Sets the selected border show edge.void
setBorderStrokeColor
(Color aColor) Sets the selected border stroke color.void
setBorderStrokeDashArray
(double[] theDashes) Sets the selected border stroke dash array.void
setBorderStrokeDashPhase
(double aValue) Sets the selected border stroke dash array.void
setBorderStrokeWidth
(double aWidth) Sets the selected border stroke width.void
Sets the currently selected effect.void
Sets the fill of currently selected views.void
setFillColor
(Color aColor) Sets the color of currently selected view.void
Sets the current font.void
setFontBold
(boolean aFlag) Sets the "boldness" of text in the currently selected shapes.void
setFontFamily
(String aName) Resets the current font to given family name (preserving size).void
setFontItalic
(boolean aFlag) Sets the italic state of text in the currently selected shapes.void
setFontName
(String aName) Resets the current font to given font name (preserving size).void
setFontSize
(double aSize, boolean isRelative) Sets the font size of editor's selected shape(s).void
setOpacity
(double aValue) Sets the currently selected opacity.void
setTextBorder
(Border aBorder) Sets the currently selected shapes to be outlined.void
setTextColor
(Color aColor) Sets the text color current text.void
setUnderlined
(boolean aValue) Sets whether current text is underlined.
-
Constructor Details
-
Styler
public Styler()Constructor.
-
-
Method Details
-
getBorder
Returns the selected border. -
setBorder
Sets the selected border. -
setBorderStrokeColor
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
Sets the selected border show edge. -
getFill
Returns the fill of currently selected view. -
setFill
Sets the fill of currently selected views. -
getFillColor
Returns the color of currently selected view. -
setFillColor
Sets the color of currently selected view. -
getEffect
Returns the currently selected effect. -
setEffect
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
Returns the current font. -
setFont
Sets the current 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
Returns the outline state of the currently selected shape (null if none). -
setTextBorder
Sets the currently selected shapes to be outlined. -
getTextColor
Returns the text color current text. -
setTextColor
Sets the text color current text. -
setFontName
Resets the current font to given font name (preserving size). -
setFontFamily
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
Returns the client View.
-