/** * Appends a glue column. * * @see #appendRelatedComponentsGapColumn() * @see #appendUnrelatedComponentsGapColumn() */ protected final void appendGlueColumn() { appendColumn(FormFactory.GLUE_COLSPEC); }
/** * Appends a glue row. * * @see #appendRelatedComponentsGapRow() * @see #appendUnrelatedComponentsGapRow() */ protected final void appendGlueRow() { appendRow(FormFactory.GLUE_ROWSPEC); }
/** * Moves to the next column. * * @param columns number of columns to move */ private void nextColumn(int columns) { currentCellConstraints.gridX += columns * getColumnIncrementSign(); }
/** * Sets the panel's border. * * @param border the border to set * * @see JComponent#setBorder(Border) */ public final void setBorder(Border border) { getPanel().setBorder(border); }
/** * Appends the given row specification to the builder's layout. * * @param rowSpec the row specification object to append */ protected final void appendRow(RowSpec rowSpec) { getLayout().appendRow(rowSpec); }
/** * Returns the panel used to build the form. * * @return the panel used by this builder to build the form */ public final JPanel getPanel() { return getContainer(); }
/** * Returns the sign (-1 or 1) used to increment the cursor's column * when moving to the next column. * * @return -1 for right-to-left, 1 for left-to-right */ private int getColumnIncrementSign() { return isLeftToRight() ? 1 : -1; }
/** * Moves to the next column, does the same as #nextColumn(1). */ protected final void nextColumn() { nextColumn(1); }
/** * Increases the row by one; does the same as #nextRow(1). */ protected final void nextRow() { nextRow(1); }
/** * Creates and returns a button that is bound to the given Action. * This is a hook that allows to return customized buttons. * For example, the JGoodies {@code JGButton} configures * the accessible name and accessible description from Actions * that provide these information.<p> * * This default implementation delegates the button creation to this * builder's component factory, if it is an an instance of ComponentFactory * (that provides {@link ComponentFactory2#createButton(Action)}). * Otherwise a JButton is created. * * @param action provides bound visual properties for the button * @return the created button * * @since 1.4 */ protected JButton createButton(Action action) { if (getComponentFactory() instanceof ComponentFactory2) { return ((ComponentFactory2) getComponentFactory()).createButton(action); } return new JButton(action); }
/** * Sets the panel's opaque state. * * @param b true for opaque, false for non-opaque * * @see JComponent#setOpaque(boolean) * * @since 1.1 */ public final void setOpaque(boolean b) { getPanel().setOpaque(b); }
/** * Appends the given column specification to the builder's layout. * * @param columnSpec the column specification object to append */ protected final void appendColumn(ColumnSpec columnSpec) { getLayout().appendColumn(columnSpec); }
/** * Returns the panel used to build the form. * * @return the panel used by this builder to build the form */ public final JPanel getPanel() { return (JPanel) getContainer(); }
/** * Returns the sign (-1 or 1) used to increment the cursor's column * when moving to the next column. * * @return -1 for right-to-left, 1 for left-to-right */ private int getColumnIncrementSign() { return isLeftToRight() ? 1 : -1; }
/** * Moves to the next column, does the same as #nextColumn(1). */ protected final void nextColumn() { nextColumn(1); }
/** * Increases the row by one; does the same as #nextRow(1). */ protected final void nextRow() { nextRow(1); }
/** * Sets the panel's border. * * @param border the border to set * * @see JComponent#setBorder(Border) */ public final void setBorder(Border border) { getPanel().setBorder(border); }
/** * Appends a row that is the default gap for unrelated components. * * @see #appendGlueRow() * @see #appendRelatedComponentsGapRow() */ protected final void appendUnrelatedComponentsGapRow() { appendRow(FormFactory.UNRELATED_GAP_ROWSPEC); }
/** * Appends a column that is the default gap for related components. * * @see #appendGlueColumn() * @see #appendUnrelatedComponentsGapColumn() */ protected final void appendRelatedComponentsGapColumn() { appendColumn(FormFactory.RELATED_GAP_COLSPEC); }
/** * Appends the given column specification to the builder's layout. * * @param columnSpec the column specification object to append */ protected final void appendColumn(ColumnSpec columnSpec) { getLayout().appendColumn(columnSpec); }