Substance client properties

View all API methods.

View all client properties.

Client property name



Client property name for ignoring default (minimum) dimension for a single button. This property can be set either as a client property on a specific button or as a global setting on UIManager. The value should be either Boolean.TRUE or Boolean.FALSE.

Note that SubstanceButtonShaper implementations are not required to respect this property. The current implementations of the default StandardButtonShaper and ClassicButtonShaper respect this property.

See also

Sample code

import java.awt.FlowLayout;

import javax.swing.*;

import org.pushingpixels.substance.api.SubstanceLookAndFeel;

 * Test application that shows the use of the
 {@link SubstanceLookAndFeel#BUTTON_NO_MIN_SIZE_PROPERTY} client property.
 @author Kirill Grouchnikov
 @see SubstanceLookAndFeel#BUTTON_NO_MIN_SIZE_PROPERTY
public class ButtonNoMinSizeProperty extends JFrame {
   * Creates the main frame for <code>this</code> sample.
  public ButtonNoMinSizeProperty() {
    super("Middle button has no min size");

    this.setLayout(new FlowLayout());

    JButton buttonA = new JButton("a");
    JButton buttonB = new JButton("b");
    // mark button to have no default minimum size
        SubstanceLookAndFeel.BUTTON_NO_MIN_SIZE_PROPERTY, Boolean.TRUE);
    JButton buttonC = new JButton("c");



   * The main method for <code>this</code> sample. The arguments are ignored.
   @param args
   *            Ignored.
  public static void main(String[] args) {
    SwingUtilities.invokeLater(new Runnable() {
      public void run() {
        SubstanceLookAndFeel.setSkin(new BusinessBlackSteelSkin());
        new ButtonNoMinSizeProperty().setVisible(true);

The screenshot below shows the application frame. The second button has this property set to Boolean.TRUE.