Package snap.view
Class ViewStyle
java.lang.Object
snap.view.ViewStyle
- All Implemented Interfaces:
Cloneable
This class provides values for view style properties.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()
Standard clone implementation.getAlign()
Returns the alignment.Returns the border.double
Returns the radius for border rounded corners.getFill()
Returns fill paint.getFont()
Returns the font.Returns the margin.Returns the padding.getPropDefaultForView
(View aView, String propName) Returns the default prop value for view.getPropValue
(String propName) Returns value for given property name.double
Returns the spacing.Returns the text color.protected static ViewStyle
getViewStyleForClassMapAndClass
(Map<Class<?>, ViewStyle> viewStyles, Class<? extends View> viewClass) Returns the ViewStyle for given class.void
setPropValue
(String propName, Object aValue) Sets value for given property name.protected void
setStyleDefaultsForViewAndOldStyle
(View aView, ViewStyle oldViewStyle) Sets the style property values for given view if they were previously set to default of given old style.toString()
Standard toString implementation.
-
Field Details
-
_align
-
_margin
-
_padding
-
_spacing
protected double _spacing -
_fill
-
_border
-
_borderRadius
protected double _borderRadius -
_font
-
_textColor
-
-
Constructor Details
-
ViewStyle
Constructor.
-
-
Method Details
-
getAlign
Returns the alignment. -
getMargin
Returns the margin. -
getPadding
Returns the padding. -
getSpacing
public double getSpacing()Returns the spacing. -
getFill
Returns fill paint. -
getBorder
Returns the border. -
getBorderRadius
public double getBorderRadius()Returns the radius for border rounded corners. -
getFont
Returns the font. -
getTextColor
Returns the text color. -
getPropValue
Returns value for given property name. -
setPropValue
Sets value for given property name. -
getPropDefaultForView
Returns the default prop value for view. -
setStyleDefaultsForViewAndOldStyle
Sets the style property values for given view if they were previously set to default of given old style. -
clone
Standard clone implementation. -
toString
Standard toString implementation. -
getViewStyleForClassMapAndClass
protected static ViewStyle getViewStyleForClassMapAndClass(Map<Class<?>, ViewStyle> viewStyles, Class<? extends View> viewClass) Returns the ViewStyle for given class.
-