Ist es möglich, eine JAR-Datei mit einem benutzerdefinierten JavaFX-Steuerelement in Scene Builder zu importieren?

Ich habe an einer Bühne gearbeitet, als ich bemerkte, dass ich dreimal genau dasselbe hatte. Stattdessen (da ich das hasse) habe ich beschlossen, das, was ich hatte, dreimal zu nehmen und es in eine benutzerdefinierte Komponente umzuwandeln.

Nun weiß ich, dass ich es in Code einfügen kann, aber ich kann das Layoutverhalten nicht vorhersagen (zwei davon werden direkt in Registerkarten und die dritte in ein Rasterfeld verschoben).

Ich habe versucht, die .jar-Datei, die das Steuerelement enthält, in Scene Builder zu importieren. Es öffnete sich ein Dialog, in dem ich gefragt wurde, was ich in die JAR-Datei importieren wollte, die jedoch vollständig leer war.

Ich habe zuvor gesehen, dass einige Personen "benutzerdefinierte Steuerelemente" hinzugefügt haben (ein Begriff, den ich nur lose verwende), um herauszufinden, dass im Grunde genommen nur eine Reihe von Komponenten zusammengefügt werden, um das Steuerelement zu bilden. Das mag für manche Leute funktionieren, aber das suche ich nicht. Zu kläre

was ich will (sollte ich in den FXML-Code schauen):

<DGCSDefiner //other layout related XML code/>

was ich NICHT will:

<GridPane //bla bla XML layout code>
    <columnConstraints>
      //bla bla column constraint stuff
    </columnConstraints>
    //etc, etc
</GridPane>

Ist das möglich? Ich komme wieder von C # und VS2010 und bin ein bisschen verwöhnt, wenn es um benutzerdefinierte Steuerelemente geht. Wenn es also überhaupt möglich ist, dass so etwas passiert, kann mir jemand sagen, wie?

Ist es möglich, eine kompilierte JAR-Datei mit einem benutzerdefinierten JavaFX-Steuerelement in Scene Builder zu importieren, sodass das Ablegen aus der Bibliothek zu dem führt, was ich dort oben beschrieben habe?

EDIT 1 Okay, das habe ich in meiner FXML-Datei. Laut mlody991 benötige ich 3 Dateien, damit dies funktioniert: Die FXML-Datei (Built with SceneBuilder):

<?xml version="1.0" encoding="UTF-8"?>

<?import java.lang.*?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<?import javafx.scene.text.*?>

