01: package org.pietschy.wizard;
02:
03: import javax.swing.*;
04:
05: /**
06: *
07: */
08: class Options {
09:
10: private static Boolean includingIconsOnNextAndPrevious;
11:
12: /**
13: * Checks if icons should be included on the next and previous buttons, by default this returns
14: * false if running on the mac (to make the buttons look consistent).
15: *
16: * @return <code>true</code> to include next and previous icons, <code>false</code> otherwise.
17: */
18: public static boolean isIncludingIconsOnNextAndPrevious() {
19: if (includingIconsOnNextAndPrevious == null) {
20: // we just check if we're running with the aqua laf.
21: return !UIManager.getLookAndFeel().getClass().getName()
22: .startsWith("apple.");
23: }
24:
25: return includingIconsOnNextAndPrevious.booleanValue();
26: }
27:
28: public static void setIncludingIconsOnNextAndPrevious(
29: boolean includingIconsOnNextAndPrevious) {
30: Options.includingIconsOnNextAndPrevious = Boolean
31: .valueOf(includingIconsOnNextAndPrevious);
32: }
33:
34: }
|