Interface RadianceButtonShaper
-
- All Superinterfaces:
RadianceTrait
- All Known Implementing Classes:
BasePolygonShaper
,ButterflyButtonShaper
,ClassicButtonShaper
,DolphinButtonShaper
,FishButtonShaper
,FootButtonShaper
,IceCreamButtonShaper
,PillButtonShaper
,RaceCarButtonShaper
,RhinoButtonShaper
,StegosaurusButtonShaper
public interface RadianceButtonShaper extends RadianceTrait
Button shaper interface for Radiance look and feel. This class is part of officially supported API.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description javax.swing.border.Border
getButtonBorder(javax.swing.AbstractButton button)
Returns the border for the specified button.java.awt.Shape
getButtonOutline(javax.swing.AbstractButton button, float extraInsets, float width, float height, double scaleFactor, boolean isInner)
Returns the outline path for the specified button.java.awt.Dimension
getPreferredSize(javax.swing.AbstractButton button, java.awt.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.-
Methods inherited from interface org.pushingpixels.radiance.theming.api.trait.RadianceTrait
getDisplayName
-
-
-
-
Method Detail
-
getButtonOutline
java.awt.Shape getButtonOutline(javax.swing.AbstractButton button, float extraInsets, float width, float height, double scaleFactor, boolean isInner)
Returns the outline path for the specified button.- Parameters:
button
- A button.extraInsets
- Button insets.width
- Button width.height
- Button height.scaleFactor
- Scale factor.isInner
- Indication whether the returned outline is used for the inner contour.- Returns:
- The outline path for the specified button.
-
getButtonBorder
javax.swing.border.Border getButtonBorder(javax.swing.AbstractButton button)
Returns the border for the specified button.- Parameters:
button
- A button.- Returns:
- The border for the specified button.
-
getPreferredSize
java.awt.Dimension getPreferredSize(javax.swing.AbstractButton button, java.awt.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
ifthis
shaper should maintain button proportions on the resize,false
otherwise.
-
-