<fx:root alignment="CENTER" hgap="5.0" styleClass="root" stylesheets="@DGCSDefiner.css" type="GridPane" vgap="5.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="DGCSDefiner.DGCSDefinerController">
   <children>
      <ComboBox fx:id="cbxColorStyle" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" prefWidth="150.0" promptText="Select Background Color Style" />
      <ColorPicker fx:id="cpSolidColor" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" prefHeight="32.0" prefWidth="283.0" visible="false" GridPane.rowIndex="1" />
      <StackPane fx:id="spSettings" styleClass="Group" GridPane.rowIndex="2" GridPane.vgrow="NEVER">
         <children>
            <GridPane fx:id="gpLinearSettings" hgap="5.0" styleClass="Group" vgap="20.0" visible="false">
               <children>
                  <Label text="Angle" GridPane.halignment="RIGHT" GridPane.valignment="CENTER">
                     <font>
                        <Font name="Arial" size="12.0" />
                     </font>
                  </Label>
                  <ComboBox fx:id="cbxLinearAngle" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" prefWidth="150.0" GridPane.columnIndex="1" GridPane.halignment="CENTER" GridPane.valignment="CENTER" />
                  <Label text="1st Color" GridPane.halignment="RIGHT" GridPane.rowIndex="1" />
                  <ColorPicker fx:id="cpFirstLinearColor" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" GridPane.columnIndex="1" GridPane.halignment="CENTER" GridPane.rowIndex="1" GridPane.valignment="CENTER" />
                  <Label text="2nd Color" GridPane.halignment="RIGHT" GridPane.rowIndex="2" />
                  <ColorPicker fx:id="cpSecondLinearColor" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" GridPane.columnIndex="1" GridPane.halignment="CENTER" GridPane.hgrow="ALWAYS" GridPane.rowIndex="2" GridPane.valignment="CENTER" GridPane.vgrow="ALWAYS" />
               </children>
               <columnConstraints>
                  <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" />
                  <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" />
               </columnConstraints>
               <rowConstraints>
                  <RowConstraints minHeight="10.0" vgrow="NEVER" />
                  <RowConstraints minHeight="10.0" vgrow="NEVER" />
                  <RowConstraints minHeight="10.0" vgrow="NEVER" />
               </rowConstraints>
            </GridPane>
            <TabPane fx:id="tabRadialSettings" styleClass="Group" tabClosingPolicy="UNAVAILABLE" visible="false">
               <tabs>
                  <Tab closable="false" text="Colors">
                     <content>
                        <GridPane hgap="5.0" styleClass="Group" vgap="5.0">
                           <children>
                              <Label maxHeight="1.7976931348623157E308" text="1st Color" GridPane.vgrow="NEVER" />
                              <ColorPicker fx:id="cpFirstRadialColor" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" GridPane.columnIndex="1" GridPane.vgrow="NEVER" />
                              <Label maxHeight="1.7976931348623157E308" text="2nd Color" GridPane.rowIndex="1" GridPane.vgrow="NEVER" />
                              <ColorPicker fx:id="cpSecondRadialColor" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" GridPane.columnIndex="1" GridPane.rowIndex="1" GridPane.vgrow="NEVER" />
                           </children>
                           <columnConstraints>
                              <ColumnConstraints hgrow="NEVER" minWidth="10.0" />
                              <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" />
                           </columnConstraints>
                           <rowConstraints>
                              <RowConstraints minHeight="10.0" vgrow="SOMETIMES" />
                              <RowConstraints minHeight="10.0" vgrow="SOMETIMES" />
                           </rowConstraints>
                        </GridPane>
                     </content>
                  </Tab>
                  <Tab closable="false" text="Size and Position">
                     <content>
                        <GridPane hgap="5.0" styleClass="Group" vgap="5.0">
                           <children>
                              <Label text="H Position" />
                              <Label text="V Position" GridPane.rowIndex="1" />
                              <Label text="Radius" GridPane.rowIndex="2" />
                              <Slider fx:id="sliderHPos" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" min="1.0" showTickMarks="true" GridPane.columnIndex="1" />
                              <Slider fx:id="sliderVPos" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" min="1.0" showTickMarks="true" value="1.0" GridPane.columnIndex="1" GridPane.rowIndex="1" />
                              <Slider fx:id="sliderRadius" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" min="1.0" showTickMarks="true" value="1.0" GridPane.columnIndex="1" GridPane.rowIndex="2" />
                           </children>
                           <columnConstraints>
                              <ColumnConstraints hgrow="NEVER" minWidth="10.0" />
                              <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
                           </columnConstraints>
                           <rowConstraints>
                              <RowConstraints minHeight="10.0" vgrow="SOMETIMES" />
                              <RowConstraints minHeight="10.0" vgrow="SOMETIMES" />
                              <RowConstraints minHeight="10.0" vgrow="SOMETIMES" />
                           </rowConstraints>
                        </GridPane>
                     </content>
                  </Tab>
               </tabs>
            </TabPane>
         </children>
      </StackPane>
   </children>
   <columnConstraints>
      <ColumnConstraints halignment="CENTER" hgrow="SOMETIMES" minWidth="10.0" />
   </columnConstraints>
   <rowConstraints>
      <RowConstraints minHeight="10.0" vgrow="SOMETIMES" />
      <RowConstraints minHeight="10.0" vgrow="SOMETIMES" />
      <RowConstraints minHeight="10.0" vgrow="ALWAYS" />
   </rowConstraints>
</fx:root>

Die Java-Klassendatei (die das tatsächliche Objekt im Code darstellt):

package DGCSDefiner;

