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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description BordergetButtonBorder(AbstractButton button)Returns the border for the specified button.ShapegetButtonOutline(AbstractButton button, Insets insets, int width, int height, boolean isInner)Returns the outline path for the specified button.StringgetDisplayName()Returns the display name ofthistrait.DimensiongetPreferredSize(AbstractButton button, Dimension uiPreferredSize)Returns the preferred size for the specified button.booleanisProportionate()Returns the boolean indication whether the shaper should maintain button proportions on the resize.
-
-
-
Method Detail
-
getDisplayName
String getDisplayName()
Description copied from interface:SubstanceTraitReturns the display name ofthistrait. This method is part of officially supported API.- Specified by:
getDisplayNamein interfaceSubstanceTrait- Returns:
- The display name of
thistrait.
-
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:
trueifthisshaper should maintain button proportions on the resize,falseotherwise.
-
-