Company News

<< Previous PageNext Page >>

SyntheticaAddons V1.2.0 released!(14:10, 17. Jun. 2010)

We are pleased to announce release V1.2.0 of SyntheticaAddons - the Java/Swing component suite for Synthetica. Please find all major improvements below - a complete list of changes can be found at the changelog.

  • New Component JYSearchField with prompt, search and clear button support

JYSearchField

  • New Component JYTextField with prompt support and the ability to add leading and trailing components within the text area

JYTextField

  • New Component JYCheckBox - an extended JCheckBox with half selected state support

JYCheckBox

  • New Component JYCheckBoxTree - a JTree based component which allows selection by checkbox including half selected state support

JYCheckBoxTree

  • New Component JYSwitchButton - a checkBox variant with a switchable On/Off text area

JYSwitchButton

  • JYDocking - added stream support for restore/store operations (see IPerspectiveManager)
  • JYDocking - new method which allows you to define your own docking rules (see IDockable, IDockableAcceptor)
  • DateComboBox - time selection support
  • DateComboBox - year selection support by spinner within popup
  • Updated DemoCenter application demonstrates new components and examples

Related Links

Synthetica V2.10.1 released!(11:52, 14. Jun. 2010)

The maintenance release of Synthetica (V2.10.1) is available for downloading. The update fixes a bug in conjunction with SyntheticaAddons components, improves content pane handling and updates the Simple2D theme.

For more informations see Changelog.

Window Decoration, Part 5 - TitlePane Variations(09:25, 03. Jun. 2010)

Synthetica V2.10 supports some new UI-properties which allows you to customize the title pane layout for your frames and dialogs. The image below demonstrates a regular title pane with the Simple2D theme.

RegularTitlePane

However, for a more modern look you maybe prefer a different layout with a larger icon (menu button) and a slightly different menu bar location. As you maybe know Synthetica provides style support for multiple component instances. So it's possible to use a different layout only for the main screen of your application - other windows are not affected and appear in regular style.

Large TitlePane

An additional synth file contains all necessary declarations of the named default properties. Please note that the window name (LargeTitlePane) is appended to each needed default property.

<synth>

  <style id="largeTitlePaneWindow">
    <defaultsProperty key="Synthetica.rootPane.titlePane.showMenuBarInTitlePane.LargeTitlePane" type="boolean" value="true" />
    <defaultsProperty key="Synthetica.rootPane.titlePane.menuButton.useOriginalImageSize.LargeTitlePane" type="boolean" value="true" />    
    <defaultsProperty key="Synthetica.rootPane.titlePane.menuButton.alignment.LargeTitlePane" type="integer" value="11" />
    <defaultsProperty key="Synthetica.rootPane.titlePane.menuButton.insets.LargeTitlePane" type="insets" value="2 0 0 0" />
    <defaultsProperty key="Synthetica.rootPane.titlePane.iconifyButton.alignment.LargeTitlePane" type="integer" value="11" />
    <defaultsProperty key="Synthetica.rootPane.titlePane.iconifyButton.insets.LargeTitlePane" type="insets" value="2 0 0 0" />
    <defaultsProperty key="Synthetica.rootPane.titlePane.toggleButton.alignment.LargeTitlePane" type="integer" value="11" />
    <defaultsProperty key="Synthetica.rootPane.titlePane.toggleButton.insets.LargeTitlePane" type="insets" value="2 0 0 0" />
    <defaultsProperty key="Synthetica.rootPane.titlePane.closeButton.alignment.LargeTitlePane" type="integer" value="11" />
    <defaultsProperty key="Synthetica.rootPane.titlePane.closeButton.insets.LargeTitlePane" type="insets" value="2 0 0 0" />
  </style>  

  <style id="slimTitlePaneWindow">
    <defaultsProperty key="Synthetica.rootPane.titlePane.showMenuBarInTitlePane.SlimTitlePane" type="boolean" value="true" />
    <defaultsProperty key="Synthetica.rootPane.titlePane.title.visible.SlimTitlePane" type="boolean" value="false" />
    <defaultsProperty key="Synthetica.rootPane.titlePane.menuBar.insets.SlimTitlePane" type="insets" value="-20 0 0 0" />
  </style>  
    
</synth>

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

UIManager.setLookAndFeel(new SyntheticaSimple2DLookAndFeel(){
    @Override
    protected void loadXMLConfig(String fileName) throws ParseException
    {
      super.loadXMLConfig(fileName);
      super.loadXMLConfig("/demo/titlepane/titlePaneVariations.xml");
    }
  });