import java.io.IOException;
import static java.util.Arrays.asList;
import javafx.fxml.FXML;
import javafx.fxml.FXMLLoader;
import javafx.scene.control.ColorPicker;
import javafx.scene.control.ComboBox;
import javafx.scene.control.Slider;
import javafx.scene.control.TabPane;
import javafx.scene.layout.GridPane;
import javafx.scene.layout.Pane;
import javafx.scene.layout.StackPane;

public class DGCSDefiner extends Pane { //DigiGames Color Settings Definer.
    // Values injected by FXMLLoader
    //<editor-fold defaultstate="collapsed" desc="FXML Variables">
    //<editor-fold defaultstate="collapsed" desc="Containers">
    @FXML private GridPane  gpLinearSettings;   // fx:id="gpLinearSettings"
    @FXML private StackPane spSettings;         // fx:id="spSettings"
    @FXML private TabPane   tabsRadialSettings; // fx:id="tabRadialSettings"
    //</editor-fold>
        //<editor-fold defaultstate="collapsed" desc="Color Pickers">
    @FXML private ColorPicker cpSolidColor,         // fx:id="cpSolidColor"
                              cpFirstLinearColor,   // fx:id="cpFirstLinearColor"
                              cpSecondLinearColor,  // fx:id="cpSecondLinearColor"
                              cpFirstRadialColor,   // fx:id="cpFirstRadialColor"
                              cpSecondRadialColor;  // fx:id="cpSecondRadialColor"
    //</editor-fold>
    //<editor-fold defaultstate="collapsed" desc="Combo Boxes">
    @FXML private ComboBox<ColorStyles>     cbxColorStyle;  // fx:id="cbxColorStyle"
    @FXML private ComboBox<Integer>     cbxLinearAngle; // fx:id="cbxLinearAngle"
    //</editor-fold>
    //<editor-fold defaultstate="collapsed" desc="Sliders">
    @FXMLprivate Slider     sliderRadius,   // fx:id="sliderRadius"
                            sliderHPos,     // fx:id="sliderHPos"
                            sliderVPos;     // fx:id="sliderVPos"
    //</editor-fold>
    //</editor-fold>
    private FXMLLoader Loader;

