protected void addIdentifierActionPerformed( DomainSortableTable identifierTable, ResourcesComponents model) { ArchDescComponentIdentifiers newArchDescComponentIdentifier; DomainEditor dialog = new DomainEditor( ArchDescComponentIdentifiers.class, editorField.getParentEditor(), "Add Identifier", new ArchDescComponentIdentifiersFields()); dialog.setNavigationButtonListeners((ActionListener) editorField.getParentEditor()); dialog.setNewRecord(true); boolean done = false; int returnStatus; while (!done) { newArchDescComponentIdentifier = new ArchDescComponentIdentifiers(model); dialog.setModel(newArchDescComponentIdentifier, null); returnStatus = dialog.showDialog(); if (returnStatus == JOptionPane.OK_OPTION) { model.addArchDescComponentIdentifier(newArchDescComponentIdentifier); identifierTable.updateCollection(model.getArchDescComponentIdentifiers()); done = true; } else if (returnStatus == StandardEditor.OK_AND_ANOTHER_OPTION) { model.addArchDescComponentIdentifier(newArchDescComponentIdentifier); identifierTable.updateCollection(model.getArchDescComponentIdentifiers()); } else { done = true; } } }
public void setModel(ResourcesComponents resourcesModel) { this.resourceComponentModel = resourcesModel; dateTable.updateCollection(this.resourceComponentModel.getArchDescriptionDates()); physicalDescriptionsTable.updateCollection( this.resourceComponentModel.getPhysicalDesctiptions()); instancesTable.updateCollection(this.resourceComponentModel.getInstances()); }