Logo Search packages:      
Sourcecode: libjgoodies-looks-java version File versions  Download package

static boolean com::jgoodies::looks::Options::getUseNarrowButtons (  )  [inline, static]

Checks and answers if we shall use narrow button margins of 4 pixels. As of the Looks version 1.4 the default value is true (narrow) for the JGoodies Windows L&F and the JGoodies Plastic L&F family. The native Windows L&F uses narrow margins too. The default can be disabled in the system properties or UIManager.

Note: Using narrow button margins can potentially cause compatibility issues, if you don't take care that command buttons with short labels (OK) get a reasonable minimum width. Therefore you can get back to wide button margins using setUseNarrowButtons. Sun's L&F implementations use a wider button margin of 14 pixels.

Narrow button margins make it easier to give buttons in a button bar the same width, even if some button labels are long. And narrow margins are useful for embedded command buttons that just have an icon, or an ellipsis (...). Many style guides recommend to use a minimum button width in command button bars, for example 50 dialog units on Windows. Such a minimum width makes it easier to click a button, just because the button area has a reasonable minimum size. To ensure a reasonable button minimum width, you may configure a LayoutManager, use a special panel for command button bars, or a factory that vends command button bars.

The JGoodies FormLayout can layout button bars that comply with both the MS Windows Layout Guidelines and the Mac Aqua Human Interface Guidelines. The JGoodies Forms contains a ButtonBarBuilder to build command button bars, and a ButtonBarFactory that vends frequently used button bars.

Returns:
true (default) if all buttons shall use narrow margins, false for wider margins
See also:
setUseNarrowButtons(boolean)

USE_NARROW_BUTTONS_KEY

Definition at line 513 of file Options.java.

References USE_NARROW_BUTTONS_SYSTEM_VALUE.

                                                {
        return USE_NARROW_BUTTONS_SYSTEM_VALUE != null
            ? USE_NARROW_BUTTONS_SYSTEM_VALUE.booleanValue()
            : !Boolean.FALSE.equals(UIManager.get(USE_NARROW_BUTTONS_KEY));
    }


Generated by  Doxygen 1.6.0   Back to index