use of org.apache.cayenne.modeler.pref.ComponentGeometry in project cayenne by apache.
the class CayenneModelerFrame method initStatusBar.
protected void initStatusBar() {
status = new JLabel();
status.setFont(status.getFont().deriveFont(Font.PLAIN, 10));
splitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT);
splitPane.setBorder(TopBorder.create());
splitPane.getInsets().left = 5;
splitPane.getInsets().right = 5;
splitPane.setResizeWeight(0.7);
// Moving this to try-catch block per CAY-940. Exception will be stack-traced
try {
ComponentGeometry geometry = new ComponentGeometry(this.getClass(), "splitPane/divider");
geometry.bindIntProperty(splitPane, JSplitPane.DIVIDER_LOCATION_PROPERTY, 400);
} catch (Exception ex) {
LoggerFactory.getLogger(getClass()).error("Cannot bind divider property", ex);
}
JPanel statusBar = new JPanel(new FlowLayout(FlowLayout.LEFT, 3, 1));
statusBar.setBorder(TopBorder.create());
// add placeholder
statusBar.add(Box.createVerticalStrut(16));
statusBar.add(status);
if (getContentPane() instanceof JPanel) {
((JPanel) getContentPane()).setBorder(BorderFactory.createEmptyBorder());
}
getContentPane().add(splitPane, BorderLayout.CENTER);
getContentPane().add(statusBar, BorderLayout.SOUTH);
}
Aggregations