/** * Parses and splits encoded row specifications using the default * {@link LayoutMap} and returns an array of RowSpec objects. * * @param encodedRowSpecs comma separated encoded row specifications * @return an array of decoded row specifications * @throws NullPointerException if {@code encodedRowSpecs} is {@code null} * * @see #decodeSpecs(String, LayoutMap) * @see #decode(String) * @see LayoutMap#getRoot() */ public static RowSpec[] decodeSpecs(String encodedRowSpecs) { return decodeSpecs(encodedRowSpecs, LayoutMap.getRoot()); }
/** * Parses and splits encoded row specifications using the default * {@link LayoutMap} and returns an array of RowSpec objects. * * @param encodedRowSpecs comma separated encoded row specifications * @return an array of decoded row specifications * @throws NullPointerException if {@code encodedRowSpecs} is {@code null} * * @see #decodeSpecs(String, LayoutMap) * @see #decode(String) * @see LayoutMap#getRoot() */ public static RowSpec[] decodeSpecs(String encodedRowSpecs) { return decodeSpecs(encodedRowSpecs, LayoutMap.getRoot()); }
/** * Constructs an instance of <code>FormLayout</code> using the given * encoded string representations for column and row specifications. * <p> * * See the class comment for examples. * * @param encodedColumnSpecs * comma separated encoded column specifications * @param encodedRowSpecs * comma separated encoded row specifications * @throws NullPointerException * if encodedColumnSpecs or encodedRowSpecs is null */ public FormLayout(String encodedColumnSpecs, String encodedRowSpecs) { this(ColumnSpec.decodeSpecs(encodedColumnSpecs), RowSpec.decodeSpecs(encodedRowSpecs)); }
LayoutMap layoutMap) { this(ColumnSpec.decodeSpecs(encodedColumnSpecs, layoutMap), RowSpec. decodeSpecs(encodedRowSpecs, layoutMap));
LayoutMap layoutMap) { this(ColumnSpec.decodeSpecs(encodedColumnSpecs, layoutMap), RowSpec. decodeSpecs(encodedRowSpecs, layoutMap));
/** * Construct a format using the specifications and constraints specified. */ protected AbstractFormat(String rowSpecs, String columnSpecs, String gapRow, String gapColumn, CellConstraints[] cellConstraints) { this(RowSpec.decodeSpecs(rowSpecs), ColumnSpec.decodeSpecs(columnSpecs), new RowSpec(gapRow), new ColumnSpec(gapColumn), cellConstraints); }
/** * Set the rows and columns used for a single element cell. */ public void setElementCells(String rowSpecs, String columnSpecs) { this.setElementRows(RowSpec.decodeSpecs(rowSpecs)); this.setElementColumns(ColumnSpec.decodeSpecs(columnSpecs)); }
/** * Set the rows and columns used for a single element cell. */ public void setElementCells(String rowSpecs, String columnSpecs) { this.setElementRows(RowSpec.decodeSpecs(rowSpecs)); this.setElementColumns(ColumnSpec.decodeSpecs(columnSpecs)); }
/** * Set the rows and columns used for a single element cell. */ public void setElementCells(String rowSpecs, String columnSpecs) { this.setElementRows(RowSpec.decodeSpecs(rowSpecs)); this.setElementColumns(ColumnSpec.decodeSpecs(columnSpecs)); }
/** * Construct a format using the specifications and constraints specified. */ protected AbstractFormat(String rowSpecs, String columnSpecs, String gapRow, String gapColumn, CellConstraints[] cellConstraints) { this(RowSpec.decodeSpecs(rowSpecs), ColumnSpec.decodeSpecs(columnSpecs), new RowSpec(gapRow), new ColumnSpec(gapColumn), cellConstraints); }
/** * Construct a format using the specifications and constraints specified. */ protected AbstractFormat(String rowSpecs, String columnSpecs, String gapRow, String gapColumn, CellConstraints[] cellConstraints) { this(RowSpec.decodeSpecs(rowSpecs), ColumnSpec.decodeSpecs(columnSpecs), new RowSpec(gapRow), new ColumnSpec(gapColumn), cellConstraints); }
/** * Construct a format using the specifications and constraints specified. */ protected AbstractFormat(String rowSpecs, String columnSpecs, String gapRow, String gapColumn, String[] cellConstraints) { this(RowSpec.decodeSpecs(rowSpecs), ColumnSpec.decodeSpecs(columnSpecs), gapRow == null ? null : new RowSpec(gapRow), gapColumn == null ? null : new ColumnSpec(gapColumn), decode(cellConstraints)); }
FormFactory.BUTTON_COLSPEC }, RowSpec.decodeSpecs("pref")));
/** * Construct a format using the specifications and constraints specified. */ protected AbstractFormat(String rowSpecs, String columnSpecs, String gapRow, String gapColumn, String[] cellConstraints) { this(RowSpec.decodeSpecs(rowSpecs), ColumnSpec.decodeSpecs(columnSpecs), gapRow == null ? null : new RowSpec(gapRow), gapColumn == null ? null : new ColumnSpec(gapColumn), decode(cellConstraints)); }
/** * Construct a format using the specifications and constraints specified. */ protected AbstractFormat(String rowSpecs, String columnSpecs, String gapRow, String gapColumn, String[] cellConstraints) { this(RowSpec.decodeSpecs(rowSpecs), ColumnSpec.decodeSpecs(columnSpecs), gapRow == null ? null : new RowSpec(gapRow), gapColumn == null ? null : new ColumnSpec(gapColumn), decode(cellConstraints)); }
FormFactory.BUTTON_COLSPEC }, RowSpec.decodeSpecs("pref")));
FormFactory.BUTTON_COLSPEC }, RowSpec.decodeSpecs("pref")));
protected PanelBuilder createPanelBuilder() { labelCase = Application.getWidgetFactory().createUndoableComboBox(); labelCase.setRenderer(new LabelCapsRenderer()); labelCase.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent event) { String value = labelCase.getModel().getSelectedItem().toString(); setQueryProperty(ProcedureQuery.COLUMN_NAME_CAPITALIZATION_PROPERTY, value); } }); PanelBuilder builder = super.createPanelBuilder(); RowSpec[] extraRows = RowSpec.decodeSpecs("3dlu, p"); for (RowSpec extraRow : extraRows) { builder.appendRow(extraRow); } CellConstraints cc = new CellConstraints(); builder.addLabel("Row Label Case:", cc.xy(1, 17)); builder.add(labelCase, cc.xywh(3, 17, 5, 1)); return builder; }
protected PanelBuilder createPanelBuilder() { labelCase = Application.getWidgetFactory().createUndoableComboBox(); labelCase.setRenderer(new LabelCapsRenderer()); labelCase.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent event) { CapsStrategy value = (CapsStrategy) labelCase.getModel().getSelectedItem(); setQueryProperty(SQLTemplate.COLUMN_NAME_CAPITALIZATION_PROPERTY, value.name()); } }); PanelBuilder builder = super.createPanelBuilder(); RowSpec[] extraRows = RowSpec.decodeSpecs("3dlu, p"); for (RowSpec extraRow : extraRows) { builder.appendRow(extraRow); } CellConstraints cc = new CellConstraints(); builder.addLabel("Row Label Case:", cc.xy(1, 17)); builder.add(labelCase, cc.xywh(3, 17, 5, 1)); return builder; }
public void reconstructFiltersPanel() { for (JComponent component : components) { component.removeKeyListener(filterKeyListener); } this.removeAll(); if (filterModel != null) { List<ColumnSpec> columnSpecs = new ArrayList<ColumnSpec>(); for (int i = 0; i < filterModel.getFilterCount(); i++) { columnSpecs.add(new ColumnSpec("3dlu")); //$NON-NLS-1$ columnSpecs.add(new ColumnSpec("left:p")); //$NON-NLS-1$ } columnSpecs.add(new ColumnSpec("3dlu")); //$NON-NLS-1$ FormLayout layout = new FormLayout(columnSpecs.toArray(new ColumnSpec[columnSpecs.size()]), RowSpec.decodeSpecs("3dlu,pref,3dlu,pref,3dlu")); //$NON-NLS-1$ PanelBuilder builder = new PanelBuilder(layout); CellConstraints cc = new CellConstraints(); int x; for (int i = 0; i < filterModel.getFilterCount(); i++) { SearchFilter searchFilter = filterModel.getFilter(i); JComponent component = searchFilter.getComponent(); component.addKeyListener(filterKeyListener); components.add(component); x = (i + 1) * 2; builder.addLabel(searchFilter.getName(), cc.xy(x, 2)); builder.add(component, cc.xy(x, 4)); } this.add(new IconFeedbackComponentValidationResultPanel(validationResultModel, builder.getPanel()), BorderLayout.CENTER); } }