/** * ctor */ public FormSpecAdapter(RowSpec spec) { this(spec.toString()); }
public String toString() { return "EditRowSpec row: " + m_row + " spec: " + m_rowspec.toString(); }
/** * Return a encoded string of all row specs for this view. Each orow spec is * separated by a comma. * * @return the encoded RowSpecs for all rows in the view */ public String getRowSpecs() { StringBuffer sbuff = new StringBuffer(); for (int row = 1; row <= getRowCount(); row++) { RowSpec rs = getRowSpec(row); if (row > 1) sbuff.append(","); String rowspec = rs.toString(); sbuff.append(FormSpecAdapter.fixup(rowspec)); } return sbuff.toString(); }
public void actionPerformed(ActionEvent evt) { GridComponent gc = getCurrentEditor().getSelectedComponent(); if (gc != null) { GridView view = gc.getParentView(); if (view != null) { int row = gc.getRow(); // temporary dialog RowSpec oldspec = view.getFormLayout().getRowSpec(row); String newspec = javax.swing.JOptionPane.showInputDialog(m_frame, I18N.getLocalizedMessage("Row Spec:"), oldspec.toString()); if (newspec != null) { EditRowSpecCommand cmd = new EditRowSpecCommand(view.getParentForm(), row, new RowSpec(newspec), oldspec); CommandUtils.invoke(cmd, getCurrentEditor()); } } } } }
m_colcell.setText(I18N.format("column_spec_2", new Integer(gc.getColumn()), cspec.toString())); RowSpec rspec = view.getRowSpec(gc.getRow()); m_rowcell.setText(I18N.format("row_spec_2", new Integer(gc.getRow()), rspec.toString()));