|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jvnet.substance.button.BaseButtonShaper
org.jvnet.substance.button.ClassicButtonShaper
public class ClassicButtonShaper
Button shaper that returns rectangular buttons with slightly rounded corners (ala Windows XP). This class is part of officially supported API.
Constructor Summary | |
---|---|
ClassicButtonShaper()
|
Method Summary | |
---|---|
javax.swing.border.Border |
getButtonBorder(javax.swing.AbstractButton button)
Returns the border for the specified button. |
java.awt.geom.GeneralPath |
getButtonOutline(javax.swing.AbstractButton button,
java.awt.Insets insets,
int width,
int height)
Returns the outline path for the specified button. |
float |
getCornerRadius(javax.swing.AbstractButton button,
java.awt.Insets insets)
Returns the corner radius of the specified button. |
java.lang.String |
getDisplayName()
Returns the display name of this trait. |
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 class org.jvnet.substance.button.BaseButtonShaper |
---|
getBaseOutline, getBaseOutline, getBaseOutline, getBaseOutline, getButtonOutline, getButtonOutline, getTriangleButtonOutline, getTriangleButtonOutline |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ClassicButtonShaper()
Method Detail |
---|
public java.lang.String getDisplayName()
SubstanceTrait
this
trait. This method is
part of officially supported API.
getDisplayName
in interface SubstanceButtonShaper
getDisplayName
in interface SubstanceTrait
this
trait.public java.awt.geom.GeneralPath getButtonOutline(javax.swing.AbstractButton button, java.awt.Insets insets, int width, int height)
SubstanceButtonShaper
getButtonOutline
in interface SubstanceButtonShaper
button
- A button.insets
- Button insets.width
- Button width.height
- Button height.
public javax.swing.border.Border getButtonBorder(javax.swing.AbstractButton button)
SubstanceButtonShaper
getButtonBorder
in interface SubstanceButtonShaper
button
- A button.
public java.awt.Dimension getPreferredSize(javax.swing.AbstractButton button, java.awt.Dimension uiPreferredSize)
SubstanceButtonShaper
getPreferredSize
in interface SubstanceButtonShaper
button
- A button.uiPreferredSize
- Preferred size of the button under the regular conditions
(plain rectangular button).
public boolean isProportionate()
SubstanceButtonShaper
isProportionate
in interface SubstanceButtonShaper
true
if this
shaper should maintain
button proportions on the resize, false
otherwise.public float getCornerRadius(javax.swing.AbstractButton button, java.awt.Insets insets)
RectangularButtonShaper
getCornerRadius
in interface RectangularButtonShaper
button
- Button.insets
- Button insets.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |