# Class Style

java.lang.Object
com.codename1.ui.plaf.Style

public class Style extends Object

Represents the look of a given component: colors, fonts, transparency, margin and padding & images.

Each Component contains a Style Object and allows Style modification in Runtime by Using `cmp.getStyle()` The style is also used in Themeing, when a Theme is Changed the Styles Objects are been updated automatically.

When changing a theme the elements changed manually in a style will not be updated by the theme change by default. There are two ways to change that behavior:

- Use the set method that accepts a second boolean argument and set it to true.

- Create a new style object and pass all the options in the constructor (without invoking setters manually).

The Margin and Padding is inspired by W3 Box Model

          **************************
          *         Margin         *
          *  ********************  *
          *  *      Padding     *  *
          *  *    ***********   *  *
          *  *    * Content *   *  *
          *  *    ***********   *  *
          *  *      Padding     *  *
          *  ********************  *
          *         Margin         *
          **************************

Change Events

Styles fire a change event for each style change that occurs. `Component` listens to all changes events of its styles, and adjusts some of its properties accordingly. Currently (as of 6.0) each style change will trigger a `Container#revalidate()` call on the Style's Component's parent container, which is expensive. You can disable this `Container#revalidate()` call by calling CN.setProperty("Component.revalidateOnStyleChange", "false"). This will likely be the default behavior in a future version, so we recommend you disable this explicitly for both performance reasons, and to avoid regressions when the default is changed.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final String`
  `ALIGNMENT`
  Alignment attribute for the style event
  `static final String`
  `BACKGROUND_ALIGNMENT`
  Background attribute name for the theme hashtable
  `static final String`
  `BACKGROUND_GRADIENT`
  Background attribute name for the theme hashtable
  `static final byte`
  `BACKGROUND_GRADIENT_LINEAR_HORIZONTAL`
  Indicates the background for the style would use a linear gradient
  `static final byte`
  `BACKGROUND_GRADIENT_LINEAR_VERTICAL`
  Indicates the background for the style would use a linear gradient
  `static final byte`
  `BACKGROUND_GRADIENT_RADIAL`
  Indicates the background for the style would use a radial gradient
  `static final byte`
  `BACKGROUND_IMAGE_ALIGNED_BOTTOM`
  Indicates the background for the style would use an unscaled image with an alignment
  `static final byte`
  `BACKGROUND_IMAGE_ALIGNED_BOTTOM_LEFT`
  Indicates the background for the style would use an unscaled image with an alignment
  `static final byte`
  `BACKGROUND_IMAGE_ALIGNED_BOTTOM_RIGHT`
  Indicates the background for the style would use an unscaled image with an alignment
  `static final byte`
  `BACKGROUND_IMAGE_ALIGNED_CENTER`
  Indicates the background for the style would use an unscaled image with an alignment
  `static final byte`
  `BACKGROUND_IMAGE_ALIGNED_LEFT`
  Indicates the background for the style would use an unscaled image with an alignment
  `static final byte`
  `BACKGROUND_IMAGE_ALIGNED_RIGHT`
  Indicates the background for the style would use an unscaled image with an alignment
  `static final byte`
  `BACKGROUND_IMAGE_ALIGNED_TOP`
  Indicates the background for the style would use an unscaled image with an alignment
  `static final byte`
  `BACKGROUND_IMAGE_ALIGNED_TOP_LEFT`
  Indicates the background for the style would use an unscaled image with an alignment
  `static final byte`
  `BACKGROUND_IMAGE_ALIGNED_TOP_RIGHT`
  Indicates the background for the style would use an unscaled image with an alignment
  `static final byte`
  `BACKGROUND_IMAGE_SCALED`
  Indicates the background for the style would use a scaled image
  `static final byte`
  `BACKGROUND_IMAGE_SCALED_FILL`
  Indicates the background for the style would use a scaled image that fills all available space while maintaining aspect ratio
  `static final byte`
  `BACKGROUND_IMAGE_SCALED_FIT`
  Indicates the background for the style would use a scaled image that fits to available space while maintaining aspect ratio
  `static final byte`
  `BACKGROUND_IMAGE_TILE_BOTH`
  Indicates the background for the style would use a tiled image on both axis
  `static final byte`
  `BACKGROUND_IMAGE_TILE_HORIZONTAL`
  Indicates the background for the style would use a horizontal tiled image
  `static final byte`
  `BACKGROUND_IMAGE_TILE_HORIZONTAL_ALIGN_BOTTOM`
  Indicates the background for the style would use a horizontal tiled image
  `static final byte`
  `BACKGROUND_IMAGE_TILE_HORIZONTAL_ALIGN_CENTER`
  Indicates the background for the style would use a horizontal tiled image
  `static final byte`
  `BACKGROUND_IMAGE_TILE_HORIZONTAL_ALIGN_TOP`
  Indicates the background for the style would use a horizontal tiled image
  `static final byte`
  `BACKGROUND_IMAGE_TILE_VERTICAL`
  Indicates the background for the style would use a vertical tiled image
  `static final byte`
  `BACKGROUND_IMAGE_TILE_VERTICAL_ALIGN_CENTER`
  Indicates the background for the style would use a horizontal tiled image
  `static final byte`
  `BACKGROUND_IMAGE_TILE_VERTICAL_ALIGN_LEFT`
  Indicates the background for the style would use a horizontal tiled image
  `static final byte`
  `BACKGROUND_IMAGE_TILE_VERTICAL_ALIGN_RIGHT`
  Indicates the background for the style would use a horizontal tiled image
  `static final byte`
  `BACKGROUND_NONE`
  Indicates the background for the style would use a scaled image
  `static final String`
  `BACKGROUND_TYPE`
  Background attribute name for the theme hashtable
  `static final String`
  `BG_COLOR`
  Background color attribute name for the theme hashtable
  `static final String`
  `BG_IMAGE`
  Background image attribute name for the theme hashtable
  `static final String`
  `BORDER`
  Border attribute name for the theme hashtable
  `static final String`
  `ELEVATION`
  Elevation attribute name for the theme hashtable.
  `static final String`
  `FG_ALPHA`
  Foreground alpha attribute name for the theme hashtable
  `static final String`
  `FG_COLOR`
  Foreground color attribute name for the theme hashtable
  `static final String`
  `FONT`
  Font attribute name for the theme hashtable
  `static final String`
  `ICON_GAP`
  Icon gap attribute name for the theme hashtable.
  `static final String`
  `ICON_GAP_UNIT`
  Icon gap unit attribute.
  `static final String`
  `MARGIN`
  Margin attribute name for the theme hashtable
  `static final String`
  `MARGIN_UNIT`
  The units of the margin
  `static final String`
  `OPACITY`
  Opacity attribute name for the theme hashtable
  `static final String`
  `PADDING`
  Padding attribute name for the theme hashtable
  `static final String`
  `PADDING_UNIT`
  The units of the padding
  `static final String`
  `PAINTER`
  Painter attribute name for the style event
  `static final String`
  `SURFACE`
  Surface attribute name for the theme hashtable.
  `static final String`
  `TEXT_DECORATION`
  Text decoration attribute for the style event
  `static final byte`
  `TEXT_DECORATION_3D`
  3D text effect using a font shadow
  `static final byte`
  `TEXT_DECORATION_3D_LOWERED`
  3D sunken text effect using a light font shadow
  `static final byte`
  `TEXT_DECORATION_3D_SHADOW_NORTH`
  3D text effect using a font shadow
  `static final byte`
  `TEXT_DECORATION_NONE`
  Indicates no text decoration
  `static final byte`
  `TEXT_DECORATION_OVERLINE`
  Indicates overline
  `static final byte`
  `TEXT_DECORATION_STRIKETHRU`
  Indicates a strike-through line (usually used to denote deleted text)
  `static final byte`
  `TEXT_DECORATION_UNDERLINE`
  Indicates underline
  `static final String`
  `TRANSPARENCY`
  Transparency attribute name for the theme hashtable
  `static final byte`
  `UNIT_TYPE_DIPS`
  Indicates the unit type for padding/margin in device independent pixels.
  `static final byte`
  `UNIT_TYPE_PIXELS`
  Indicates the unit type for padding/margin, the default is in device specific pixels
  `static final byte`
  `UNIT_TYPE_REM`
  Indicates the unit type for padding/margin relative to the font size of the default font.
  `static final byte`
  `UNIT_TYPE_SCREEN_PERCENTAGE`
  Indicates the unit type for padding/margin in percentage of the size of the screen
  `static final byte`
  `UNIT_TYPE_VH`
  Indicates the unit type for padding/margin as a percentage of the screen height.
  `static final byte`
  `UNIT_TYPE_VMAX`
  Indicates the unit type for padding/margin as a percentage the maximum of screen width and height.
  `static final byte`
  `UNIT_TYPE_VMIN`
  Indicates the unit type for padding/margin as a percentage the minimum of screen width and height.
  `static final byte`
  `UNIT_TYPE_VW`
  Indicates the unit type for padding/margin as a percentage of the screen width.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Style()`
  Each component when it draw itself uses this Object to determine in what colors it should use.
  `Style(int fgColor, int bgColor, Font f, byte transparency)`
  Creates a new style with the given attributes
  `Style(int fgColor, int bgColor, Font f, byte transparency, Image im, byte backgroundType)`
  Creates a new style with the given attributes
  `Style(Style style)`
  Creates a full copy of the given style.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `addStyleListener(StyleListener l)`
  Adds a Style Listener to the Style Object.
  `void`
  `cacheMargins(boolean override)`
  Store current margin values into a cache that could be restored with restoreCachedMargins()
  `static Style`
  `createProxyStyle(Style... styles)`
  Creates a "proxy" style whose setter methods map to the methods in the given styles passed and whose getter methods are meaningless
  `boolean`
  `equals(Object obj)`
  Indicates whether some other object is "equal to" this one.
  `void`
  `flushMarginsCache()`
  Flush the margins cache if one exists
  `int`
  `getAlignment()`
  Returns the alignment of the Label
  `int`
  `getBackgroundGradientEndColor()`
  End color for the radial/linear gradient
  `float`
  `getBackgroundGradientRelativeSize()`
  Background radial gradient relative size
  `float`
  `getBackgroundGradientRelativeX()`
  Background radial gradient relative center position X
  `float`
  `getBackgroundGradientRelativeY()`
  Background radial gradient relative center position Y
  `int`
  `getBackgroundGradientStartColor()`
  Start color for the radial/linear gradient
  `byte`
  `getBackgroundType()`
  The type of the background defaults to BACKGROUND_IMAGE_SCALED
  `int`
  `getBgColor()`
  Background color for the component
  `Image`
  `getBgImage()`
  Background image for the component
  `Painter`
  `getBgPainter()`
  Return the background painter for this style, normally this would be the internal image/color painter but can be user defined
  `byte`
  `getBgTransparency()`
  Returns the transparency (opacity) level of the Component, zero indicates fully transparent and FF indicates fully opaque.
  `Border`
  `getBorder()`
  Returns the border for the style
  `int`
  `getElevation()`
  Gets the elevation value of this style.
  `int`
  `getFgAlpha()`
  Foreground alpha for the component
  `int`
  `getFgColor()`
  Foreground color for the component
  `Font`
  `getFont()`
  Font for the component
  `int`
  `getHorizontalMargins()`
  The equivalent of getMarginLeft + getMarginRight
  `int`
  `getHorizontalPadding()`
  The equivalent of getPaddingLeft + getPaddingRight
  `int`
  `getIconGap()`
  Returns the icon gap in pixels.
  `int`
  `getIconGapUnit()`
  Returns the icon gap unit.
  `int`
  `getMargin(boolean rtl, int orientation)`
  Returns the Margin
  `int`
  `getMargin(int orientation)`
  Returns the Margin
  `int`
  `getMarginBottom()`
  Returns the bottom margin in pixel
  `float`
  `getMarginFloatValue(boolean rtl, int orientation)`
  Returns the Margin
  `int`
  `getMarginLeft(boolean rtl)`
  Returns the left margin in pixel or right margin in an RTL situation
  `int`
  `getMarginLeftNoRTL()`
  Returns the left margin in pixels ignoring RTL
  `int`
  `getMarginRight(boolean rtl)`
  Returns the right margin in pixel or left margin in an RTL situation
  `int`
  `getMarginRightNoRTL()`
  Returns the right margin in pixels ignoring RTL
  `int`
  `getMarginTop()`
  Returns the top margin in pixel
  `byte[]`
  `getMarginUnit()`
  Indicates the units used for margin elements, if null pixels are used if not this is a 4 element array containing values of of `#UNIT_TYPE_PIXELS`, `#UNIT_TYPE_DIPS`, `#UNIT_TYPE_SCREEN_PERCENTAGE`, `#UNIT_TYPE_VW`, `#UNIT_TYPE_VH`,
  `int`
  `getMarginValue(boolean rtl, int orientation)`
  Returns the Margin
  `int`
  `getOpacity()`
  Returns the opacity value for the component
  `int`
  `getPadding(boolean rtl, int orientation)`
  Returns the Padding in using the current unit
  `int`
  `getPadding(int orientation)`
  Returns the Padding
  `int`
  `getPaddingBottom()`
  Returns the bottom padding in pixel
  `float`
  `getPaddingFloatValue(boolean rtl, int orientation)`
  Returns the Padding in the internal value regardless of the unit
  `int`
  `getPaddingLeft(boolean rtl)`
  Returns the left padding in pixel or right padding in an RTL situation
  `int`
  `getPaddingLeftNoRTL()`
  Returns the left padding in pixels ignoring RTL
  `int`
  `getPaddingRight(boolean rtl)`
  Returns the right padding in pixel or left padding in an RTL situation
  `int`
  `getPaddingRightNoRTL()`
  Returns the right padding in pixels ignoring RTL
  `int`
  `getPaddingTop()`
  Returns the top padding in pixel
  `byte[]`
  `getPaddingUnit()`
  Indicates the units used for padding elements, if null pixels are used if not this is a 4 element array containing values of of `#UNIT_TYPE_PIXELS`, `#UNIT_TYPE_DIPS`, `#UNIT_TYPE_SCREEN_PERCENTAGE`, `#UNIT_TYPE_VW`, `#UNIT_TYPE_VH`,
  `int`
  `getPaddingValue(boolean rtl, int orientation)`
  Returns the Padding in the internal value regardless of the unit
  `int`
  `getTextDecoration()`
  Returns the text decoration of this style
  `int`
  `getVerticalMargins()`
  The equivalent of getMarginTop + getMarginBottom
  `int`
  `getVerticalPadding()`
  The equivalent of getPaddingTop + getPaddingBottom
  `int`
  `hashCode()`
  Returns a hash code value for the object.
  `boolean`
  `is3DTextNorth()`
  Returns the text decoration state for the north
  `boolean`
  `isLowered3DText()`
  Returns true if the 3D text decoration is on, false otherwise
  `boolean`
  `isModified()`
  Returns true if the style was modified manually after it was created by the look and feel.
  `boolean`
  `isOverline()`
  Returns true if the overline text decoration is on, false otherwise
  `boolean`
  `isRaised3DText()`
  Returns true if the 3D text decoration is on, false otherwise
  `boolean`
  `isRendererStyle()`
  Indicates whether this style has been marked for use with renderers.
  `boolean`
  `isStrikeThru()`
  Returns true if the strike through text decoration is on, false otherwise
  `boolean`
  `isSuppressChangeEvents()`
  Checks to see if change events are currently suppressed.
  `boolean`
  `isSurface()`
  Checks whether the component is a surface.
  `boolean`
  `isUnderline()`
  Returns true if the underline text decoration is on, false otherwise
  `void`
  `markAsRendererStyle()`
  Disables native OS optimizations that might collide with cell renderers which do things like sharing style objects
  `void`
  `merge(Style style)`
  Merges the new style with the current style without changing the elements that were modified.
  `void`
  `removeListeners()`
  This method removes all Listeners from the Style
  `void`
  `removeStyleListener(StyleListener l)`
  Removes a Style Listener from the Style Object.
  `void`
  `restoreCachedMargins()`
  Restore cached margins and flush the margins cache Warning: this method is used internally when unhidding a component with the Component.setHidden(false) method Do not use it on an hidden component or it would result into unexpected results when unhidding this component
  `void`
  `set3DText(boolean t, boolean raised)`
  Sets the 3D text decoration for this style
  `void`
  `set3DTextNorth(boolean north)`
  Sets the text decoration to 3D text
  `void`
  `setAlignment(int align)`
  Sets the Alignment of the Label to one of: CENTER, LEFT, RIGHT
  `void`
  `setAlignment(int align, boolean override)`
  Sets the Alignment of the Label to one of: CENTER, LEFT, RIGHT
  `void`
  `setBackgroundGradientEndColor(int backgroundGradientEndColor)`
  Sets the background color for the component
  `void`
  `setBackgroundGradientEndColor(int backgroundGradientEndColor, boolean override)`
  Sets the background color for the component
  `void`
  `setBackgroundGradientRelativeSize(float backgroundGradientRelativeSize)`
  Background radial gradient relative size
  `void`
  `setBackgroundGradientRelativeSize(float backgroundGradientRelativeSize, boolean override)`
  Background radial gradient relative size
  `void`
  `setBackgroundGradientRelativeX(float backgroundGradientRelativeX)`
  Background radial gradient relative center position X
  `void`
  `setBackgroundGradientRelativeX(float backgroundGradientRelativeX, boolean override)`
  Background radial gradient relative center position X
  `void`
  `setBackgroundGradientRelativeY(float backgroundGradientRelativeY)`
  Background radial gradient relative center position Y
  `void`
  `setBackgroundGradientRelativeY(float backgroundGradientRelativeY, boolean override)`
  Background radial gradient relative center position Y
  `void`
  `setBackgroundGradientStartColor(int backgroundGradientStartColor)`
  Sets the background color for the component
  `void`
  `setBackgroundGradientStartColor(int backgroundGradientStartColor, boolean override)`
  Sets the background color for the component
  `void`
  `setBackgroundType(byte backgroundType)`
  Sets the background type for the component
  `void`
  `setBackgroundType(byte backgroundType, boolean override)`
  Sets the background type for the component
  `void`
  `setBgColor(int bgColor)`
  Sets the background color for the component
  `void`
  `setBgColor(int bgColor, boolean override)`
  Sets the background color for the component
  `void`
  `setBgImage(Image bgImage)`
  Sets the background image for the component
  `void`
  `setBgImage(Image bgImage, boolean override)`
  Sets the background image for the component
  `void`
  `setBgPainter(Painter bgPainter)`
  Defines the background painter for this style, normally this would be the internal image/color painter but can be user defined
  `void`
  `setBgTransparency(byte transparency)`
  Sets the Component transparency (opacity) level of the Component, zero indicates fully transparent and FF indicates fully opaque.
  `void`
  `setBgTransparency(int transparency)`
  Sets the Component transparency level.
  `void`
  `setBgTransparency(int transparency, boolean override)`
  Sets the Component transparency level.
  `void`
  `setBorder(Border border)`
  Sets the border for the style
  `void`
  `setBorder(Border border, boolean override)`
  Sets the border for the style
  `void`
  `setElevation(int elevation)`
  Sets the elevation value.
  `void`
  `setElevation(int elevation, boolean override)`
  Sets the elevation value.
  `void`
  `setFgAlpha(int fgAlpha)`
  Sets the foreground alpha for the component
  `void`
  `setFgAlpha(int fgAlpha, boolean override)`
  Sets the foreground alpha for the component
  `final void`
  `setFgColor(int fgColor)`
  Sets the foreground color for the component
  `final void`
  `setFgColor(int fgColor, boolean override)`
  Sets the foreground color for the component
  `void`
  `setFont(Font font)`
  Sets the font for the component
  `void`
  `setFont(Font font, boolean override)`
  Sets the font for the component
  `void`
  `setIconGap(float gap)`
  Sets the icon gap in the current units.
  `void`
  `setIconGap(float gap, boolean override)`
  Sets the icon gap.
  `void`
  `setIconGap(float gap, byte unit)`
  Sets the icon gap.
  `void`
  `setIconGap(float gap, byte units, boolean override)`
  Sets the icon gap.
  `void`
  `setIconGapUnit(byte unit)`
  Sets the icon gap unit.
  `void`
  `setIconGapUnit(byte unit, boolean override)`
  Sets the icon gap unit.
  `void`
  `setMargin(float top, float bottom, float left, float right)`
  Sets the Style Margin
  `void`
  `setMargin(int orientation, float gap)`
  Sets the Style Margin
  `void`
  `setMargin(int orientation, float gap, boolean override)`
  Sets the Style Margin
  `void`
  `setMargin(int orientation, int gap)`
  Sets the Style Margin
  `void`
  `setMargin(int orientation, int gap, boolean override)`
  Sets the Style Margin
  `void`
  `setMargin(int top, int bottom, int left, int right)`
  Sets the Style Margin
  `void`
  `setMarginBottom(float gap)`
  Sets the Style Margin on the bottom, this is equivalent to calling `setMargin(Component.BOTTOM, gap, false);`
  `void`
  `setMarginBottom(int gap)`
  Sets the Style Margin on the bottom, this is equivalent to calling `setMargin(Component.BOTTOM, gap, false);`
  `void`
  `setMarginLeft(float gap)`
  Sets the Style Margin on the left, this is equivalent to calling `setMargin(Component.LEFT, gap, false);`
  `void`
  `setMarginLeft(int gap)`
  Sets the Style Margin on the left, this is equivalent to calling `setMargin(Component.LEFT, gap, false);`
  `void`
  `setMarginRight(float gap)`
  Sets the Style Margin on the right, this is equivalent to calling `setMargin(Component.RIGHT, gap, false);`
  `void`
  `setMarginRight(int gap)`
  Sets the Style Margin on the right, this is equivalent to calling `setMargin(Component.RIGHT, gap, false);`
  `void`
  `setMarginTop(float gap)`
  Sets the Style margin on the top, this is equivalent to calling `setMargin(Component.TOP, gap, false);`
  `void`
  `setMarginTop(int gap)`
  Sets the Style margin on the top, this is equivalent to calling `setMargin(Component.TOP, gap, false);`
  `void`
  `setMarginUnit(byte... marginUnit)`
  Indicates the units used for margin elements, if null pixels are used if not this is a 4 element array containing values of of `#UNIT_TYPE_PIXELS`, `#UNIT_TYPE_DIPS`, `#UNIT_TYPE_SCREEN_PERCENTAGE`, `#UNIT_TYPE_VW`, `#UNIT_TYPE_VH`,
  `void`
  `setMarginUnitBottom(byte unit)`
  Sets bottom margin unit.
  `void`
  `setMarginUnitLeft(byte unit)`
  Sets left margin unit.
  `void`
  `setMarginUnitRight(byte unit)`
  Sets right margin unit.
  `void`
  `setMarginUnitTop(byte unit)`
  Sets top margin unit.
  `final void`
  `setOpacity(int opacity)`
  Set the opacity value
  `final void`
  `setOpacity(int opacity, boolean override)`
  Sets the Component transparency level.
  `void`
  `setOverline(boolean overline)`
  Sets the overline text decoration for this style
  `void`
  `setPadding(float top, float bottom, float left, float right)`
  Sets the Style Padding.
  `void`
  `setPadding(int orientation, float gap)`
  Sets the Style Padding.
  `void`
  `setPadding(int orientation, float gap, boolean override)`
  Sets the Style Padding
  `void`
  `setPadding(int orientation, int gap)`
  Sets the Style Padding.
  `void`
  `setPadding(int orientation, int gap, boolean override)`
  Sets the Style Padding
  `void`
  `setPadding(int top, int bottom, int left, int right)`
  Sets the Style Padding.
  `void`
  `setPaddingBottom(float gap)`
  Sets the Style Padding on the bottom, this is equivalent to calling `setPadding(Component.BOTTOM, gap, false);`
  `void`
  `setPaddingBottom(int gap)`
  Sets the Style Padding on the bottom, this is equivalent to calling `setPadding(Component.BOTTOM, gap, false);`
  `void`
  `setPaddingLeft(float gap)`
  Sets the Style Padding on the left, this is equivalent to calling `setPadding(Component.LEFT, gap, false);`
  `void`
  `setPaddingLeft(int gap)`
  Sets the Style Padding on the left, this is equivalent to calling `setPadding(Component.LEFT, gap, false);`
  `void`
  `setPaddingRight(float gap)`
  Sets the Style Padding on the right, this is equivalent to calling `setPadding(Component.RIGHT, gap, false);`
  `void`
  `setPaddingRight(int gap)`
  Sets the Style Padding on the right, this is equivalent to calling `setPadding(Component.RIGHT, gap, false);`
  `void`
  `setPaddingTop(float gap)`
  Sets the Style Padding on the top, this is equivalent to calling `setPadding(Component.TOP, gap, false);`
  `void`
  `setPaddingTop(int gap)`
  Sets the Style Padding on the top, this is equivalent to calling `setPadding(Component.TOP, gap, false);`
  `void`
  `setPaddingUnit(byte... paddingUnit)`
  Indicates the units used for padding elements, if null pixels are used if not this is a 4 element array containing values of `#UNIT_TYPE_PIXELS`, `#UNIT_TYPE_DIPS`, `#UNIT_TYPE_SCREEN_PERCENTAGE`, `#UNIT_TYPE_VW`, `#UNIT_TYPE_VH`, `#UNIT_TYPE_VMIN`, `#UNIT_TYPE_VMAX`, `#UNIT_TYPE_REM`.
  `void`
  `setPaddingUnitBottom(byte unit)`
  Sets bottom padding unit.
  `void`
  `setPaddingUnitLeft(byte unit)`
  Sets left padding unit.
  `void`
  `setPaddingUnitRight(byte unit)`
  Sets right padding unit.
  `void`
  `setPaddingUnitTop(byte unit)`
  Sets top padding unit.
  `void`
  `setStrikeThru(boolean strikethru)`
  Sets the strike through text decoration for this style
  `void`
  `setSuppressChangeEvents(boolean suppress)`
  Enables or disables events.
  `void`
  `setSurface(boolean surface)`
  Enables or disables surface rendering mode for component.
  `void`
  `setSurface(boolean surface, boolean override)`
  Enables or disables surface rendering mode for component.
  `void`
  `setTextDecoration(int textDecoration)`
  Sets the text decoration of this style
  `void`
  `setTextDecoration(int textDecoration, boolean override)`
  Sets the text decoration of this style
  `void`
  `setUnderline(boolean underline)`
  Sets the underline text decoration for this style
  `void`
  `stripMarginAndPadding()`
  Strips all margin and padding from this style.

  ### Methods inherited from class Object

  `clone, getClass, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### BG_COLOR

    public static final String BG_COLOR
    Background color attribute name for the theme hashtable
    See Also:
      - Constant Field Values

  - ### FG_COLOR

    public static final String FG_COLOR
    Foreground color attribute name for the theme hashtable
    See Also:
      - Constant Field Values

  - ### FG_ALPHA

    public static final String FG_ALPHA
    Foreground alpha attribute name for the theme hashtable
    See Also:
      - Constant Field Values

  - ### BG_IMAGE

    public static final String BG_IMAGE
    Background image attribute name for the theme hashtable
    See Also:
      - Constant Field Values

  - ### BACKGROUND_TYPE

    public static final String BACKGROUND_TYPE
    Background attribute name for the theme hashtable
    See Also:
      - Constant Field Values

  - ### BACKGROUND_ALIGNMENT

    public static final String BACKGROUND_ALIGNMENT
    Background attribute name for the theme hashtable
    See Also:
      - Constant Field Values

  - ### BACKGROUND_GRADIENT

    public static final String BACKGROUND_GRADIENT
    Background attribute name for the theme hashtable
    See Also:
      - Constant Field Values

  - ### FONT

    public static final String FONT
    Font attribute name for the theme hashtable
    See Also:
      - Constant Field Values

  - ### TRANSPARENCY

    public static final String TRANSPARENCY
    Transparency attribute name for the theme hashtable
    See Also:
      - Constant Field Values

  - ### OPACITY

    public static final String OPACITY
    Opacity attribute name for the theme hashtable
    See Also:
      - Constant Field Values

  - ### ELEVATION

    public static final String ELEVATION
    Elevation attribute name for the theme hashtable.
    See Also:
      - Constant Field Values

  - ### ICON_GAP

    public static final String ICON_GAP

    Icon gap attribute name for the theme hashtable.

    ###### Since

    8.0

    See Also:
      - Constant Field Values

  - ### ICON_GAP_UNIT

    public static final String ICON_GAP_UNIT

    Icon gap unit attribute.

    ###### Since

    8.0

    See Also:
      - Constant Field Values

  - ### SURFACE

    public static final String SURFACE
    Surface attribute name for the theme hashtable.
    See Also:
      - Constant Field Values

  - ### MARGIN

    public static final String MARGIN
    Margin attribute name for the theme hashtable
    See Also:
      - Constant Field Values

  - ### BORDER

    public static final String BORDER
    Border attribute name for the theme hashtable
    See Also:
      - Constant Field Values

  - ### PADDING

    public static final String PADDING
    Padding attribute name for the theme hashtable
    See Also:
      - Constant Field Values

  - ### PAINTER

    public static final String PAINTER
    Painter attribute name for the style event
    See Also:
      - Constant Field Values

  - ### ALIGNMENT

    public static final String ALIGNMENT
    Alignment attribute for the style event
    See Also:
      - Constant Field Values

  - ### TEXT_DECORATION

    public static final String TEXT_DECORATION
    Text decoration attribute for the style event
    See Also:
      - Constant Field Values

  - ### PADDING_UNIT

    public static final String PADDING_UNIT
    The units of the padding
    See Also:
      - Constant Field Values

  - ### MARGIN_UNIT

    public static final String MARGIN_UNIT
    The units of the margin
    See Also:
      - Constant Field Values

  - ### BACKGROUND_NONE

    public static final byte BACKGROUND_NONE
    Indicates the background for the style would use a scaled image
    See Also:
      - Constant Field Values

  - ### BACKGROUND_IMAGE_SCALED

    public static final byte BACKGROUND_IMAGE_SCALED
    Indicates the background for the style would use a scaled image
    See Also:
      - Constant Field Values

  - ### BACKGROUND_IMAGE_TILE_BOTH

    public static final byte BACKGROUND_IMAGE_TILE_BOTH
    Indicates the background for the style would use a tiled image on both axis
    See Also:
      - Constant Field Values

  - ### BACKGROUND_IMAGE_TILE_VERTICAL

    public static final byte BACKGROUND_IMAGE_TILE_VERTICAL
    Indicates the background for the style would use a vertical tiled image
    See Also:
      - Constant Field Values

  - ### BACKGROUND_IMAGE_TILE_HORIZONTAL

    public static final byte BACKGROUND_IMAGE_TILE_HORIZONTAL
    Indicates the background for the style would use a horizontal tiled image
    See Also:
      - Constant Field Values

  - ### BACKGROUND_IMAGE_ALIGNED_TOP

    public static final byte BACKGROUND_IMAGE_ALIGNED_TOP
    Indicates the background for the style would use an unscaled image with an alignment
    See Also:
      - Constant Field Values

  - ### BACKGROUND_IMAGE_ALIGNED_BOTTOM

    public static final byte BACKGROUND_IMAGE_ALIGNED_BOTTOM
    Indicates the background for the style would use an unscaled image with an alignment
    See Also:
      - Constant Field Values

  - ### BACKGROUND_IMAGE_ALIGNED_LEFT

    public static final byte BACKGROUND_IMAGE_ALIGNED_LEFT
    Indicates the background for the style would use an unscaled image with an alignment
    See Also:
      - Constant Field Values

  - ### BACKGROUND_IMAGE_ALIGNED_RIGHT

    public static final byte BACKGROUND_IMAGE_ALIGNED_RIGHT
    Indicates the background for the style would use an unscaled image with an alignment
    See Also:
      - Constant Field Values

  - ### BACKGROUND_IMAGE_ALIGNED_CENTER

    public static final byte BACKGROUND_IMAGE_ALIGNED_CENTER
    Indicates the background for the style would use an unscaled image with an alignment
    See Also:
      - Constant Field Values

  - ### BACKGROUND_IMAGE_ALIGNED_TOP_LEFT

    public static final byte BACKGROUND_IMAGE_ALIGNED_TOP_LEFT
    Indicates the background for the style would use an unscaled image with an alignment
    See Also:
      - Constant Field Values

  - ### BACKGROUND_IMAGE_ALIGNED_TOP_RIGHT

    public static final byte BACKGROUND_IMAGE_ALIGNED_TOP_RIGHT
    Indicates the background for the style would use an unscaled image with an alignment
    See Also:
      - Constant Field Values

  - ### BACKGROUND_IMAGE_ALIGNED_BOTTOM_LEFT

    public static final byte BACKGROUND_IMAGE_ALIGNED_BOTTOM_LEFT
    Indicates the background for the style would use an unscaled image with an alignment
    See Also:
      - Constant Field Values

  - ### BACKGROUND_IMAGE_ALIGNED_BOTTOM_RIGHT

    public static final byte BACKGROUND_IMAGE_ALIGNED_BOTTOM_RIGHT
    Indicates the background for the style would use an unscaled image with an alignment
    See Also:
      - Constant Field Values

  - ### BACKGROUND_IMAGE_TILE_HORIZONTAL_ALIGN_TOP

    public static final byte BACKGROUND_IMAGE_TILE_HORIZONTAL_ALIGN_TOP
    Indicates the background for the style would use a horizontal tiled image
    See Also:
      - Constant Field Values

  - ### BACKGROUND_IMAGE_TILE_HORIZONTAL_ALIGN_CENTER

    public static final byte BACKGROUND_IMAGE_TILE_HORIZONTAL_ALIGN_CENTER
    Indicates the background for the style would use a horizontal tiled image
    See Also:
      - Constant Field Values

  - ### BACKGROUND_IMAGE_TILE_HORIZONTAL_ALIGN_BOTTOM

    public static final byte BACKGROUND_IMAGE_TILE_HORIZONTAL_ALIGN_BOTTOM
    Indicates the background for the style would use a horizontal tiled image
    See Also:
      - Constant Field Values

  - ### BACKGROUND_IMAGE_TILE_VERTICAL_ALIGN_LEFT

    public static final byte BACKGROUND_IMAGE_TILE_VERTICAL_ALIGN_LEFT
    Indicates the background for the style would use a horizontal tiled image
    See Also:
      - Constant Field Values

  - ### BACKGROUND_IMAGE_TILE_VERTICAL_ALIGN_CENTER

    public static final byte BACKGROUND_IMAGE_TILE_VERTICAL_ALIGN_CENTER
    Indicates the background for the style would use a horizontal tiled image
    See Also:
      - Constant Field Values

  - ### BACKGROUND_IMAGE_TILE_VERTICAL_ALIGN_RIGHT

    public static final byte BACKGROUND_IMAGE_TILE_VERTICAL_ALIGN_RIGHT
    Indicates the background for the style would use a horizontal tiled image
    See Also:
      - Constant Field Values

  - ### BACKGROUND_IMAGE_SCALED_FILL

    public static final byte BACKGROUND_IMAGE_SCALED_FILL
    Indicates the background for the style would use a scaled image that fills all available space while maintaining aspect ratio
    See Also:
      - Constant Field Values

  - ### BACKGROUND_IMAGE_SCALED_FIT

    public static final byte BACKGROUND_IMAGE_SCALED_FIT
    Indicates the background for the style would use a scaled image that fits to available space while maintaining aspect ratio
    See Also:
      - Constant Field Values

  - ### BACKGROUND_GRADIENT_LINEAR_VERTICAL

    public static final byte BACKGROUND_GRADIENT_LINEAR_VERTICAL
    Indicates the background for the style would use a linear gradient
    See Also:
      - Constant Field Values

  - ### BACKGROUND_GRADIENT_LINEAR_HORIZONTAL

    public static final byte BACKGROUND_GRADIENT_LINEAR_HORIZONTAL
    Indicates the background for the style would use a linear gradient
    See Also:
      - Constant Field Values

  - ### BACKGROUND_GRADIENT_RADIAL

    public static final byte BACKGROUND_GRADIENT_RADIAL
    Indicates the background for the style would use a radial gradient
    See Also:
      - Constant Field Values

  - ### TEXT_DECORATION_NONE

    public static final byte TEXT_DECORATION_NONE
    Indicates no text decoration
    See Also:
      - Constant Field Values

  - ### TEXT_DECORATION_UNDERLINE

    public static final byte TEXT_DECORATION_UNDERLINE
    Indicates underline
    See Also:
      - Constant Field Values

  - ### TEXT_DECORATION_STRIKETHRU

    public static final byte TEXT_DECORATION_STRIKETHRU
    Indicates a strike-through line (usually used to denote deleted text)
    See Also:
      - Constant Field Values

  - ### TEXT_DECORATION_OVERLINE

    public static final byte TEXT_DECORATION_OVERLINE
    Indicates overline
    See Also:
      - Constant Field Values

  - ### TEXT_DECORATION_3D

    public static final byte TEXT_DECORATION_3D
    3D text effect using a font shadow
    See Also:
      - Constant Field Values

  - ### TEXT_DECORATION_3D_LOWERED

    public static final byte TEXT_DECORATION_3D_LOWERED
    3D sunken text effect using a light font shadow
    See Also:
      - Constant Field Values

  - ### TEXT_DECORATION_3D_SHADOW_NORTH

    public static final byte TEXT_DECORATION_3D_SHADOW_NORTH
    3D text effect using a font shadow
    See Also:
      - Constant Field Values

  - ### UNIT_TYPE_PIXELS

    public static final byte UNIT_TYPE_PIXELS
    Indicates the unit type for padding/margin, the default is in device specific pixels
    See Also:
      - Constant Field Values

  - ### UNIT_TYPE_SCREEN_PERCENTAGE

    public static final byte UNIT_TYPE_SCREEN_PERCENTAGE
    Indicates the unit type for padding/margin in percentage of the size of the screen
    See Also:
      - Constant Field Values

  - ### UNIT_TYPE_DIPS

    public static final byte UNIT_TYPE_DIPS
    Indicates the unit type for padding/margin in device independent pixels. Device independent pixels try to aim at roughly 1 millimeter of the screen per DIP but make no guarantee for accuracy.
    See Also:
      - Constant Field Values

  - ### UNIT_TYPE_VW

    public static final byte UNIT_TYPE_VW

    Indicates the unit type for padding/margin as a percentage of the screen width.

    ###### Since

    8.0

    See Also:
      - Constant Field Values

  - ### UNIT_TYPE_VH

    public static final byte UNIT_TYPE_VH

    Indicates the unit type for padding/margin as a percentage of the screen height.

    ###### Since

    8.0

    See Also:
      - Constant Field Values

  - ### UNIT_TYPE_VMIN

    public static final byte UNIT_TYPE_VMIN

    Indicates the unit type for padding/margin as a percentage the minimum of screen width and height.

    ###### Since

    8.0

    See Also:
      - Constant Field Values

  - ### UNIT_TYPE_VMAX

    public static final byte UNIT_TYPE_VMAX

    Indicates the unit type for padding/margin as a percentage the maximum of screen width and height.

    ###### Since

    8.0

    See Also:
      - Constant Field Values

  - ### UNIT_TYPE_REM

    public static final byte UNIT_TYPE_REM

    Indicates the unit type for padding/margin relative to the font size of the default font. 1rem == Font.getDefaultFont().getHeight()

    ###### Since

    8.0

    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### Style

    public Style()
    Each component when it draw itself uses this Object to determine in what colors it should use. When a Component is generated it construct a default Style Object. The Default values for each Component can be changed by using the UIManager class

  - ### Style

    public Style(Style style)

    Creates a full copy of the given style. Notice that if the original style was modified manually (by invoking setters on it) it would not chnage when changing a theme/look and feel, however this newly created style would change in such a case.

    ###### Parameters

    - `style`: the style to copy

  - ### Style

    public Style(int fgColor, int bgColor, Font f, byte transparency)

    Creates a new style with the given attributes

    ###### Parameters

    - `fgColor`: foreground color

    - `bgColor`: background color

    - `f`: font

    - `transparency`: transparency value

  - ### Style

    public Style(int fgColor, int bgColor, Font f, byte transparency, Image im, byte backgroundType)

    Creates a new style with the given attributes

    ###### Parameters

    - `fgColor`: foreground color

    - `bgColor`: background color

    - `f`: font

    - `transparency`: transparency value

    - `im`: background image

    - `backgroundType`: @param backgroundType one of: BACKGROUND_IMAGE_SCALED, BACKGROUND_IMAGE_TILE_BOTH, BACKGROUND_IMAGE_TILE_VERTICAL, BACKGROUND_IMAGE_TILE_HORIZONTAL, BACKGROUND_IMAGE_ALIGNED, BACKGROUND_GRADIENT_LINEAR_HORIZONTAL, BACKGROUND_GRADIENT_LINEAR_VERTICAL, BACKGROUND_GRADIENT_RADIAL

- ## Method Details

  - ### createProxyStyle

    public static Style createProxyStyle(Style... styles)

    Creates a "proxy" style whose setter methods map to the methods in the given styles passed and whose getter methods are meaningless

    ###### Parameters

    - `styles`: the styles to which we will proxy

    ###### Returns

    a proxy style object

  - ### markAsRendererStyle

    public void markAsRendererStyle()
    Disables native OS optimizations that might collide with cell renderers which do things like sharing style objects

  - ### isRendererStyle

    public boolean isRendererStyle()

    Indicates whether this style has been marked for use with renderers.

    ###### Returns

    `true` if `#markAsRendererStyle()` was invoked.

  - ### merge

    public void merge(Style style)

    Merges the new style with the current style without changing the elements that were modified.

    ###### Parameters

    - `style`: new values of styles from the current theme

  - ### getElevation

    public int getElevation()

    Gets the elevation value of this style. Valid values include 0, 1, 2, 3, 4, 6, 8, 9, 12, 16, and 24.

    ###### Returns

    The elevation value. Default is 0.

    ###### Since

    8.0

  - ### setElevation

    public void setElevation(int elevation)

    Sets the elevation value. Valid values include 0, 1, 2, 3, 4, 6, 8, 9, 12, 16, and 24.

    ###### Parameters

    - `elevation`: The elevation value.

    ###### Since

    8.0

  - ### getIconGap

    public int getIconGap()

    Returns the icon gap in pixels.

    ###### Since

    8.0

  - ### setIconGap

    public void setIconGap(float gap)

    Sets the icon gap in the current units.

    ###### Parameters

    - `gap`: The icon gap.

    ###### Since

    8.0

    ###### See also

    - #getIconGapUnit()

  - ### getIconGapUnit

    public int getIconGapUnit()

    Returns the icon gap unit. One of `#UNIT_TYPE_REM`, `#UNIT_TYPE_VMAX`, `#UNIT_TYPE_VMIN`, `#UNIT_TYPE_VH`, `#UNIT_TYPE_VW`, `#UNIT_TYPE_SCREEN_PERCENTAGE`, `#UNIT_TYPE_DIPS`, `#UNIT_TYPE_PIXELS`

    ###### Returns

    The icon gap unit

    ###### Since

    8.0

  - ### setIconGapUnit

    public void setIconGapUnit(byte unit)

    Sets the icon gap unit.

    ###### Parameters

    - `unit`: The icon gap unit. One of the standard style units of measurement.

    ###### Since

    8.0

  - ### isSurface

    public boolean isSurface()

    Checks whether the component is a surface. Surface containers support a sort of z-index of descendants via the elevation attribute. Surfaces will render the shadows of elevated descendants to convey depth.

    ###### Returns

    True if container should be rendered as a surface.

    ###### Since

    8.0

  - ### setSurface

    public void setSurface(boolean surface)

    Enables or disables surface rendering mode for component. Surfaces can support a sort of z-indexing of its descendants via their elevation properties. The surface will render the shadows of elevated descendants to convey depth.

    ###### Parameters

    - `surface`: True to enable surface rendering mode.

    ###### Since

    8.0

  - ### isModified

    public boolean isModified()

    Returns true if the style was modified manually after it was created by the look and feel. If the style was modified manually (by one of the set methods) then it should be merged rather than overwritten.

    ###### Returns

    true if the style was modified

  - ### getBgColor

    public int getBgColor()

    Background color for the component

    ###### Returns

    the background color for the component

  - ### setBgColor

    public void setBgColor(int bgColor)

    Sets the background color for the component

    ###### Parameters

    - `bgColor`: RRGGBB color that ignors the alpha component

  - ### getBgImage

    public Image getBgImage()

    Background image for the component

    ###### Returns

    the background image for the component

  - ### setBgImage

    public void setBgImage(Image bgImage)

    Sets the background image for the component

    ###### Parameters

    - `bgImage`: background image

  - ### getBackgroundType

    public byte getBackgroundType()

    The type of the background defaults to BACKGROUND_IMAGE_SCALED

    ###### Returns

    Returns:
      one of: BACKGROUND_IMAGE_SCALED, BACKGROUND_IMAGE_TILE_BOTH, BACKGROUND_IMAGE_TILE_VERTICAL, BACKGROUND_IMAGE_TILE_HORIZONTAL, BACKGROUND_IMAGE_ALIGNED, BACKGROUND_GRADIENT_LINEAR_HORIZONTAL, BACKGROUND_GRADIENT_LINEAR_VERTICAL, BACKGROUND_GRADIENT_RADIAL

  - ### setBackgroundType

    public void setBackgroundType(byte backgroundType)

    Sets the background type for the component

    ###### Parameters

    - `backgroundType`: @param backgroundType one of BACKGROUND_IMAGE_SCALED, BACKGROUND_IMAGE_TILE_BOTH, BACKGROUND_IMAGE_TILE_VERTICAL, BACKGROUND_IMAGE_TILE_HORIZONTAL, BACKGROUND_IMAGE_ALIGNED, BACKGROUND_GRADIENT_LINEAR_HORIZONTAL, BACKGROUND_GRADIENT_LINEAR_VERTICAL, BACKGROUND_GRADIENT_RADIAL

  - ### getBackgroundGradientStartColor

    public int getBackgroundGradientStartColor()

    Start color for the radial/linear gradient

    ###### Returns

    the start color for the radial/linear gradient

  - ### setBackgroundGradientStartColor

    public void setBackgroundGradientStartColor(int backgroundGradientStartColor)

    Sets the background color for the component

    ###### Parameters

    - `backgroundGradientStartColor`: start color for the linear/radial gradient

  - ### getBackgroundGradientEndColor

    public int getBackgroundGradientEndColor()

    End color for the radial/linear gradient

    ###### Returns

    the end color for the radial/linear gradient

  - ### setBackgroundGradientEndColor

    public void setBackgroundGradientEndColor(int backgroundGradientEndColor)

    Sets the background color for the component

    ###### Parameters

    - `backgroundGradientEndColor`: end color for the linear/radial gradient

  - ### getBackgroundGradientRelativeX

    public float getBackgroundGradientRelativeX()

    Background radial gradient relative center position X

    ###### Returns

    value between 0 and 1 with 0.5 representing the center of the component

  - ### setBackgroundGradientRelativeX

    public void setBackgroundGradientRelativeX(float backgroundGradientRelativeX)

    Background radial gradient relative center position X

    ###### Parameters

    - `backgroundGradientRelativeX`: x position of the radial gradient center

  - ### getBackgroundGradientRelativeY

    public float getBackgroundGradientRelativeY()

    Background radial gradient relative center position Y

    ###### Returns

    value between 0 and 1 with 0.5 representing the center of the component

  - ### setBackgroundGradientRelativeY

    public void setBackgroundGradientRelativeY(float backgroundGradientRelativeY)

    Background radial gradient relative center position Y

    ###### Parameters

    - `backgroundGradientRelativeY`: y position of the radial gradient center

  - ### getBackgroundGradientRelativeSize

    public float getBackgroundGradientRelativeSize()

    Background radial gradient relative size

    ###### Returns

    value representing the relative size of the gradient

  - ### setBackgroundGradientRelativeSize

    public void setBackgroundGradientRelativeSize(float backgroundGradientRelativeSize)

    Background radial gradient relative size

    ###### Parameters

    - `backgroundGradientRelativeSize`: the size of the radial gradient

  - ### getFgColor

    public int getFgColor()

    Foreground color for the component

    ###### Returns

    the foreground color for the component

  - ### setFgColor

    public final void setFgColor(int fgColor)

    Sets the foreground color for the component

    ###### Parameters

    - `fgColor`: foreground color

  - ### getFgAlpha

    public int getFgAlpha()

    Foreground alpha for the component

    ###### Returns

    the foreground alpha for the component

    ###### Since

    8.0

  - ### setFgAlpha

    public void setFgAlpha(int fgAlpha)

    Sets the foreground alpha for the component

    ###### Parameters

    - `fgAlpha`: foreground alpha

  - ### getFont

    public Font getFont()

    Font for the component

    ###### Returns

    the font for the component

  - ### setFont

    public void setFont(Font font)

    Sets the font for the component

    ###### Parameters

    - `font`: the font

  - ### setElevation

    public void setElevation(int elevation, boolean override)

    Sets the elevation value. Valid values include 0, 1, 2, 3, 4, 6, 8, 9, 12, 16, and 24.

    ###### Parameters

    - `elevation`: The elevation value.

    - `override`: @param override If set to true allows the look and feel/theme to override the value in this attribute when changing a theme/look and feel

    ###### Since

    8.0

  - ### setIconGap

    public void setIconGap(float gap, byte units, boolean override)

    Sets the icon gap.

    ###### Parameters

    - `gap`: The gap.

    - `units`: The units of the gap.

    - `override`: @param override If set to true allows the look and feel/theme to override the value in this attribute when changing a theme/look and feel

    ###### Since

    8.0

    ###### See also

    - #setIconGapUnit(byte, boolean)

  - ### setIconGap

    public void setIconGap(float gap, boolean override)

    Sets the icon gap.

    ###### Parameters

    - `gap`: the icon gap.

    - `override`: @param override If set to true allows the look and feel/theme to override the value in this attribute when changing a theme/look and feel

    ###### Since

    8.0

    ###### See also

    - #setIconGapUnit(byte, boolean)

  - ### setIconGap

    public void setIconGap(float gap, byte unit)

    Sets the icon gap.

    ###### Parameters

    - `gap`: The icon gap.

    - `unit`: The unit. One of the standard style units of measurement.

    ###### Since

    8.0

  - ### setIconGapUnit

    public void setIconGapUnit(byte unit, boolean override)

    Sets the icon gap unit.

    ###### Parameters

    - `unit`: The icon gap unit. One of the standard style units of measurement.

    - `override`: @param override If set to true allows the look and feel/theme to override the value in this attribute when changing a theme/look and feel

    ###### Since

    8.0

  - ### setSurface

    public void setSurface(boolean surface, boolean override)

    Enables or disables surface rendering mode for component. Surfaces can support a sort of z-indexing of its descendants via their elevation properties. The surface will render the shadows of elevated descendants to convey depth.

    ###### Parameters

    - `surface`: True to enable surface rendering mode.

    - `override`: @param override If set to true allows the look and feel/theme to override the value in this attribute when changing a theme/look and feel

    ###### Since

    8.0

  - ### setAlignment

    public void setAlignment(int align, boolean override)

    Sets the Alignment of the Label to one of: CENTER, LEFT, RIGHT

    ###### Parameters

    - `align`: alignment value

    - `override`: @param override If set to true allows the look and feel/theme to override the value in this attribute when changing a theme/look and feel

    ###### See also

    - com.codename1.ui.Component#CENTER

    - com.codename1.ui.Component#LEFT

    - com.codename1.ui.Component#RIGHT

  - ### getAlignment

    public int getAlignment()

    Returns the alignment of the Label

    ###### Returns

    the alignment of the Label one of: CENTER, LEFT, RIGHT

    ###### See also

    - com.codename1.ui.Component#CENTER

    - com.codename1.ui.Component#LEFT

    - com.codename1.ui.Component#RIGHT

  - ### setAlignment

    public void setAlignment(int align)

    Sets the Alignment of the Label to one of: CENTER, LEFT, RIGHT

    ###### Parameters

    - `align`: alignment value

    ###### See also

    - com.codename1.ui.Component#CENTER

    - com.codename1.ui.Component#LEFT

    - com.codename1.ui.Component#RIGHT

  - ### isUnderline

    public boolean isUnderline()

    Returns true if the underline text decoration is on, false otherwise

    ###### Returns

    true if the underline text decoration is on, false otherwise

  - ### setUnderline

    public void setUnderline(boolean underline)

    Sets the underline text decoration for this style

    ###### Parameters

    - `underline`: true to turn underline on, false to turn it off

  - ### set3DText

    public void set3DText(boolean t, boolean raised)

    Sets the 3D text decoration for this style

    ###### Parameters

    - `t`: true to turn 3d shadow effect on, false to turn it off

    - `raised`: indicates a raised or lowered effect

  - ### is3DTextNorth

    public boolean is3DTextNorth()

    Returns the text decoration state for the north

    ###### Returns

    true if that is used

  - ### set3DTextNorth

    public void set3DTextNorth(boolean north)

    Sets the text decoration to 3D text

    ###### Parameters

    - `north`: true to enable 3d text with the shadow on top false otherwise

  - ### isRaised3DText

    public boolean isRaised3DText()

    Returns true if the 3D text decoration is on, false otherwise

    ###### Returns

    true if the 3D text decoration is on, false otherwise

  - ### isLowered3DText

    public boolean isLowered3DText()

    Returns true if the 3D text decoration is on, false otherwise

    ###### Returns

    true if the 3D text decoration is on, false otherwise

  - ### isOverline

    public boolean isOverline()

    Returns true if the overline text decoration is on, false otherwise

    ###### Returns

    true if the overline text decoration is on, false otherwise

  - ### setOverline

    public void setOverline(boolean overline)

    Sets the overline text decoration for this style

    ###### Parameters

    - `overline`: true to turn overline on, false to turn it off

  - ### isStrikeThru

    public boolean isStrikeThru()

    Returns true if the strike through text decoration is on, false otherwise

    ###### Returns

    true if the strike through text decoration is on, false otherwise

  - ### setStrikeThru

    public void setStrikeThru(boolean strikethru)

    Sets the strike through text decoration for this style

    ###### Parameters

    - `strikethru`: true to turn strike through on, false to turn it off

  - ### getTextDecoration

    public int getTextDecoration()

    Returns the text decoration of this style

    ###### Returns

    the text decoration of this style (bitmask of the TEXT_DECORATION_* constants)

  - ### setTextDecoration

    public void setTextDecoration(int textDecoration)

    Sets the text decoration of this style

    ###### Parameters

    - `textDecoration`: the textDecoration to set (bitmask of the TEXT_DECORATION_* constants)

  - ### setTextDecoration

    public void setTextDecoration(int textDecoration, boolean override)

    Sets the text decoration of this style

    ###### Parameters

    - `textDecoration`: the textDecoration to set (bitmask of the TEXT_DECORATION_* constants)

    - `override`: @param override If set to true allows the look and feel/theme to override the value in this attribute when changing a theme/look and feel

  - ### getBgTransparency

    public byte getBgTransparency()

    Returns the transparency (opacity) level of the Component, zero indicates fully transparent and FF indicates fully opaque.

    ###### Returns

    the transparency level of the Component

  - ### setBgTransparency

    public void setBgTransparency(byte transparency)

    Sets the Component transparency (opacity) level of the Component, zero indicates fully transparent and FF indicates fully opaque.

    ###### Parameters

    - `transparency`: transparency level as byte

  - ### setBgTransparency

    public void setBgTransparency(int transparency)

    Sets the Component transparency level. Valid values should be a number between 0-255

    ###### Parameters

    - `transparency`: int value between 0-255

  - ### getOpacity

    public int getOpacity()

    Returns the opacity value for the component

    ###### Returns

    the opacity value

  - ### setOpacity

    public final void setOpacity(int opacity)

    Set the opacity value

    ###### Parameters

    - `opacity`: the opacity value

  - ### setOpacity

    public final void setOpacity(int opacity, boolean override)

    Sets the Component transparency level. Valid values should be a number between 0-255

    ###### Parameters

    - `opacity`: int value between 0-255

    - `override`: @param override If set to true allows the look and feel/theme to override the value in this attribute when changing a theme/look and feel

  - ### stripMarginAndPadding

    public void stripMarginAndPadding()

    Strips all margin and padding from this style.

    ###### Since

    7.0

  - ### setPadding

    public void setPadding(int top, int bottom, int left, int right)

    Sets the Style Padding. Units are specified by `#setPaddingUnit(byte...)`

    ###### Parameters

    - `top`: number of units to pad the top

    - `bottom`: number of units to pad the bottom

    - `left`: number of units to pad the left

    - `right`: number of units to pad the right

    ###### See also

    - #setPaddingUnit(byte...)

  - ### setPadding

    public void setPadding(float top, float bottom, float left, float right)

    Sets the Style Padding. Units are specified by `#setPaddingUnit(byte...)`

    ###### Parameters

    - `top`: number of units to pad the top

    - `bottom`: number of units to pad the bottom

    - `left`: number of units to pad the left

    - `right`: number of units to pad the right

    ###### See also

    - #setPaddingUnit(byte...)

  - ### setPadding

    public void setPadding(int orientation, int gap)

    Sets the Style Padding. Units are specified by `#setPaddingUnit(byte...)`

    ###### Parameters

    - `orientation`: one of: Component.TOP, Component.BOTTOM, Component.LEFT, Component.RIGHT

    - `gap`: number of units to pad the orientation

  - ### setPadding

    public void setPadding(int orientation, float gap)

    Sets the Style Padding. Units are specified by `#setPaddingUnit(byte...)`

    ###### Parameters

    - `orientation`: one of: Component.TOP, Component.BOTTOM, Component.LEFT, Component.RIGHT

    - `gap`: number of units to pad the orientation

  - ### setMargin

    public void setMargin(int top, int bottom, int left, int right)

    Sets the Style Margin

    ###### Parameters

    - `top`: number of margin using the current unit

    - `bottom`: number of margin using the current unit

    - `left`: number of margin using the current unit

    - `right`: number of margin using the current unit

  - ### setMargin

    public void setMargin(float top, float bottom, float left, float right)

    Sets the Style Margin

    ###### Parameters

    - `top`: number of margin using the current unit

    - `bottom`: number of margin using the current unit

    - `left`: number of margin using the current unit

    - `right`: number of margin using the current unit

  - ### cacheMargins

    public void cacheMargins(boolean override)

    Store current margin values into a cache that could be restored with restoreCachedMargins()

    ###### Parameters

    - `override`: if true, margins are cached even if a previous cache already exists. If false, margins are cached only if no cache already exists. Warning: This method is used internally when hidding a component with the Component.setHidden(true) method and expect a component with no previous margins cache. So do not use this method on a component that would be hidden or flush its margins cache by calling flushMarginsCache() before hidding the component. And do not use on an hidden component either or unhidding this component might result in unexpected results

  - ### restoreCachedMargins

    public void restoreCachedMargins()
    Restore cached margins and flush the margins cache Warning: this method is used internally when unhidding a component with the Component.setHidden(false) method Do not use it on an hidden component or it would result into unexpected results when unhidding this component

  - ### flushMarginsCache

    public void flushMarginsCache()
    Flush the margins cache if one exists

  - ### setMargin

    public void setMargin(int orientation, int gap)

    Sets the Style Margin

    ###### Parameters

    - `orientation`: one of: Component.TOP, Component.BOTTOM, Component.LEFT, Component.RIGHT

    - `gap`: number of margin using the current unit

  - ### setMargin

    public void setMargin(int orientation, float gap)

    Sets the Style Margin

    ###### Parameters

    - `orientation`: one of: Component.TOP, Component.BOTTOM, Component.LEFT, Component.RIGHT

    - `gap`: number of margin using the current unit

  - ### getPaddingValue

    public int getPaddingValue(boolean rtl, int orientation)

    Returns the Padding in the internal value regardless of the unit

    ###### Parameters

    - `rtl`: flag indicating whether the padding is for an RTL bidi component

    - `orientation`: one of: Component.TOP, Component.BOTTOM, Component.LEFT, Component.RIGHT

    ###### Returns

    amount of padding in the given orientation using current units.

    ###### Deprecated

    Use `int)`

    ###### See also

    - #getPaddingUnit()

  - ### getPaddingFloatValue

    public float getPaddingFloatValue(boolean rtl, int orientation)

    Returns the Padding in the internal value regardless of the unit

    ###### Parameters

    - `rtl`: flag indicating whether the padding is for an RTL bidi component

    - `orientation`: one of: Component.TOP, Component.BOTTOM, Component.LEFT, Component.RIGHT

    ###### Returns

    amount of padding in the given orientation using current units.

    ###### Since

    8.0

    ###### See also

    - #getPaddingUnit()

  - ### getPaddingLeft

    public int getPaddingLeft(boolean rtl)

    Returns the left padding in pixel or right padding in an RTL situation

    ###### Parameters

    - `rtl`: indicates a right to left language

    ###### Returns

    the padding in pixels

  - ### setPaddingUnitLeft

    public void setPaddingUnitLeft(byte unit)

    Sets left padding unit.

    ###### Parameters

    - `unit`: @param unit One of of `#UNIT_TYPE_PIXELS`, `#UNIT_TYPE_DIPS`, `#UNIT_TYPE_SCREEN_PERCENTAGE`, `#UNIT_TYPE_VW`, `#UNIT_TYPE_VH`, `#UNIT_TYPE_VMIN`, `#UNIT_TYPE_VMAX`, `#UNIT_TYPE_REM`.

    ###### Since

    7.0

  - ### setPaddingUnitRight

    public void setPaddingUnitRight(byte unit)

    Sets right padding unit.

    ###### Parameters

    - `unit`: @param unit One of `#UNIT_TYPE_PIXELS`, `#UNIT_TYPE_DIPS`, `#UNIT_TYPE_SCREEN_PERCENTAGE`, `#UNIT_TYPE_VW`, `#UNIT_TYPE_VH`, `#UNIT_TYPE_VMIN`, `#UNIT_TYPE_VMAX`, `#UNIT_TYPE_REM`.

    ###### Since

    7.0

  - ### setPaddingUnitTop

    public void setPaddingUnitTop(byte unit)

    Sets top padding unit.

    ###### Parameters

    - `unit`: @param unit One of `#UNIT_TYPE_PIXELS`, `#UNIT_TYPE_DIPS`, `#UNIT_TYPE_SCREEN_PERCENTAGE`, `#UNIT_TYPE_VW`, `#UNIT_TYPE_VH`, `#UNIT_TYPE_VMIN`, `#UNIT_TYPE_VMAX`, `#UNIT_TYPE_REM`.

    ###### Since

    7.0

  - ### setPaddingUnitBottom

    public void setPaddingUnitBottom(byte unit)

    Sets bottom padding unit.

    ###### Parameters

    - `unit`: @param unit One of `#UNIT_TYPE_PIXELS`, `#UNIT_TYPE_DIPS`, `#UNIT_TYPE_SCREEN_PERCENTAGE`, `#UNIT_TYPE_VW`, `#UNIT_TYPE_VH`, `#UNIT_TYPE_VMIN`, `#UNIT_TYPE_VMAX`, `#UNIT_TYPE_REM`.

    ###### Since

    7.0

  - ### getPaddingRight

    public int getPaddingRight(boolean rtl)

    Returns the right padding in pixel or left padding in an RTL situation

    ###### Parameters

    - `rtl`: indicates a right to left language

    ###### Returns

    the padding in pixels

  - ### getPaddingTop

    public int getPaddingTop()

    Returns the top padding in pixel

    ###### Returns

    the padding in pixels

  - ### setPaddingTop

    public void setPaddingTop(int gap)

    Sets the Style Padding on the top, this is equivalent to calling `setPadding(Component.TOP, gap, false);`

    ###### Parameters

    - `gap`: amount to pad the top in current units.

    ###### See also

    - #getPaddingUnit()

  - ### setPaddingTop

    public void setPaddingTop(float gap)

    Sets the Style Padding on the top, this is equivalent to calling `setPadding(Component.TOP, gap, false);`

    ###### Parameters

    - `gap`: Amount to pad the top in current units.

    ###### See also

    - #getPaddingUnit()

    - #setPaddingUnit(byte...)

  - ### setPaddingLeft

    public void setPaddingLeft(int gap)

    Sets the Style Padding on the left, this is equivalent to calling `setPadding(Component.LEFT, gap, false);`

    ###### Parameters

    - `gap`: Amount to pad the left in current units.

    ###### See also

    - #getPaddingUnit()

    - #setPaddingUnit(byte...)

  - ### setPaddingLeft

    public void setPaddingLeft(float gap)

    Sets the Style Padding on the left, this is equivalent to calling `setPadding(Component.LEFT, gap, false);`

    ###### Parameters

    - `gap`: Amount to pad the left in current units.

    ###### See also

    - #getPaddingUnit()

    - #setPaddingUnit(byte...)

  - ### setPaddingRight

    public void setPaddingRight(int gap)

    Sets the Style Padding on the right, this is equivalent to calling `setPadding(Component.RIGHT, gap, false);`

    ###### Parameters

    - `gap`: Amount to pad the right in current units.

    ###### See also

    - #getPaddingUnit()

    - #setPaddingUnit(byte...)

  - ### setPaddingRight

    public void setPaddingRight(float gap)

    Sets the Style Padding on the right, this is equivalent to calling `setPadding(Component.RIGHT, gap, false);`

    ###### Parameters

    - `gap`: Amount to pad the right in current units.

    ###### See also

    - #getPaddingUnit()

    - #setPaddingUnit(byte...)

  - ### setMarginLeft

    public void setMarginLeft(int gap)

    Sets the Style Margin on the left, this is equivalent to calling `setMargin(Component.LEFT, gap, false);`

    ###### Parameters

    - `gap`: number of left margin using the current unit

  - ### setMarginLeft

    public void setMarginLeft(float gap)

    Sets the Style Margin on the left, this is equivalent to calling `setMargin(Component.LEFT, gap, false);`

    ###### Parameters

    - `gap`: number of left margin using the current unit

  - ### setMarginRight

    public void setMarginRight(int gap)

    Sets the Style Margin on the right, this is equivalent to calling `setMargin(Component.RIGHT, gap, false);`

    ###### Parameters

    - `gap`: number of right margin using the current unit

  - ### setMarginRight

    public void setMarginRight(float gap)

    Sets the Style Margin on the right, this is equivalent to calling `setMargin(Component.RIGHT, gap, false);`

    ###### Parameters

    - `gap`: number of right margin using the current unit

  - ### getPaddingBottom

    public int getPaddingBottom()

    Returns the bottom padding in pixel

    ###### Returns

    the padding in pixels

  - ### setPaddingBottom

    public void setPaddingBottom(int gap)

    Sets the Style Padding on the bottom, this is equivalent to calling `setPadding(Component.BOTTOM, gap, false);`

    ###### Parameters

    - `gap`: Amount to pad the bottom in current units.

    ###### See also

    - #getPaddingUnit()

    - #setPaddingUnit(byte...)

  - ### setPaddingBottom

    public void setPaddingBottom(float gap)

    Sets the Style Padding on the bottom, this is equivalent to calling `setPadding(Component.BOTTOM, gap, false);`

    ###### Parameters

    - `gap`: Amount to pad the bottom in current units.

    ###### See also

    - #getPaddingUnit()

    - #setPaddingUnit(byte...)

  - ### getHorizontalMargins

    public int getHorizontalMargins()

    The equivalent of getMarginLeft + getMarginRight

    ###### Returns

    the side margin

  - ### getVerticalMargins

    public int getVerticalMargins()

    The equivalent of getMarginTop + getMarginBottom

    ###### Returns

    the vertical margin

  - ### getHorizontalPadding

    public int getHorizontalPadding()

    The equivalent of getPaddingLeft + getPaddingRight

    ###### Returns

    the side padding

  - ### getVerticalPadding

    public int getVerticalPadding()

    The equivalent of getPaddingTop + getPaddingBottom

    ###### Returns

    the vertical padding

  - ### getMarginRightNoRTL

    public int getMarginRightNoRTL()

    Returns the right margin in pixels ignoring RTL

    ###### Returns

    the margin in pixels

  - ### getMarginLeftNoRTL

    public int getMarginLeftNoRTL()

    Returns the left margin in pixels ignoring RTL

    ###### Returns

    the margin in pixels

  - ### getPaddingRightNoRTL

    public int getPaddingRightNoRTL()

    Returns the right padding in pixels ignoring RTL

    ###### Returns

    the padding in pixels

  - ### getPaddingLeftNoRTL

    public int getPaddingLeftNoRTL()

    Returns the left padding in pixels ignoring RTL

    ###### Returns

    the padding in pixels

  - ### getMarginRight

    public int getMarginRight(boolean rtl)

    Returns the right margin in pixel or left margin in an RTL situation

    ###### Parameters

    - `rtl`: indicates a right to left language

    ###### Returns

    the margin in pixels

  - ### getMarginLeft

    public int getMarginLeft(boolean rtl)

    Returns the left margin in pixel or right margin in an RTL situation

    ###### Parameters

    - `rtl`: indicates a right to left language

    ###### Returns

    the margin in pixels

  - ### getMarginTop

    public int getMarginTop()

    Returns the top margin in pixel

    ###### Returns

    the margin in pixels

  - ### setMarginTop

    public void setMarginTop(int gap)

    Sets the Style margin on the top, this is equivalent to calling `setMargin(Component.TOP, gap, false);`

    ###### Parameters

    - `gap`: number of top margin using the current unit

  - ### setMarginTop

    public void setMarginTop(float gap)

    Sets the Style margin on the top, this is equivalent to calling `setMargin(Component.TOP, gap, false);`

    ###### Parameters

    - `gap`: number of top margin using the current unit

  - ### getMarginBottom

    public int getMarginBottom()

    Returns the bottom margin in pixel

    ###### Returns

    the margin in pixels

  - ### setMarginBottom

    public void setMarginBottom(int gap)

    Sets the Style Margin on the bottom, this is equivalent to calling `setMargin(Component.BOTTOM, gap, false);`

    ###### Parameters

    - `gap`: number of bottom margin using the current unit

  - ### setMarginBottom

    public void setMarginBottom(float gap)

    Sets the Style Margin on the bottom, this is equivalent to calling `setMargin(Component.BOTTOM, gap, false);`

    ###### Parameters

    - `gap`: number of bottom margin using the current unit

  - ### getPadding

    public int getPadding(boolean rtl, int orientation)

    Returns the Padding in using the current unit

    ###### Parameters

    - `rtl`: flag indicating whether the padding is for an RTL bidi component

    - `orientation`: one of: Component.TOP, Component.BOTTOM, Component.LEFT, Component.RIGHT

    ###### Returns

    number of padding pixels in the given orientation

  - ### getPadding

    public int getPadding(int orientation)

    Returns the Padding

    ###### Parameters

    - `orientation`: one of: Component.TOP, Component.BOTTOM, Component.LEFT, Component.RIGHT

    ###### Returns

    number of padding pixels in the given orientation

  - ### getMargin

    public int getMargin(int orientation)

    Returns the Margin

    ###### Parameters

    - `orientation`: one of: Component.TOP, Component.BOTTOM, Component.LEFT, Component.RIGHT

    ###### Returns

    number of margin using the current unit in the given orientation

  - ### getMargin

    public int getMargin(boolean rtl, int orientation)

    Returns the Margin

    ###### Parameters

    - `rtl`: flag indicating whether the padding is for an RTL bidi component

    - `orientation`: one of: Component.TOP, Component.BOTTOM, Component.LEFT, Component.RIGHT

    ###### Returns

    number of margin using the current unit in the given orientation

  - ### getMarginValue

    public int getMarginValue(boolean rtl, int orientation)

    Returns the Margin

    ###### Parameters

    - `rtl`: flag indicating whether the padding is for an RTL bidi component

    - `orientation`: one of: Component.TOP, Component.BOTTOM, Component.LEFT, Component.RIGHT

    ###### Returns

    number of margin using the current unit in the given orientation

    ###### Deprecated

    Use `int)`

  - ### getMarginFloatValue

    public float getMarginFloatValue(boolean rtl, int orientation)

    Returns the Margin

    ###### Parameters

    - `rtl`: flag indicating whether the padding is for an RTL bidi component

    - `orientation`: one of: Component.TOP, Component.BOTTOM, Component.LEFT, Component.RIGHT

    ###### Returns

    number of margin using the current unit in the given orientation

    ###### Since

    8.0

  - ### setBgColor

    public void setBgColor(int bgColor, boolean override)

    Sets the background color for the component

    ###### Parameters

    - `bgColor`: RRGGBB color that ignores the alpha component

    - `override`: @param override If set to true allows the look and feel/theme to override the value in this attribute when changing a theme/look and feel

  - ### setBgImage

    public void setBgImage(Image bgImage, boolean override)

    Sets the background image for the component

    ###### Parameters

    - `bgImage`: background image

    - `override`: @param override If set to true allows the look and feel/theme to override the value in this attribute when changing a theme/look and feel

  - ### setBackgroundType

    public void setBackgroundType(byte backgroundType, boolean override)

    Sets the background type for the component

    ###### Parameters

    - `backgroundType`: @param backgroundType one of BACKGROUND_IMAGE_SCALED, BACKGROUND_IMAGE_TILE_BOTH, BACKGROUND_IMAGE_TILE_VERTICAL, BACKGROUND_IMAGE_TILE_HORIZONTAL, BACKGROUND_IMAGE_ALIGNED, BACKGROUND_GRADIENT_LINEAR_HORIZONTAL, BACKGROUND_GRADIENT_LINEAR_VERTICAL, BACKGROUND_GRADIENT_RADIAL

    - `override`: @param override If set to true allows the look and feel/theme to override the value in this attribute when changing a theme/look and feel

  - ### setBackgroundGradientStartColor

    public void setBackgroundGradientStartColor(int backgroundGradientStartColor, boolean override)

    Sets the background color for the component

    ###### Parameters

    - `backgroundGradientStartColor`: start color for the linear/radial gradient

    - `override`: @param override If set to true allows the look and feel/theme to override the value in this attribute when changing a theme/look and feel

  - ### setBackgroundGradientEndColor

    public void setBackgroundGradientEndColor(int backgroundGradientEndColor, boolean override)

    Sets the background color for the component

    ###### Parameters

    - `backgroundGradientEndColor`: end color for the linear/radial gradient

    - `override`: @param override If set to true allows the look and feel/theme to override the value in this attribute when changing a theme/look and feel

  - ### setBackgroundGradientRelativeX

    public void setBackgroundGradientRelativeX(float backgroundGradientRelativeX, boolean override)

    Background radial gradient relative center position X

    ###### Parameters

    - `backgroundGradientRelativeX`: x position of the radial gradient center

    - `override`: @param override If set to true allows the look and feel/theme to override the value in this attribute when changing a theme/look and feel

  - ### setBackgroundGradientRelativeY

    public void setBackgroundGradientRelativeY(float backgroundGradientRelativeY, boolean override)

    Background radial gradient relative center position Y

    ###### Parameters

    - `backgroundGradientRelativeY`: y position of the radial gradient center

    - `override`: @param override If set to true allows the look and feel/theme to override the value in this attribute when changing a theme/look and feel

  - ### setBackgroundGradientRelativeSize

    public void setBackgroundGradientRelativeSize(float backgroundGradientRelativeSize, boolean override)

    Background radial gradient relative size

    ###### Parameters

    - `backgroundGradientRelativeSize`: @param backgroundGradientRelativeSize the size of the radial gradient relative to the screens larger dimension

    - `override`: @param override If set to true allows the look and feel/theme to override the value in this attribute when changing a theme/look and feel

  - ### setFgColor

    public final void setFgColor(int fgColor, boolean override)

    Sets the foreground color for the component

    ###### Parameters

    - `fgColor`: foreground color

    - `override`: @param override If set to true allows the look and feel/theme to override the value in this attribute when changing a theme/look and feel

  - ### setFgAlpha

    public void setFgAlpha(int fgAlpha, boolean override)

    Sets the foreground alpha for the component

    ###### Parameters

    - `fgAlpha`: foreground alpha

    - `override`: @param override If set to true allows the look and feel/theme to override the value in this attribute when changing a theme/look and feel

  - ### setFont

    public void setFont(Font font, boolean override)

    Sets the font for the component

    ###### Parameters

    - `font`: the font

    - `override`: @param override If set to true allows the look and feel/theme to override the value in this attribute when changing a theme/look and feel

  - ### setBgTransparency

    public void setBgTransparency(int transparency, boolean override)

    Sets the Component transparency level. Valid values should be a number between 0-255

    ###### Parameters

    - `transparency`: int value between 0-255

    - `override`: @param override If set to true allows the look and feel/theme to override the value in this attribute when changing a theme/look and feel

  - ### setPadding

    public void setPadding(int orientation, int gap, boolean override)

    Sets the Style Padding

    ###### Parameters

    - `orientation`: one of: Component.TOP, Component.BOTTOM, Component.LEFT, Component.RIGHT

    - `gap`: number of pixels to pad the orientation

    - `override`: @param override If set to true allows the look and feel/theme to override the value in this attribute when changing a theme/look and feel

  - ### setPadding

    public void setPadding(int orientation, float gap, boolean override)

    Sets the Style Padding

    ###### Parameters

    - `orientation`: one of: Component.TOP, Component.BOTTOM, Component.LEFT, Component.RIGHT

    - `gap`: number of pixels to pad the orientation

    - `override`: @param override If set to true allows the look and feel/theme to override the value in this attribute when changing a theme/look and feel

  - ### setMargin

    public void setMargin(int orientation, int gap, boolean override)

    Sets the Style Margin

    ###### Parameters

    - `orientation`: one of: Component.TOP, Component.BOTTOM, Component.LEFT, Component.RIGHT

    - `gap`: number of margin using the current unit

    - `override`: @param override If set to true allows the look and feel/theme to override the value in this attribute when changing a theme/look and feel

  - ### setMargin

    public void setMargin(int orientation, float gap, boolean override)

    Sets the Style Margin

    ###### Parameters

    - `orientation`: one of: Component.TOP, Component.BOTTOM, Component.LEFT, Component.RIGHT

    - `gap`: number of margin using the current unit

    - `override`: @param override If set to true allows the look and feel/theme to override the value in this attribute when changing a theme/look and feel

  - ### isSuppressChangeEvents

    public boolean isSuppressChangeEvents()

    Checks to see if change events are currently suppressed.

    ###### Returns

    True if change events are suppressed.

    ###### Since

    7.0

  - ### setSuppressChangeEvents

    public void setSuppressChangeEvents(boolean suppress)

    Enables or disables events. Use this to temporarily suppress change events.

    ###### Parameters

    - `suppress`: True to suppress change events.

    ###### Since

    7.0

  - ### addStyleListener

    public void addStyleListener(StyleListener l)

    Adds a Style Listener to the Style Object.

    ###### Parameters

    - `l`: a style listener

  - ### removeStyleListener

    public void removeStyleListener(StyleListener l)

    Removes a Style Listener from the Style Object.

    ###### Parameters

    - `l`: a style listener

  - ### removeListeners

    public void removeListeners()
    This method removes all Listeners from the Style

  - ### setBorder

    public void setBorder(Border border, boolean override)

    Sets the border for the style

    ###### Parameters

    - `border`: new border object for the component

    - `override`: @param override If set to true allows the look and feel/theme to override the value in this attribute when changing a theme/look and feel

  - ### getBorder

    public Border getBorder()

    Returns the border for the style

    ###### Returns

    the border

  - ### setBorder

    public void setBorder(Border border)

    Sets the border for the style

    ###### Parameters

    - `border`: new border object for the component

  - ### getBgPainter

    public Painter getBgPainter()

    Return the background painter for this style, normally this would be the internal image/color painter but can be user defined

    ###### Returns

    the background painter

  - ### setBgPainter

    public void setBgPainter(Painter bgPainter)

    Defines the background painter for this style, normally this would be the internal image/color painter but can be user defined

    ###### Parameters

    - `bgPainter`: new painter to install into the style

  - ### getPaddingUnit

    public byte[] getPaddingUnit()

    Indicates the units used for padding elements, if null pixels are used if not this is a 4 element array containing values of of `#UNIT_TYPE_PIXELS`, `#UNIT_TYPE_DIPS`, `#UNIT_TYPE_SCREEN_PERCENTAGE`, `#UNIT_TYPE_VW`, `#UNIT_TYPE_VH`,

    - `#UNIT_TYPE_VMIN`, `#UNIT_TYPE_VMAX`, `#UNIT_TYPE_REM`.

    ###### Returns

    the paddingUnit

  - ### setPaddingUnit

    public void setPaddingUnit(byte... paddingUnit)

    Indicates the units used for padding elements, if null pixels are used if not this is a 4 element array containing values of `#UNIT_TYPE_PIXELS`, `#UNIT_TYPE_DIPS`, `#UNIT_TYPE_SCREEN_PERCENTAGE`, `#UNIT_TYPE_VW`, `#UNIT_TYPE_VH`, `#UNIT_TYPE_VMIN`, `#UNIT_TYPE_VMAX`, `#UNIT_TYPE_REM`.

    ###### Parameters

    - `paddingUnit`: the paddingUnit to set

  - ### getMarginUnit

    public byte[] getMarginUnit()

    Indicates the units used for margin elements, if null pixels are used if not this is a 4 element array containing values of of `#UNIT_TYPE_PIXELS`, `#UNIT_TYPE_DIPS`, `#UNIT_TYPE_SCREEN_PERCENTAGE`, `#UNIT_TYPE_VW`, `#UNIT_TYPE_VH`,

    - `#UNIT_TYPE_VMIN`, `#UNIT_TYPE_VMAX`, `#UNIT_TYPE_REM`.

    ###### Returns

    the marginUnit

  - ### setMarginUnit

    public void setMarginUnit(byte... marginUnit)

    Indicates the units used for margin elements, if null pixels are used if not this is a 4 element array containing values of of `#UNIT_TYPE_PIXELS`, `#UNIT_TYPE_DIPS`, `#UNIT_TYPE_SCREEN_PERCENTAGE`, `#UNIT_TYPE_VW`, `#UNIT_TYPE_VH`,

    - `#UNIT_TYPE_VMIN`, `#UNIT_TYPE_VMAX`, `#UNIT_TYPE_REM`.

    ###### Parameters

    - `marginUnit`: the marginUnit to set

  - ### setMarginUnitLeft

    public void setMarginUnitLeft(byte unit)

    Sets left margin unit.

    ###### Parameters

    - `unit`: @param unit One of `#UNIT_TYPE_PIXELS`, `#UNIT_TYPE_DIPS`, `#UNIT_TYPE_SCREEN_PERCENTAGE`, `#UNIT_TYPE_VW`, `#UNIT_TYPE_VH`, `#UNIT_TYPE_VMIN`, `#UNIT_TYPE_VMAX`, `#UNIT_TYPE_REM`.

    ###### Since

    7.0

  - ### setMarginUnitRight

    public void setMarginUnitRight(byte unit)

    Sets right margin unit.

    ###### Parameters

    - `unit`: @param unit One of `#UNIT_TYPE_PIXELS`, `#UNIT_TYPE_DIPS`, `#UNIT_TYPE_SCREEN_PERCENTAGE`, `#UNIT_TYPE_VW`, `#UNIT_TYPE_VH`, `#UNIT_TYPE_VMIN`, `#UNIT_TYPE_VMAX`, `#UNIT_TYPE_REM`.

    ###### Since

    7.0

  - ### setMarginUnitTop

    public void setMarginUnitTop(byte unit)

    Sets top margin unit.

    ###### Parameters

    - `unit`: @param unit One of `#UNIT_TYPE_PIXELS`, `#UNIT_TYPE_DIPS`, `#UNIT_TYPE_SCREEN_PERCENTAGE`, `#UNIT_TYPE_VW`, `#UNIT_TYPE_VH`, `#UNIT_TYPE_VMIN`, `#UNIT_TYPE_VMAX`, `#UNIT_TYPE_REM`.

    ###### Since

    7.0

  - ### setMarginUnitBottom

    public void setMarginUnitBottom(byte unit)

    Sets bottom margin unit.

    ###### Parameters

    - `unit`: @param unit One of `#UNIT_TYPE_PIXELS`, `#UNIT_TYPE_DIPS`, `#UNIT_TYPE_SCREEN_PERCENTAGE`, `#UNIT_TYPE_VW`, `#UNIT_TYPE_VH`, `#UNIT_TYPE_VMIN`, `#UNIT_TYPE_VMAX`, `#UNIT_TYPE_REM`.

    ###### Since

    7.0

  - ### equals

    public boolean equals(Object obj)
    Description copied from class: `Object`
    Indicates whether some other object is "equal to" this one. The equals method implements an equivalence relation: It is reflexive: for any reference value x, x.equals(x) should return true. It is symmetric: for any reference values x and y, x.equals(y) should return true if and only if y.equals(x) returns true. It is transitive: for any reference values x, y, and z, if x.equals(y) returns true and y.equals(z) returns true, then x.equals(z) should return true. It is consistent: for any reference values x and y, multiple invocations of x.equals(y) consistently return true or consistently return false, provided no information used in equals comparisons on the object is modified. For any non-null reference value x, x.equals(null) should return false. The equals method for class Object implements the most discriminating possible equivalence relation on objects; that is, for any reference values x and y, this method returns true if and only if x and y refer to the same object (x==y has the value true).
    Overrides:
      `equals` in class `Object`

  - ### hashCode

    public int hashCode()
    Description copied from class: `Object`
    Returns a hash code value for the object. This method is supported for the benefit of hashtables such as those provided by java.util.Hashtable. The general contract of hashCode is: Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application. If two objects are equal according to the equals(Object) method, then calling the hashCode method on each of the two objects must produce the same integer result. It is not required that if two objects are unequal according to the equals(java.lang.Object) method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hashtables. As much as is reasonably practical, the hashCode method defined by class Object does return distinct integers for distinct objects. (This is typically implemented by converting the internal address of the object into an integer, but this implementation technique is not required by the JavaTM programming language.)
    Overrides:
      `hashCode` in class `Object`