Interface SubstanceButtonShaper
- All Superinterfaces:
SubstanceTrait
- All Known Implementing Classes:
ClassicButtonShaper
,StandardButtonShaper
Button shaper interface for Substance look and feel. This class is
part of officially supported API.
-
Method Summary
Modifier and TypeMethodDescriptiongetButtonBorder
(AbstractButton button) Returns the border for the specified button.getButtonOutline
(AbstractButton button, Insets insets, int width, int height, boolean isInner) Returns the outline path for the specified button.Returns the display name ofthis
trait.getPreferredSize
(AbstractButton button, Dimension uiPreferredSize) Returns the preferred size for the specified button.boolean
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 ofthis
trait. This method is part of officially supported API.- Specified by:
getDisplayName
in interfaceSubstanceTrait
- 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
Returns the border for the specified button.- Parameters:
button
- A button.- Returns:
- The border for the specified button.
-
getPreferredSize
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
ifthis
shaper should maintain button proportions on the resize,false
otherwise.
-