5 Replies Latest reply: Apr 24, 2013 5:28 AM by Eric Le Ponner RSS

    Scene Builder Inspector

    acepsut
      I am using Scene Builder and I would like to replicate the inspector look.

      My questions:

      1) Are Padding, size, position areas ...etc panels within a Scroll Pane or are just two separators with a label in between ? It looks like a Swing TitledBorder Jpanel.

      2) In case of panels, what has been used and how to set a title ?

      3) Is there a naming convention for fx:id field? I have only find some examples all written in lowercase such as "maintabbedpane".

      Thanks
        • 1. Re: Scene Builder Inspector
          Eric Le Ponner
          acepsut wrote:
          I am using Scene Builder and I would like to replicate the inspector look.

          My questions:

          1) Are Padding, size, position areas ...etc panels within a Scroll Pane or are just two separators with a label in between ? It looks like a Swing TitledBorder Jpanel.
          It's a Label over an HBox which is squeezed by setting its maxHeight to a little value.
          Something close to this:

          <StackPane prefHeight="-1.0" xmlns:fx="http://javafx.com/fxml">
          <children>
          <HBox maxHeight="2.0" prefHeight="-1.0" prefWidth="-1.0" style="-fx-background-color: gray;-fx-background-insets: -1 -17 1 -17, 0 -17 1 -17;" />
          <Label style="-fx-font-weight: bold;-fx-background-color: white;-fx-padding: 0 6 5 6;" text="Title" />
          </children>
          </StackPane>


          >
          2) In case of panels, what has been used and how to set a title ?
          Will try to find out.

          >
          3) Is there a naming convention for fx:id field? I have only find some examples all written in lowercase such as "maintabbedpane".
          I am not aware of any.
          fx:id can be considered as java variable name.
          So using camel case seems natural to me.

          Eric
          • 2. Re: Scene Builder Inspector
            acepsut
            Thanks Eric,

            I have tried to replicate your suggestion but what I get is different from inspector look.

            The inspector seems very much like a group of Swing Jpanels TitledPanes.
            • 3. Re: Scene Builder Inspector
              Eric Le Ponner
              May be I misunderstood your question.

              Let's agree on naming ; if you select the default anchor pane, Inspector shows 4 levels:
              Inspector     <- Panel
                   Properties    <- Section
                        Node         <- Sub-section
                              Disable     <- Property
              Sub-sections are represented by the HBox + Label I mentioned previously.

              A section is represented by a TitledPane (which itself includes a GridPane).

              TitledPane instances (Properties, Layout, Code) are grouped in an Accordion.

              The Inspector header ("Inspector" + the search box + the menu) is based on an HBox
              and lots of css.

              Eric
              • 4. Re: Scene Builder Inspector
                acepsut
                I think I have not clearly explain my question:

                I have uploaded a picture here

                [http://s21.postimg.org/twbsdap93/A03712.png]

                In this case I have drawn two red arrows in the Node area: this seems like a Swing TitledPane.

                Is this a panel or is just a label between two separators?

                Alberto
                • 5. Re: Scene Builder Inspector
                  Eric Le Ponner
                  I confirm : it's the combination of HBox + Label that I mentioned above.
                  You may observed a different look because of CSS though.

                  Eric