public void addToParent(Container pParent) { JPanel panel = (JPanel)pParent; DefaultFormBuilder builder= (DefaultFormBuilder)panel.getClientProperty(SwingXMLBuilder.FORMBUILDER_PROPERTY); builder.appendRow(mRowSpec); } }
@Override protected final JComponent buildEditorPanel() { FormLayout layout = new FormLayout("FILL:250DLU:GROW(1.0)", //$NON-NLS-1$ ""); //$NON-NLS-1$ DefaultFormBuilder builder = new DefaultFormBuilder(layout); builder.append(ToolBarFactory.buildToolBar(addAction, cloneAction, null, editAction, deleteAction), builder.getColumnCount()); builder.appendRow(builder.getLineGapSpec()); builder.nextLine(2); builder.appendRow("FILL:80DLU:GROW(1.0)"); builder.append(new JSyScrollPane(table), builder.getColumnCount()); return builder.getPanel(); }
/** * Ensures that the form has a component row. Adds a component row if the * cursor is beyond the form's bottom. */ private void ensureHasComponentLine() { if (getRow() <= getRowCount()) return; appendRow(FormFactory.PREF_ROWSPEC); if (isRowGroupingEnabled()) { getLayout().addGroupedRow(getRow()); } }
formBuilder.appendLineGapRow(); formBuilder.nextLine(); formBuilder.appendRow(FormSpecs.PREF_ROWSPEC); formBuilder.setColumn(1); formBuilder.append(mEditEdgeColorsBtn, 7);
/** * Ensures that the form has a component row. Adds a component row * if the cursor is beyond the form's bottom. */ private void ensureHasComponentLine() { if (getRow() <= getRowCount()) return; appendRow(getDefaultRowSpec()); if (isRowGroupingEnabled()) { getLayout().addGroupedRow(getRow()); } }
/** * Ensures that the form has a component row. Adds a component row * if the cursor is beyond the form's bottom. */ private void ensureHasComponentLine() { if (getRow() <= getRowCount()) { return; } appendRow(getDefaultRowSpec()); if (isRowGroupingEnabled()) { getLayout().addGroupedRow(getRow()); } }
builder.appendRow(KeyProperty.rowSpec); builder.nextLine(2);
/** * Ensures that we have a gap row before the next component row. Checks if * the current row is the given <code>RowSpec</code> and appends this row * spec if necessary. * * @param gapRowSpec * the row specification to check for */ private void ensureHasGapRow(RowSpec gapRowSpec) { if ((getRow() == 1) || (getRow() <= getRowCount())) return; if (getRow() <= getRowCount()) { RowSpec rowSpec = getCursorRowSpec(); if ((rowSpec == gapRowSpec)) return; } appendRow(gapRowSpec); nextLine(); }
/** * Ensures that we have a gap row before the next component row. * Checks if the current row is the given <code>RowSpec</code> * and appends this row spec if necessary. * * @param gapRowSpec the row specification to check for */ private void ensureHasGapRow(RowSpec gapRowSpec) { if ((getRow() == 1) || (getRow() <= getRowCount())) return; if (getRow() <= getRowCount()) { RowSpec rowSpec = getCursorRowSpec(); if ((rowSpec == gapRowSpec)) return; } appendRow(gapRowSpec); nextLine(); }
/** * Ensures that we have a gap row before the next component row. * Checks if the current row is the given {@code RowSpec} * and appends this row spec if necessary. * * @param gapRowSpec the row specification to check for */ private void ensureHasGapRow(RowSpec gapRowSpec) { if (getRow() == 1 || getRow() <= getRowCount()) { return; } if (getRow() <= getRowCount()) { RowSpec rowSpec = getCursorRowSpec(); if (rowSpec == gapRowSpec) { return; } } appendRow(gapRowSpec); nextLine(); }
JProgressBar progressBar = new JProgressBar(0,100); builder.appendRow("pref"); builder.nextRow(); builder.add(progressBar, cc.xyw(1, builder.getRow(), 3));