コード例 #1
0
 public void applyChanges() {
   OntologyPreferences prefs = OntologyPreferences.getInstance();
   try {
     prefs.setBaseURI(new URI(textField.getText()));
     prefs.setIncludeYear(yearCheckBox.isSelected());
     prefs.setIncludeMonth(monthCheckBox.isSelected());
     prefs.setIncludeDay(dayCheckBox.isSelected());
   } catch (URISyntaxException e) {
     UIHelper uiHelper = new UIHelper(getOWLEditorKit());
     uiHelper.showOptionPane(
         "Error",
         "Couldn't set base URI: " + e.getMessage(),
         JOptionPane.OK_OPTION,
         JOptionPane.ERROR_MESSAGE);
   }
 }