Package org.pushingpixels.substance.api.shaper

# Interface SubstanceButtonShaper

All Superinterfaces:
  `SubstanceTrait`

All Known Implementing Classes:
  `ClassicButtonShaper`, `StandardButtonShaper`

public interface SubstanceButtonShaper extends SubstanceTrait
Button shaper interface for Substance look and feel. This class is part of officially supported API.

## Method Summary

Modifier and Type
Method
Description
`Border`
`getButtonBorder(AbstractButton button)`
Returns the border for the specified button.
`Shape`
`getButtonOutline(AbstractButton button, Insets insets, int width, int height, boolean isInner)`
Returns the outline path for the specified button.
`String`
`getDisplayName()`
Returns the display name of `this` trait.
`Dimension`
`getPreferredSize(AbstractButton button, Dimension uiPreferredSize)`
Returns the preferred size for the specified button.
`boolean`
`isProportionate()`
Returns the boolean indication whether the shaper should maintain button proportions on the resize.

## Method Details

### getDisplayName

String getDisplayName()
Description copied from interface: `SubstanceTrait`
Returns the display name of `this` trait. This method is part of officially supported API.

Specified by:
  `getDisplayName` in interface `SubstanceTrait`
Returns:
  The display name of `this` trait.

### getButtonOutline

Shape getButtonOutline(AbstractButton button, Insets insets, int width, int height, boolean isInner)
Returns the outline path for the specified button.

Parameters:
  `button` - A button.
  `insets` - Button insets.
  `width` - Button width.
  `height` - Button height.
  `isInner` - Indication whether the returned outline is used for the inner contour.
Returns:
  The outline path for the specified button.

### getButtonBorder

Border getButtonBorder(AbstractButton button)
Returns the border for the specified button.

Parameters:
  `button` - A button.
Returns:
  The border for the specified button.

### getPreferredSize

Dimension getPreferredSize(AbstractButton button, Dimension uiPreferredSize)
Returns the preferred size for the specified button.

Parameters:
  `button` - A button.
  `uiPreferredSize` - Preferred size of the button under the regular conditions (plain rectangular button).
Returns:
  The preferred size for the specified button.

### isProportionate

boolean isProportionate()
Returns the boolean indication whether the shaper should maintain button proportions on the resize. This may be relevant for vector-based shapers (such as animals / other objects).

Returns:
  `true` if `this` shaper should maintain button proportions on the resize, `false` otherwise.