/** * ctor */ public FormSpecAdapter(ColumnSpec spec) { this(spec.toString()); }
public String toString() { return "EditColumnSpec column: " + m_col + " spec: " + m_columnspec.toString(); }
public void actionPerformed(ActionEvent evt) { GridComponent gc = getCurrentEditor().getSelectedComponent(); if (gc != null) { GridView view = gc.getParentView(); if (view != null) { int col = gc.getColumn(); // temporary dialog ColumnSpec oldspec = view.getFormLayout().getColumnSpec(col); String newspec = javax.swing.JOptionPane.showInputDialog(m_frame, I18N.getLocalizedMessage("Column Spec:"), oldspec.toString()); if (newspec != null) { EditColumnSpecCommand cmd = new EditColumnSpecCommand(view.getParentForm(), col, new ColumnSpec(newspec), oldspec); CommandUtils.invoke(cmd, getCurrentEditor()); } } } else { System.out.println("FormEditorFrameComponent.editColumnSpec selected comp is null"); } } }
add(calendarContainer); DefaultFormBuilder btnBuilder = new DefaultFormBuilder(new FormLayout(FormSpecs.GROWING_BUTTON_COLSPEC.toString(), "")); btnBuilder.getLayout().addGroupedColumn(btnBuilder.getColumnCount()); for(int i = 1; i< colCount; i++){
if (view != null) { ColumnSpec cspec = view.getColumnSpec(gc.getColumn()); 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()));