Window Decoration, Part 7 - TitlePane Menu Inline Style(10:24, 17. Jun. 2014)

Synthetica V2.19 supports a new UI-property which allows you to move the position of the menu into the title panel. The image below shows the regular title panel with the Simple2D theme.

RegularTitlePane

By enabling through the UI-property "Synthetica.rootPane.titlePane.layoutStyle" the menu inline style you can save some space for the content. The property has to be set to the string value "INLINEMENU".

InlineTitlePaneLayout

For a proper result some additional UI-properties has to be set. An additional Synth XML-file can be used to hold all needed properties.

<synth>

  <style id="mainFrame">
    <defaultsProperty key="Synthetica.rootPane.titlePane.layoutStyle" type="string" value="INLINEMENU" />
    <defaultsProperty key="Synthetica.rootPane.titlePane.showMenuBarInTitlePane" type="boolean" value="true" />
    <defaultsProperty key="Synthetica.rootPane.titlePane.clipMenuBarWidth" type="boolean" value="true" />
    <defaultsProperty key="Synthetica.rootPane.titlePane.title.center" type="boolean" value="false" />
  </style>  
     
</synth>

In the application you have to load the additional configuration file through a custom loader just like below.

UIManager.setLookAndFeel(new SyntheticaBlueLightLookAndFeel(){
      @Override
      protected void loadCustomXML() throws ParseException
      {
        loadXMLConfig("/test/custom.xml");
      }
  });

The screenshot below displays the result.

InlineTitlePaneLayout

Related Posts

Window Decoration, Part 1 - Basics and Title Pane
Window Decoration, Part 2 - Non-Rectangular Window Shapes
Window Decoration, Part 3 - Custom Decoration for Dialogs
Window Decoration, Part 4 - Logo Renderer and More
Window Decoration, Part 5 - TitlePane Variations
Window Decoration, Part 6 - TitlePane Layout