After setting the window name to the configured value the new style appears.

JFrame f = new JFrame("Large TitlePane Window");
//apply new window style
f.setName("LargeTitlePane");

Sometimes, when you need as much space as possible for the content area of your application, it's useful to place the menubar on top - in this case the window title disappears. In the screenshot below the slim title pane style (SlimTitlePane) is set.

Slim TitlePane

WebStart Demo

Download Demo Sourcecode

Note: To keep executables as small as possible, the webstart app doesn't includes the Java2D-library SyntheticaBatik - therefore Java 6 is required for proper execution.

Related Posts

Synthetica V2.10 released!(11:10, 31. May. 2010)

We are pleased to announce the release of Synthetica V2.10.0. Please find all major improvements below - a complete list of changes can be found at the changelog.

  • Added support to display menu bar within the window title pane.
  • Complete maximized support for translucent windows.
  • Improved table paint performance - up to 30%.
  • Improved key binding support for MAC.
  • New option to improve pressed state appearance for JCheckBox and JRadioButtons.
  • Ability to embed your preferred font resource (TTF) into a theme.
  • Improved painting support for (selected) cell renderers (List, Table, Tree, ComboBox).
  • Improved background painting support for table header.
  • Improved tabbed pane painter to support more complex styles.
  • Improved drop shadow support for window titles.
  • Improved styling support for indeterminate progress bars by new UI-properties.
  • New UI-property to specify window title font size.
  • New UI-property to specify font size for toplevel menus.
  • New UI-property to specify default toolBar opacity.
  • New UI-properties to specify custom table sort icons.
  • New UI-property to specify a custom border for table header cells.
  • Updated Simple2D and BlackEye theme.
Product Links

Window Decoration, Part 4 - Logo Renderer and More(17:34, 31. Mar. 2010)

Sometimes it's necessary to emphasize your corporate identity (CI) in your application. This article describes how to put your logo into the title pane and completes our technical article series about Synthetica's window decoration.

To display a logo in the title panel Synthetica provides the SyntheticaLogoRenderer interface. The returned component is responsible for logo rendering - a typical implementation returns a JLabel instance just like in the example below.

import de.javasoft.plaf.synthetica.SyntheticaLogoRenderer;

class MyLogoRenderer extends JLabel implements SyntheticaLogoRenderer
{
  public JComponent getRendererComponent(JRootPane root, boolean windowIsActive)
  {
    return this;
  }
} 

In your apllication the renderer has to be passed to your rootPane by the client propery Synthetica.logoRenderer.

MyLogoRenderer logoRenderer = new MyLogoRenderer();
logoRenderer.setHorizontalAlignment(SwingConstants.CENTER);
logoRenderer.setIcon(loadIcon("logo.png"));
frame.getRootPane().putClientProperty("Synthetica.logoRenderer", logoRenderer);

logoRenderer

If possible the renderer is spaned across the title pane and the menuBar. However, this is only supported if the menuBar component is transparent. Because of this, for most themes Synthetica uses only the title panel for logo rendering. You can also set the client property Synthetica.logoRenderer.titlePaneOnly to force Synthetica to use the title panel only.

frame.getRootPane().putClientProperty("Synthetica.logoRenderer.titlePaneOnly", true); 
frame.getRootPane().putClientProperty("Synthetica.logoRenderer.respectButtons", true);

The client property Synthetica.logoRenderer.respectButtons defines if the title panel controls should be respected for calculating the logo position. In case that you also want to add a title text, you can simply configure your renderer like a regular label component.

LogoRenderer renderer = new LogoRenderer();
renderer.setHorizontalAlignment(SwingConstants.CENTER);
renderer.setIcon(loadIcon("logo2.png"));
renderer.setText("App-Title");
renderer.setForeground(new Color(0x40CC40));
renderer.setFont(renderer.getFont().deriveFont(Font.BOLD));
renderer.setHorizontalTextPosition(SwingUtilities.CENTER);
renderer.setVerticalTextPosition(SwingUtilities.BOTTOM);
renderer.setIconTextGap(0);
getRootPane().putClientProperty("Synthetica.logoRenderer", renderer);

LogoRenderer With Title

If you want to see a logo renderer in action feel free to take a look at our Paint demo application.

Minimum Window Size

