/** * Adds a component to the panel using the default constraints with * the given columnSpan. Proceeds to the next data column. * * @param component the component to append * @param columnSpan the column span used to add */ public void append(Component component, int columnSpan) { ensureCursorColumnInGrid(); ensureHasGapRow(lineGapSpec); ensureHasComponentLine(); add(component, createLeftAdjustedConstraints(columnSpan)); nextColumn(columnSpan + 1); }
/** * Adds a component to the panel using the default constraints with * the given columnSpan. Proceeds to the next data column. * * @param component the component to append * @param columnSpan the column span used to add */ public void append(Component component, int columnSpan) { ensureCursorColumnInGrid(); ensureHasGapRow(lineGapSpec); ensureHasComponentLine(); add(component, createLeftAdjustedConstraints(columnSpan)); nextColumn(columnSpan + 1); }
builder.nextColumn(2); builder.nextColumn(2); builder.add(mButton); mButton.setToolTipText(tooltip);
/** * Adds a component to the panel using the default constraints with the * given columnSpan. Proceeds to the next data column. * * @param component * the component to append * @param columnSpan * the column span used to add */ public void append(Component component, int columnSpan) { ensureCursorColumnInGrid(); ensureHasGapRow(lineGapSpec); ensureHasComponentLine(); add(component, createLeftAdjustedConstraints(columnSpan)); nextColumn(columnSpan + 1); }
/** * Adds a separator with the given text that spans all columns. * * @param text the separator title text * @return the added titled separator */ public JComponent appendSeparator(String text) { ensureCursorColumnInGrid(); ensureHasGapRow(paragraphGapSpec); ensureHasComponentLine(); setColumn(super.getLeadingColumn()); int columnSpan = getColumnCount(); setColumnSpan(getColumnCount()); JComponent titledSeparator = addSeparator(text); setColumnSpan(1); nextColumn(columnSpan); return titledSeparator; }
/** * Adds a separator with the given text that spans all columns. * * @param text the separator title text * @return the added titled separator */ public JComponent appendSeparator(String text) { ensureCursorColumnInGrid(); ensureHasGapRow(paragraphGapSpec); ensureHasComponentLine(); setColumn(super.getLeadingColumn()); int columnSpan = getColumnCount(); setColumnSpan(getColumnCount()); JComponent titledSeparator = addSeparator(text); setColumnSpan(1); nextColumn(columnSpan); return titledSeparator; }
/** * Adds a separator with the given text that spans all columns. * * @param text * the separator title text * @return the added titled separator */ public JComponent appendSeparator(String text) { ensureCursorColumnInGrid(); ensureHasGapRow(paragraphGapSpec); ensureHasComponentLine(); setColumn(super.getLeadingColumn()); int columnSpan = getColumnCount(); setColumnSpan(getColumnCount()); JComponent titledSeparator = addSeparator(text); setColumnSpan(1); nextColumn(columnSpan); return titledSeparator; }