Exemple #1
0
  public CodeTab(TabPane pane, String className, String displayName) {
    this.className = className;
    this.setText(CLASS_PATH_SEPARATOR_PATTERN.matcher(displayName).replaceAll("."));

    pane.getTabs().add(this);

    FXMLLoader loader = new FXMLLoader(ClassLoader.getSystemResource("fxml/CodeTab.fxml"));
    loader.setResources(Main.getResourceBundle());
    loader.setRoot(this);
    loader.setController(this);

    try {
      loader.load();
    } catch (IOException e) {
      e.printStackTrace();
    }

    CODE_TABS.put(className, this);
    getTabPane().getSelectionModel().select(this);

    this.setOnClosed(event -> CODE_TABS.remove(this.getClassName()));
  }
Exemple #2
0
 /**
  * Gets the localised info label for this member type.
  *
  * @return The info label.
  */
 public String getInfoLabel() {
   return Main.getResourceBundle().getString(this.infoLabel);
 }
Exemple #3
0
 /**
  * Gets the localised identifier label for this member type.
  *
  * @return The identifier label.
  */
 public String getIdentifierLabel() {
   return Main.getResourceBundle().getString(this.identifierLabel);
 }