As you maybe know Synthetica respects the minimum size of your window components while resizing. This means that you can not resize your windows below the minimum size, required by visible window components. However, if you want to disable this behavior you can specify a custom minimum size.

UIManager.setLookAndFeel("de.javasoft.plaf.synthetica.SyntheticaBlackEyeLookAndFeel");
UIManager.put("Synthetica.rootPane.minimumWindowSize", new Dimension(100,100));

Additional UI-properties can be found in the RootPane section of Synthetica's customization list.

Related Posts

 

Window Decoration, Part 3 - Custom Decoration for Dialogs(18:12, 23. Mar. 2010)

In Window Decoration Part 1 and Part 2 you've learned some basics about customizing window decorations based on predefined themes. In case that you want to use a totally different look for some of your windows, you can use named UI-properties to apply a new style to a window instance. The example below describes how to create a translucent window decoration for dialogs - you can also see similar dialogs on a very popular phone.

The first step is to create a translucent image file which will be used for our special dialog.

Window Decoration

The Synth file blueWindow.xml contains the declarations of the named default properties. Please note that the dialog name (BlueWindow) is appended to each needed default property - that's what we call named default property and that's also the way how static UI-properties become dynamic in Synthetica.

<synth>

  <style id="blueWindow">
    <defaultsProperty key="Synthetica.window.opaque.BlueWindow" type="boolean" value="false"/>
    <defaultsProperty key="Synthetica.window.contentPane.opaque.BlueWindow" type="boolean" value="false"/>

    <string id="rootPaneBorderSelected">/demo/bluewindow/blueWindow.png</string>
    <defaultsProperty key="Synthetica.rootPane.border.selected.BlueWindow" type="idref" value="rootPaneBorderSelected"/>
    <!-- remark line below to use default style for inactive window  -->
    <defaultsProperty key="Synthetica.rootPane.border.BlueWindow" type="idref" value="rootPaneBorderSelected"/>
    
    <defaultsProperty key="Synthetica.rootPane.titlePane.opaque.BlueWindow" type="boolean" value="false"/>
    <defaultsProperty key="Synthetica.rootPane.titlePane.title.center.BlueWindow" type="boolean" value="true"/>
    <defaultsProperty key="Synthetica.rootPane.titlePane.background.verticalTiled.BlueWindow" type="boolean" value="false"/>

    <defaultsProperty key="Synthetica.rootPane.border.insets.BlueWindow" type="insets" value="50 13 19 13"/>
    <defaultsProperty key="Synthetica.rootPane.border.size.BlueWindow" type="insets" value="8 13 19 13"/>
    <defaultsProperty key="Synthetica.rootPane.border.respectFill.BlueWindow" type="boolean" value="true"/>
  </style>

</synth>

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

UIManager.setLookAndFeel(new SyntheticaBlackEyeLookAndFeel(){
    @Override
    protected void loadXMLConfig(String fileName) throws ParseException
    {
      super.loadXMLConfig(fileName);
      super.loadXMLConfig("/demo/bluewindow/blueWindow.xml");
    }
  });

The last step is to apply the style to your dialog - simply by setting the named UI-property extension (BlueWindow) as component name.

JDialog d = new JDialog(owner);
d.setTitle("Blue Window Dialog");
//apply new window style
d.setName("BlueWindow");

 

Demo Screenshot

WebStart Demo

Download Demo Sourcecode

Note: The example works for dialogs and for non-maximizable frames. For maximizable frames some additional properties have to be specified. Because of some JVM bugs, for proper execution Java 6u14 or above is required - on MAC Java 1.5 is good enough.

Related Articles

The upcoming article explains how to display your logo in the window title pane...CU JY

SyntheticaAddons V1.1.0 released(15:20, 18. Mar. 2010)

We are pleased to announce release V1.1.0 of SyntheticaAddons - the Java/Swing component suite for Synthetica. Please find all major improvements below - a complete list of changes can be found at the changelog.

  • JYTabbedpane improvements
    • New option to specify the overlapping tab side for negative tab gaps.
    • Support to modify visibility for tabs.
    • New UI-property to force icon space within popupMenu even if no tab icon is set (see BasicJYTabbedPaneUI).
    • New UI-property to avoid cropped tabs (see BasicJYTabbedPaneUI).

    " "

  • SwingX 1.6 support - SyntheticaAddons now provides SwingX 1.0 (for Java1.5 and above) and a recent SwingX 1.6 release. Note: SwingX 1.6 requires Java 6.
Product Links
<< Previous PageNext Page >>