private JPanel createEntityLabelPanel() { final Class<? extends LabelDescriptor> labelDescrCls = EntityCreationPreferences.getLabelDescriptorClass(); JPanel panel = new JPanel(); panel.setBorder(new TitledBorder("Entity Label (for use with Auto-generated ID)")); panel.setLayout(new GridBagLayout()); GridBagConstraints c = new GridBagConstraints(); c.gridx = 0; c.gridy = 0; c.gridwidth = 2; c.gridheight = 1; c.fill = GridBagConstraints.NONE; c.anchor = GridBagConstraints.FIRST_LINE_START; c.insets = new Insets(0, 12, 0, 0); /*sameAsRendererLabelButton = new JRadioButton("Same as label renderer (currently " + new SimpleIRIShortFormProvider().getShortForm(getFirstRendererLabel()) + ")");*/ sameAsRendererLabelButton = new JRadioButton("Same as label renderer"); sameAsRendererLabelButton.setSelected(labelDescrCls.equals(MatchRendererLabelDescriptor.class)); panel.add(sameAsRendererLabelButton, c); c.gridy = 1; customLabelButton = new JRadioButton("Custom label"); customLabelButton.setSelected(labelDescrCls.equals(CustomLabelDescriptor.class)); panel.add(customLabelButton, c); ButtonGroup group = new ButtonGroup(); group.add(sameAsRendererLabelButton); group.add(customLabelButton); c.gridy = 2; c.gridwidth = 1; c.insets = new Insets(5, 30, 0, 5); iriLabel = new JLabel("IRI"); panel.add(iriLabel, c); c.gridx = 1; c.fill = GridBagConstraints.HORIZONTAL; c.insets = new Insets(5, 0, 0, 0); c.weightx = 1.0; annotationIriLabel = new JTextField(); labelAnnotation = EntityCreationPreferences.getNameLabelIRI(); if (labelAnnotation == null) { labelAnnotation = OWLRDFVocabulary.RDFS_LABEL.getIRI(); } annotationIriLabel.setText(labelAnnotation.toString()); annotationIriLabel.setEditable(false); panel.add(annotationIriLabel, c); c.gridx = 2; c.fill = GridBagConstraints.NONE; c.insets = new Insets(5, 5, 0, 12); c.weightx = 0; annotationSelectButton = new JButton( new AbstractAction("...") { private static final long serialVersionUID = 7759812643136092837L; public void actionPerformed(ActionEvent event) { handleSelectAnnotation(); } }); panel.add(annotationSelectButton, c); c.gridx = 0; c.gridy = 3; c.insets = new Insets(5, 30, 12, 5); langLabel = new JLabel("Lang"); panel.add(langLabel, c); c.gridx = 1; c.insets = new Insets(5, 0, 12, 0); c.weighty = 1.0; annotationLangSelector = new UIHelper(getOWLEditorKit()).getLanguageSelector(); annotationLangSelector.setSelectedItem(EntityCreationPreferences.getNameLabelLang()); panel.add(annotationLangSelector, c); return panel; }