private void rcRefreshAbstractsJList() { this.abstractsJList.setSelectedIndex(-1); this.abstractsListModel.removeAllElements(); for (RcAbstractMetadata rcAbstractMd : this.rcCollectionMetadata.getAbstracts()) { this.abstractsListModel.addElement(rcAbstractMd); } if (this.abstractsJList.getModel().getSize() > 0) { this.abstractsJList.setSelectedIndex(0); } this.rcRefreshAbstractsJPanelState(); }
/** * Remove a collection abstract. */ private void removeAbstract() { if (this.abstractsJList.getSelectedValue() == null) { return; } RcAbstractMetadata rcAbstractMd = (RcAbstractMetadata) this.abstractsJList.getSelectedValue(); int response = RcJOptionPane.showConfirmDialog(this.getWindow(), "Are you sure you want to remove the selected abstract?", "Confirm Abstract Removal", JOptionPane.YES_NO_OPTION); if (response == JOptionPane.YES_OPTION) { this.getCollectionMetadata().getAbstracts().remove(rcAbstractMd); this.rcRefreshAbstractsJList(); this.setChanged(); } }
subCollection.put("@type", "sc:Collection"); subCollection.put("label", rcSubCollMd.getTitle()); subCollection.put("description", this.getDescriptions(rcSubCollMd.getAbstracts()));
collection.put("@type", "sc:Collection"); collection.put("label", rcCollMd.getTitle()); collection.put("description", this.getDescriptions(rcCollMd.getAbstracts())); subCollection.put("@type", "sc:Collection"); subCollection.put("label", rcSubCollMd.getTitle()); subCollection.put("description", this.getDescriptions(rcSubCollMd.getAbstracts()));
/** * Add a collection abstract */ private void addAbstract() { RcAbstractMetadata rcAbstractMd = new RcAbstractMetadata(this.getCollectionMetadata()); RcAbstractMetadataJDialog d = new RcAbstractMetadataJDialog(this.getWindow(), "Add Abstract", rcAbstractMd); d.setVisible(true); if (!d.getCanceled()) { this.getCollectionMetadata().getAbstracts().add(rcAbstractMd); this.rcRefreshAbstractsJList(); this.abstractsJList.setSelectedValue(rcAbstractMd, true); this.setChanged(); } }