Class BasePolygonShaper
- java.lang.Object
-
- org.pushingpixels.radiance.theming.extras.api.shaperpack.BasePolygonShaper
-
- All Implemented Interfaces:
RadianceButtonShaper,RadianceTrait
- Direct Known Subclasses:
ButterflyButtonShaper,DolphinButtonShaper,FishButtonShaper,FootButtonShaper,IceCreamButtonShaper,RaceCarButtonShaper,RhinoButtonShaper,StegosaurusButtonShaper
public abstract class BasePolygonShaper extends java.lang.Object implements RadianceButtonShaper
-
-
Field Summary
Fields Modifier and Type Field Description private doublebottomCoefprivate CanonicalPathcanonicalPathprivate doubleleftCoefprivate doublerightCoefprivate doubletopCoef
-
Constructor Summary
Constructors Constructor Description BasePolygonShaper(java.lang.String resourceName, double topCoef, double leftCoef, double bottomCoef, double rightCoef)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.swing.border.BordergetButtonBorder(java.awt.Dimension preferredSize)javax.swing.border.BordergetButtonBorder(javax.swing.AbstractButton button)Returns the border for the specified button.java.awt.ShapegetButtonOutline(javax.swing.AbstractButton button, float extraInsets, float width, float height, double scaleFactor, boolean isInner)Returns the outline path for the specified button.java.awt.DimensiongetPreferredSize(javax.swing.AbstractButton button, java.awt.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.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.pushingpixels.radiance.theming.api.trait.RadianceTrait
getDisplayName
-
-
-
-
Field Detail
-
canonicalPath
private CanonicalPath canonicalPath
-
topCoef
private double topCoef
-
leftCoef
private double leftCoef
-
bottomCoef
private double bottomCoef
-
rightCoef
private double rightCoef
-
-
Method Detail
-
getPreferredSize
public java.awt.Dimension getPreferredSize(javax.swing.AbstractButton button, java.awt.Dimension uiPreferredSize)Description copied from interface:RadianceButtonShaperReturns the preferred size for the specified button.- Specified by:
getPreferredSizein interfaceRadianceButtonShaper- 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.
-
getButtonBorder
public javax.swing.border.Border getButtonBorder(javax.swing.AbstractButton button)
Description copied from interface:RadianceButtonShaperReturns the border for the specified button.- Specified by:
getButtonBorderin interfaceRadianceButtonShaper- Parameters:
button- A button.- Returns:
- The border for the specified button.
-
getButtonBorder
public javax.swing.border.Border getButtonBorder(java.awt.Dimension preferredSize)
-
getButtonOutline
public java.awt.Shape getButtonOutline(javax.swing.AbstractButton button, float extraInsets, float width, float height, double scaleFactor, boolean isInner)Description copied from interface:RadianceButtonShaperReturns the outline path for the specified button.- Specified by:
getButtonOutlinein interfaceRadianceButtonShaper- 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 outline.- Returns:
- The outline path for the specified button.
-
isProportionate
public boolean isProportionate()
Description copied from interface:RadianceButtonShaperReturns 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).- Specified by:
isProportionatein interfaceRadianceButtonShaper- Returns:
trueifthisshaper should maintain button proportions on the resize,falseotherwise.
-
-