bind();
}
//TODO inject properties
private void createTitledSeparatorDemo() {
add(new JXTitledSeparator());
add(new JXTitledSeparator()).setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT);
JXTitledSeparator s = new JXTitledSeparator();
s.setTitle("Custom Title");
add(s);
s = new JXTitledSeparator();
s.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT);
s.setTitle("Custom Title");
add(s);
s = new JXTitledSeparator();
s.setFont(new Font("Times New Roman", Font.ITALIC, 16));
s.setTitle("Custom Font");
add(s);
s = new JXTitledSeparator();
s.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT);
s.setFont(new Font("Times New Roman", Font.ITALIC, 16));
s.setTitle("Custom Font");
add(s);
s = new JXTitledSeparator();
s.setForeground(Color.BLUE.darker());
s.setTitle("Custom Foreground");
add(s);
s = new JXTitledSeparator();
s.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT);
s.setForeground(Color.BLUE.darker());
s.setTitle("Custom Foreground");
add(s);
s = new JXTitledSeparator();
s.setHorizontalAlignment(SwingConstants.CENTER);
s.setTitle("Center Alignment");
add(s);
s = new JXTitledSeparator();
s.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT);
s.setHorizontalAlignment(SwingConstants.CENTER);
s.setTitle("Center Alignment");
add(s);
s = new JXTitledSeparator();
s.setHorizontalAlignment(SwingConstants.TRAILING);
s.setTitle("Trailing Alignment");
add(s);
s = new JXTitledSeparator();
s.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT);
s.setHorizontalAlignment(SwingConstants.TRAILING);
s.setTitle("Trailing Alignment");
add(s);
s = new JXTitledSeparator();
s.setHorizontalAlignment(SwingConstants.LEADING);
s.setTitle("Leading Alignment");
add(s);
s = new JXTitledSeparator();
s.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT);
s.setHorizontalAlignment(SwingConstants.LEADING);
s.setTitle("Leading Alignment");
add(s);
s = new JXTitledSeparator();
s.setHorizontalAlignment(SwingConstants.LEFT);
s.setTitle("Left Alignment");
add(s);
s = new JXTitledSeparator();
s.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT);
s.setHorizontalAlignment(SwingConstants.LEFT);
s.setTitle("Left Alignment");
add(s);
s = new JXTitledSeparator();
s.setHorizontalAlignment(SwingConstants.RIGHT);
s.setTitle("Right Alignment");
add(s);
s = new JXTitledSeparator();
s.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT);
s.setHorizontalAlignment(SwingConstants.RIGHT);
s.setTitle("Right Alignment");
add(s);
Icon icon = Application.getInstance().getContext()
.getResourceMap(TitledSeparatorDemo.class).getIcon("greenOrb");
s = new JXTitledSeparator();
s.setIcon(icon);
s.setTitle("Custom Icon");
add(s);
s = new JXTitledSeparator();
s.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT);
s.setIcon(icon);
s.setTitle("Custom Icon");
add(s);
s = new JXTitledSeparator();
s.setIcon(icon);
s.setHorizontalTextPosition(SwingConstants.LEFT);
s.setTitle("Custom Icon, LEFT Horizontal Text Position");
add(s);
s = new JXTitledSeparator();
s.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT);
s.setIcon(icon);
s.setHorizontalTextPosition(SwingConstants.LEFT);
s.setTitle("Custom Icon, LEFT Horizontal Text Position");
add(s);
}