/** * Set single selection content. When one shape is selected the id and name * are shown * * @param id the id to show * @param name the name to show */ private void setSingle(Shape shape) { if (!Arrays.asList(this.getComponents()).contains(idLabel)) { this.removeAll(); add(idLabel); add(idText); add(nameLabel); add(nameText); add(typeLabel); add(typeBox); this.repaint(); } idText.setText(new Long(shape.getId()).toString()); nameText.setText(shape.getName()); typeModel.setSelectedItem(shape.getImportType()); }
String valueString = shape.getValue() != null ? shape.getValue().toString() : "Unknown"; valueText.setText(valueString); typeModel.setSelectedItem(shape.getImportType()); shapeTypeModel.setSelectedItem(shape.getType());