    @FXML // This method is called by the FXMLLoader when initialization is complete
    void initialize() {
        //<editor-fold defaultstate="collapsed" desc="Assertions">
        //<editor-fold defaultstate="collapsed" desc="Container Assertions">
        assert this.gpLinearSettings    != null : "fx:id=\"gpLinearSettings\" was not injected: check your FXML file 'JFXMLColorStyleDefiner.fxml'.";
        assert this.spSettings      != null : "fx:id=\"spSettings\" was not injected: check your FXML file 'JFXMLColorStyleDefiner.fxml'.";
        assert this.tabsRadialSettings  != null : "fx:id=\"tabsRadialSettings\" was not injected: check your FXML file 'JFXMLColorStyleDefiner.fxml'.";
        //</editor-fold>
        //<editor-fold defaultstate="collapsed" desc="ColorPicker Assertions">
        assert this.cpSolidColor    != null : "fx:id=\"cpSolidColor\" was not injected: check your FXML file 'JFXMLColorStyleDefiner.fxml'.";
        assert this.cpFirstLinearColor  != null : "fx:id=\"cpFirstLinearColor\" was not injected: check your FXML file 'JFXMLColorStyleDefiner.fxml'.";
        assert this.cpSecondLinearColor != null : "fx:id=\"cpSecondLinearColor\" was not injected: check your FXML file 'JFXMLColorStyleDefiner.fxml'.";
        assert this.cpFirstRadialColor  != null : "fx:id=\"cpFirstRadialColor\" was not injected: check your FXML file 'JFXMLColorStyleDefiner.fxml'.";
        assert this.cpSecondRadialColor != null : "fx:id=\"cpSecondRadialColor\" was not injected: check your FXML file 'JFXMLColorStyleDefiner.fxml'.";
        //</editor-fold>
        //<editor-fold defaultstate="collapsed" desc="ComboBox Assertions">
        assert this.cbxColorStyle   != null : "fx:id=\"cbxColorStyle\" was not injected: check your FXML file 'JFXMLColorStyleDefiner.fxml'.";
        assert this.cbxLinearAngle  != null : "fx:id=\"cbxLinearAngle\" was not injected: check your FXML file 'JFXMLColorStyleDefiner.fxml'.";
        //</editor-fold>
        //<editor-fold defaultstate="collapsed" desc="Slider Assertions">
        assert this.sliderRadius    != null : "fx:id=\"sliderRadius\" was not injected: check your FXML file 'JFXMLColorStyleDefiner.fxml'.";
        assert this.sliderHPos      != null : "fx:id=\"sliderHPos\" was not injected: check your FXML file 'JFXMLColorStyleDefiner.fxml'.";
        assert this.sliderVPos      != null : "fx:id=\"sliderVPos\" was not injected: check your FXML file 'JFXMLColorStyleDefiner.fxml'.";
        //</editor-fold>
        //</editor-fold>
        //<editor-fold defaultstate="collapsed" desc="Initializations">
        //<editor-fold defaultstate="collapsed" desc="ComboBox Initializations">
        this.cbxColorStyle.getItems().addAll(
            asList(ColorStyles.values())
        );
        for (int x = 0; x < 8; x++)
            this.cbxLinearAngle.getItems().add(x * 45);
        this.cbxColorStyle.setOnAction(event -> {
            ColorStyles CS = this.cbxColorStyle.getValue();
            this.cpSolidColor.setVisible(CS == ColorStyles.SOLID);
            this.gpLinearSettings.setVisible(CS == ColorStyles.LINEAR);
            this.tabsRadialSettings.setVisible(CS == ColorStyles.RADIAL);
        });
        //</editor-fold>
        this.Loader = new FXMLLoader(
            this.getClass().getResource("DGCSDefiner.fxml")
        );
        this.Loader.setRoot(this);
        this.Loader.setController(this);
        //</editor-fold>
    }

    public DGCSDefiner(){
        try{ this.Loader.load(); }
        catch(IOException e){ throw new RuntimeException(e); }
    }

    /**
     * Get the ColorSettings defined by the control.
     * @return Defined Color Settings.
     */
    public ColorSettings getColorSettings(){
        if (this.cbxColorStyle.getSelectionModel().getSelectedIndex() < 0)
            return null;
        switch(this.cbxColorStyle.getValue()){
            case SOLID:
                return new ColorSettings(this.cpSolidColor.getValue());
            case LINEAR:
                return new ColorSettings(
                    this.cpFirstLinearColor.getValue(),
                    this.cpSecondLinearColor.getValue(),
                    this.cbxLinearAngle.getValue()
                );
            case RADIAL:
                return new ColorSettings(
                    this.cpFirstRadialColor.getValue(),
                    this.cpSecondRadialColor.getValue(),
                    (int)this.sliderRadius.getValue(),
                    (int)this.sliderHPos.getValue(),
                    (int)this.sliderVPos.getValue()
                );
        }
        return null; //This should never happen.
    }
    /** 
     * Load defined color settings.
     * @param cs Predefined color settings.
     */
    public void setColorSettings(ColorSettings cs){
        this.cbxColorStyle.setValue(cs.Style);
        switch(cs.Style){
            case SOLID:
                this.cpSolidColor.setValue(cs.clrPrimary);
                break;
            case LINEAR:
                this.cbxLinearAngle.setValue(cs.intAngle);
                this.cpFirstLinearColor.setValue(cs.clrPrimary);
                this.cpSecondLinearColor.setValue(cs.clrSecondary);
                break;
            case RADIAL:
                this.sliderRadius.setValue(cs.intSize);
                this.sliderHPos.setValue(cs.intHPos);
                this.sliderVPos.setValue(cs.intVPos);
                this.cpFirstRadialColor.setValue(cs.clrPrimary);
                this.cpSecondRadialColor.setValue(cs.clrSecondary);
        }
    }
}

