/** * The <code>WizardNewFileCreationPage</code> implementation of this <code>Listener</code> method * handles all events and enablements for controls on this page. Subclasses may extend. */ public void handleEvent(Event event) { Widget widget = event.widget; if (widget.equals(nameText)) { name = nameText.getText(); } else if (widget.equals(idText)) { paletteID = idText.getText(); } else if (widget.equals(editorText)) { editorID = editorText.getText(); } else if (widget.equals(priorityCombo)) { priority = ProviderPriority.parse(priorityCombo.getText()); } setPageComplete(validatePage()); }
private String serialize() { StringBuilder buf = new StringBuilder(); Widget sortedColumn = policy.getSortColumn(); for (int index : policy.getColumnOrder()) { Widget col = policy.getColumn(index); Column column = (Column) col.getData(Column.class.getName()); buf.append(column.getId()).append('='); Object option = col.getData(OPTIONS_KEY); if (option != null) buf.append(option).append('|'); if (col.equals(sortedColumn)) buf.append(policy.getSortDirection()).append('$'); buf.append(policy.getWidth(col)).append(';'); } return buf.toString(); }