This content has been marked as final. Show 5 replies
acepsut wrote:It's a Label over an HBox which is squeezed by setting its maxHeight to a little value.
I am using Scene Builder and I would like to replicate the inspector look.
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.
Something close to this:
<StackPane prefHeight="-1.0" xmlns:fx="http://javafx.com/fxml">
<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" />
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.
May be I misunderstood your question.
Let's agree on naming ; if you select the default anchor pane, Inspector shows 4 levels:
Sub-sections are represented by the HBox + Label I mentioned previously.
Inspector <- Panel Properties <- Section Node <- Sub-section Disable <- Property
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.