Und dann diese letzte Datei, deren Zweck mir entgeht:

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package DGCSDefiner;

import java.net.URL;
import java.util.ResourceBundle;
import javafx.fxml.Initializable;

/**
 *
 * @author Will
 */
public class DGCSDefinerController implements Initializable {
    @Override
    public void initialize(URL location, ResourceBundle resources) {

    }
}

Kann mir jemand den Zweck dieser letzten Datei erklären? Was ist die Funktion? Ich kann dem Beispielcode entnehmen, mit dem ich ausgestattet wurde, dass er als FXML-Controller festgelegt wurde, aber das sagt mir immer noch nichts. Ich habe noch nie zuvor einen FXML-Controller festgelegt, da ich ihn normalerweise in Code verwende. Ist es also ausdrücklich beabsichtigt, dieses Steuerelement in den Scene Builder importierbar zu machen?

EDIT 2 Okay. Ich hatte eine Ahnung und es hat sich als richtig erwiesen, aber es hat nicht geholfen. Ich habe die CSS-Stylesheet-Referenz für das Steuerelement entfernt und konnte das Steuerelement problemlos hinzufügen.

Jedoch, als ich es fallen ließ, war das, was in der FXML-Datei passiert ist:

Es ging von hier aus (Relevanter Teil wird nur angezeigt):

<Tab fx:id="tabBGStyle" closable="false" text="Background" />

dazu:

