org.jvnet.substance.shaper
Interface SubstanceButtonShaper

All Superinterfaces:
SubstanceTrait
All Known Implementing Classes:
BaseButtonShaper, ClassicButtonShaper, StandardButtonShaper

public interface SubstanceButtonShaper
extends SubstanceTrait

Button shaper interface for Substance look and feel. This class is part of officially supported API.

Author:
Kirill Grouchnikov

Method Summary
 javax.swing.border.Border getButtonBorder(javax.swing.AbstractButton button)
          Returns the border for the specified button.
 java.awt.Shape getButtonOutline(javax.swing.AbstractButton button)
          Deprecated. Will be removed in version 6.0. Use getButtonOutline(AbstractButton, Insets, int, int, boolean) instead.
 java.awt.Shape getButtonOutline(javax.swing.AbstractButton button, java.awt.Insets insets)
          Deprecated. Will be removed in version 6.0. Use getButtonOutline(AbstractButton, Insets, int, int, boolean) instead.
 java.awt.Shape getButtonOutline(javax.swing.AbstractButton button, java.awt.Insets insets, int width, int height)
          Deprecated. Will be removed in version 6.0. Use getButtonOutline(AbstractButton, Insets, int, int, boolean) instead.
 java.awt.Shape getButtonOutline(javax.swing.AbstractButton button, java.awt.Insets insets, int width, int height, boolean isInner)
          Returns the outline path for 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.
 

Method Detail

getDisplayName

java.lang.String getDisplayName()
Description copied from interface: SubstanceTrait
Returns the display name of this trait. This method is part of officially supported API.

Specified by:
getDisplayName in interface SubstanceTrait
Returns:
The display name of this trait.

getButtonOutline

@Deprecated
java.awt.Shape getButtonOutline(javax.swing.AbstractButton button)
Deprecated. Will be removed in version 6.0. Use getButtonOutline(AbstractButton, Insets, int, int, boolean) instead.

Returns the outline path for the specified control.

Parameters:
button - A button.
Returns:
The outline path for the specified control.

getButtonOutline

@Deprecated
java.awt.Shape getButtonOutline(javax.swing.AbstractButton button,
                                           java.awt.Insets insets,
                                           int width,
                                           int height)
Deprecated. Will be removed in version 6.0. Use getButtonOutline(AbstractButton, Insets, int, int, boolean) instead.

Returns the outline path for the specified button.

Parameters:
button - A button.
insets - Button insets.
width - Button width.
height - Button height.
Returns:
The outline path for the specified button.

getButtonOutline

java.awt.Shape getButtonOutline(javax.swing.AbstractButton button,
                                java.awt.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.

getButtonOutline

@Deprecated
java.awt.Shape getButtonOutline(javax.swing.AbstractButton button,
                                           java.awt.Insets insets)
Deprecated. Will be removed in version 6.0. Use getButtonOutline(AbstractButton, Insets, int, int, boolean) instead.

Returns the outline path for the specified button.

Parameters:
button - A button.
insets - Button insets.
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 if this shaper should maintain button proportions on the resize, false otherwise.