// Initialize the Panel for selecting toolBars visibility
final JPanel tVisPanel = new JPanel();
tVisPanel.setAlignmentX(Component.LEFT_ALIGNMENT);
tVisPanel.setLayout(new BoxLayout(tVisPanel, BoxLayout.X_AXIS));
tVisPanel.setBorder(new CompoundBorder(BorderFactory.createMatteBorder(0,
0, 1, 0, Color.GRAY), BorderFactory.createEmptyBorder(10, 5, 9, 5)));
mShowToolbarCb = new JCheckBox(mLocalizer
.msg("showToolbar", "Show toolbar"));
mShowToolbarCb.setSelected(Settings.propIsToolbarVisible.getBoolean());
tVisPanel.add(mShowToolbarCb);
tVisPanel.add(Box.createHorizontalGlue());
mShowSearchFieldCb = new JCheckBox(mLocalizer.msg("showSearchField",
"Show Search field"));
mShowSearchFieldCb.setSelected(Settings.propIsSearchFieldVisible
.getBoolean());
tVisPanel.add(mShowSearchFieldCb);
// Initialize the panel for the ToolBar settings
JPanel tSetPanel = new JPanel(new FormLayout("default,5dlu,default,0dlu:grow,default,5dlu,default,5dlu,default","default"));
tSetPanel.setAlignmentX(Component.LEFT_ALIGNMENT);
mLocationCB = new JComboBox(new String[] { mLocalizer.msg("top", "top"),
Localizer.getLocalization(Localizer.I18N_LEFT), });
if ("west".equals(Settings.propToolbarLocation.getString())) {
mLocationCB.setSelectedIndex(1);
mWest = true;
} else {
mWest = false;
}
mShowCB = new JComboBox(new String[] {
ContextMenu.mLocalizer.msg("text.and.icon", "text and icon"),
ContextMenu.mLocalizer.msg("text", "text"),
ContextMenu.mLocalizer.msg("icon", "icon") });
String style = Settings.propToolbarButtonStyle.getString();
if ("text".equals(style)) {
mShowCB.setSelectedIndex(1);
} else if ("icon".equals(style)) {
mShowCB.setSelectedIndex(2);
}
mShowCB.setAlignmentX(Component.CENTER_ALIGNMENT);
mShowCB.setMaximumSize(mShowCB.getPreferredSize());
mUseBigIconsCb = new JCheckBox(ContextMenu.mLocalizer.msg("bigIcons",
"Use big icons"));
mUseBigIconsCb.setSelected(Settings.propToolbarUseBigIcons.getBoolean());
CellConstraints cc = new CellConstraints();
tSetPanel.add(new JLabel(mLocalizer.msg("location", "Location")),cc.xy(1,1));
tSetPanel.add(mLocationCB,cc.xy(3,1));
tSetPanel.add(new JLabel(mLocalizer.msg("icons", "Icons")),cc.xy(5,1));
tSetPanel.add(mShowCB,cc.xy(7,1));
tSetPanel.add(mUseBigIconsCb,cc.xy(9,1));
tSetPanel.setBorder(new CompoundBorder(BorderFactory.createMatteBorder(1,
0, 1, 0, Color.GRAY), BorderFactory.createEmptyBorder(10, 5, 9, 5)));
// The panel for the OK button
JPanel okButtonPanel = new JPanel();
okButtonPanel.setAlignmentX(Component.LEFT_ALIGNMENT);