/** * Clears the data to save. * * @see AnnotationUI#clearData() */ protected void clearData() { if (!init) { buildGUI(); init = true; } tagNames.clear(); existingTags.clear(); selectedValue = 0; if (!model.isMultiSelection()) selectedValue = model.getUserRating(); initialValue = 0; otherRating.setText(""); rating.removePropertyChangeListener(RatingComponent.RATE_PROPERTY, this); rating.setValue(selectedValue); rating.addPropertyChangeListener(RatingComponent.RATE_PROPERTY, this); publishedBox.setSelected(false); tagsPane.removeAll(); tagsDocList.clear(); DocComponent doc = new DocComponent(null, model); tagsDocList.add(doc); tagsPane.add(doc); docPane.removeAll(); filesDocList.clear(); doc = new DocComponent(null, model); filesDocList.add(doc); docPane.add(doc); tagFlag = false; docFlag = false; // double h = TableLayout.PREFERRED; // TableLayout layout = (TableLayout) content.getLayout(); // layout.setRow(tagRow, h); content.revalidate(); content.repaint(); revalidate(); repaint(); }