<Tab fx:id="tabBGStyle" closable="false" text="Background">
    <content>
        <GridPane alignment="CENTER" hgap="5.0" styleClass="root" vgap="5.0">
            <children>
                <ComboBox fx:id="cbxColorStyle" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" prefWidth="150.0" promptText="Select Background Color Style" />
                <ColorPicker fx:id="cpSolidColor" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" prefHeight="32.0" prefWidth="283.0" visible="false" GridPane.rowIndex="1" />
                <StackPane fx:id="spSettings" styleClass="Group" GridPane.rowIndex="2" GridPane.vgrow="NEVER">
                    <children>
                        <GridPane fx:id="gpLinearSettings" hgap="5.0" styleClass="Group" vgap="20.0" visible="false">
                            <children>
                                <Label text="Angle" GridPane.halignment="RIGHT" GridPane.valignment="CENTER">
                                    <font>
                                        <Font name="Arial" size="12.0" />
                                    </font>
                                </Label>
                                <ComboBox fx:id="cbxLinearAngle" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" prefWidth="150.0" GridPane.columnIndex="1" GridPane.halignment="CENTER" GridPane.valignment="CENTER" />
                                <Label text="1st Color" GridPane.halignment="RIGHT" GridPane.rowIndex="1" />
                                <ColorPicker fx:id="cpFirstLinearColor" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" GridPane.columnIndex="1" GridPane.halignment="CENTER" GridPane.rowIndex="1" GridPane.valignment="CENTER" />
                                <Label text="2nd Color" GridPane.halignment="RIGHT" GridPane.rowIndex="2" />
                                <ColorPicker fx:id="cpSecondLinearColor" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" GridPane.columnIndex="1" GridPane.halignment="CENTER" GridPane.hgrow="ALWAYS" GridPane.rowIndex="2" GridPane.valignment="CENTER" GridPane.vgrow="ALWAYS" />
                            </children>
                            <columnConstraints>
                                <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" />
                                <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" />
                            </columnConstraints>
                            <rowConstraints>
                                <RowConstraints minHeight="10.0" vgrow="NEVER" />
                                <RowConstraints minHeight="10.0" vgrow="NEVER" />
                                <RowConstraints minHeight="10.0" vgrow="NEVER" />
                            </rowConstraints>
                        </GridPane>
                        <TabPane fx:id="tabRadialSettings" styleClass="Group" tabClosingPolicy="UNAVAILABLE" visible="false">
                            <tabs>
                                <Tab closable="false" text="Colors">
                                    <content>
                                        <GridPane hgap="5.0" styleClass="Group" vgap="5.0">
                                            <children>
                                                <Label maxHeight="1.7976931348623157E308" text="1st Color" GridPane.vgrow="NEVER" />
                                                <ColorPicker fx:id="cpFirstRadialColor" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" GridPane.columnIndex="1" GridPane.vgrow="NEVER" />
                                                <Label maxHeight="1.7976931348623157E308" text="2nd Color" GridPane.rowIndex="1" GridPane.vgrow="NEVER" />
                                                <ColorPicker fx:id="cpSecondRadialColor" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" GridPane.columnIndex="1" GridPane.rowIndex="1" GridPane.vgrow="NEVER" />
                                            </children>
                                            <columnConstraints>
                                                <ColumnConstraints hgrow="NEVER" minWidth="10.0" />
                                                <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0"/>
                                            </columnConstraints>
                                            <rowConstraints>
                                                <RowConstraints minHeight="10.0" vgrow="SOMETIMES" />
                                                <RowConstraints minHeight="10.0" vgrow="SOMETIMES" />
                                            </rowConstraints>
                                        </GridPane>
                                    </content>
                                </Tab>
                                <Tab closable="false" text="Size and Position">
                                    <content>
                                        <GridPane hgap="5.0" styleClass="Group" vgap="5.0">
                                            <children>
                                                <Label text="H Position" />
                                                <Label text="V Position" GridPane.rowIndex="1" />
                                                <Label text="Radius" GridPane.rowIndex="2" />
                                                <Slider fx:id="sliderHPos" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" min="1.0" showTickMarks="true" GridPane.columnIndex="1" />
                                                <Slider fx:id="sliderVPos" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" min="1.0" showTickMarks="true" value="1.0" GridPane.columnIndex="1" GridPane.rowIndex="1" />
                                                <Slider fx:id="sliderRadius" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" min="1.0" showTickMarks="true" value="1.0" GridPane.columnIndex="1" GridPane.rowIndex="2" />
                                            </children>
                                            <columnConstraints>
                                                <ColumnConstraints hgrow="NEVER" minWidth="10.0" />
                                                <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
                                            </columnConstraints>
                                            <rowConstraints>
                                                <RowConstraints minHeight="10.0" vgrow="SOMETIMES" />
                                                <RowConstraints minHeight="10.0" vgrow="SOMETIMES" />
                                                <RowConstraints minHeight="10.0" vgrow="SOMETIMES" />
                                            </rowConstraints>
                                        </GridPane>
                                    </content>
                                </Tab>
                            </tabs>
                        </TabPane>
                    </children>
                </StackPane>
            </children>
            <columnConstraints>
                <ColumnConstraints halignment="CENTER" hgrow="SOMETIMES" minWidth="10.0" />
            </columnConstraints>
            <rowConstraints>
                <RowConstraints minHeight="10.0" vgrow="SOMETIMES" />
                <RowConstraints minHeight="10.0" vgrow="SOMETIMES" />
                <RowConstraints minHeight="10.0" vgrow="ALWAYS" />
            </rowConstraints>
        </GridPane>
    </content>
</Tab>

was ist genau was ichNICHT WOLLEN

Was ich sehen möchte, ist etwas in der Wirkung davon:

<Tab fx:id="tabBGStyle" closable="false" text="Background">
    <content>
        <DGCSDefiner/>
    </content>
</Tab>

im FXML-Code, nachdem ich das benutzerdefinierte Steuerelement in den Designer gezogen und dort abgelegt habe. Ist das möglich? Muss ich es in ein Glas kompilieren?

Edit 3 Um es etwas klarer zu machen,Die ist genau das, was ich sehen möchte. Das sieht gut aus, aber das Problem ist, dass es keine Informationen zum Importieren eines benutzerdefinierten Steuerelements in Scene Builder gibt, sodass ich beim Ziehen und Ablegen auf die Zeichenfläche nur eine Stelle in der Nähe einer einzelnen Codezeile im Vergleich zur anderthalb Bücher schreiben (was einfach albern ist. Wenn ich wollte, könnte (und würde) ich es selbst tun).

Antworten auf die Frage(1)

Ihre Antwort auf die Frage