/** * Constructs an empty ButtonBarBuilder2 on the given panel. * * @param panel the layout container */ public ButtonBarBuilder2(JPanel panel) { super(new FormLayout(COL_SPECS, ROW_SPECS), panel); leftToRight = LayoutStyle.getCurrent().isLeftToRightButtonOrder(); }
/** * Checks and answers whether Java runs on a Mac by requesting * the system property <em>os.name</em>. * * @return true on Mac, false on all other Platforms */ private static boolean isOSMac() { return getSystemProperty("os.name").startsWith("Mac"); }
/** * Computes and returns the initial <code>LayoutStyle</code>. * Checks the OS name and returns <code>MacLayoutStyle</code> * on Mac OS X and <code>WindowLayoutStyle</code> on all other platforms. * * @return MacLayoutStyle on Mac, WindowsLayoutStyle on all other platforms */ private static LayoutStyle initialLayoutStyle() { if (isOSMac()) return MacLayoutStyle.INSTANCE; return WindowsLayoutStyle.INSTANCE; }
"dialog-margin", new String[]{"dm", "dmargin"}, ColumnSpec.createGap(LayoutStyle.getCurrent().getDialogMarginX())); map.columnPut( "tabbed-dialog-margin", new String[]{"tdm", "tdmargin"}, ColumnSpec.createGap(LayoutStyle.getCurrent().getTabbedDialogMarginX())); map.columnPut( "glue", "dialog-margin", new String[]{"dm", "dmargin"}, RowSpec.createGap(LayoutStyle.getCurrent().getDialogMarginY())); map.rowPut( "tabbed-dialog-margin", new String[]{"tdm", "tdmargin"}, RowSpec.createGap(LayoutStyle.getCurrent().getTabbedDialogMarginY())); map.rowPut( "button",
"dialog-margin", new String[]{"dm", "dmargin"}, ColumnSpec.createGap(LayoutStyle.getCurrent().getDialogMarginX())); map.columnPut( "tabbed-dialog-margin", new String[]{"tdm", "tdmargin"}, ColumnSpec.createGap(LayoutStyle.getCurrent().getTabbedDialogMarginX())); map.columnPut( "glue", "dialog-margin", new String[]{"dm", "dmargin"}, RowSpec.createGap(LayoutStyle.getCurrent().getDialogMarginY())); map.rowPut( "tabbed-dialog-margin", new String[]{"tdm", "tdmargin"}, RowSpec.createGap(LayoutStyle.getCurrent().getTabbedDialogMarginY())); map.rowPut( "button",
/** * Constructs an instance of <code>ButtonBarBuilder</code> on the given * panel using a preconfigured FormLayout as layout manager. * * @param panel the layout container */ public ButtonBarBuilder(JPanel panel) { super(new FormLayout(COL_SPECS, ROW_SPECS), panel); leftToRight = LayoutStyle.getCurrent().isLeftToRightButtonOrder(); }
/** * Computes and returns the initial <code>LayoutStyle</code>. Checks the * OS name and returns <code>MacLayoutStyle</code> on Mac OS X and * <code>WindowLayoutStyle</code> on all other platforms. * * @return MacLayoutStyle on Mac, WindowsLayoutStyle on all other platforms */ private static LayoutStyle initialLayoutStyle() { if (isOSMac()) return MacLayoutStyle.INSTANCE; else return WindowsLayoutStyle.INSTANCE; }
/** * Checks and answers whether Java runs on a Mac by requesting the system * property <em>os.name</em>. * * @return true on Mac, false on all other Platforms */ private static boolean isOSMac() { return getSystemProperty("os.name").startsWith("Mac"); }
/** * Constructs an instance of <code>ButtonBarBuilder</code> on the given * panel using a preconfigured FormLayout as layout manager. * * @param panel * the layout container */ public ButtonBarBuilder(JPanel panel) { super(new FormLayout(COL_SPECS, ROW_SPECS), panel); leftToRight = LayoutStyle.getCurrent().isLeftToRightButtonOrder(); }
/** * Constructs an empty ButtonBarBuilder2 on the given panel. * * @param panel the layout container */ public ButtonBarBuilder2(JPanel panel) { super(new FormLayout(COL_SPECS, ROW_SPECS), panel); leftToRight = LayoutStyle.getCurrent().isLeftToRightButtonOrder(); setOpaque(false); }