private void initUI() {
JPanel mainPanel;
ColorButton foreground;
ColorButton background;
ColorButton border;
PreviewLabel previewLabel;
PreviewLabel borderPreviewLabel;
FontChooser fontChooser;
JTabbedPane tabbedPane;
fontChooser = createFontChooser(ThemeData.STATUS_BAR_FONT);
// Initialises the foreground color button.
foreground = new ColorButton(parent, themeData, ThemeData.STATUS_BAR_FOREGROUND_COLOR, PreviewLabel.FOREGROUND_COLOR_PROPERTY_NAME, previewLabel = new PreviewLabel());
previewLabel.setTextPainted(true);
addFontChooserListener(fontChooser, previewLabel);
previewLabel.addPropertyChangeListener(this);
// Initialises the background and border color buttons.
background = new ColorButton(parent, themeData, ThemeData.STATUS_BAR_BACKGROUND_COLOR, PreviewLabel.BACKGROUND_COLOR_PROPERTY_NAME, previewLabel = new PreviewLabel());
border = new ColorButton(parent, themeData, ThemeData.STATUS_BAR_BORDER_COLOR, PreviewLabel.BORDER_COLOR_PROPERTY_NAME, borderPreviewLabel = new PreviewLabel());
// Initialises the background color preview.
previewLabel.setTextPainted(true);
foreground.addUpdatedPreviewComponent(previewLabel);
border.addUpdatedPreviewComponent(previewLabel);
addFontChooserListener(fontChooser, previewLabel);
previewLabel.addPropertyChangeListener(this);
// Initialises the border color preview.
borderPreviewLabel.setTextPainted(true);
foreground.addUpdatedPreviewComponent(borderPreviewLabel);
background.addUpdatedPreviewComponent(borderPreviewLabel);
addFontChooserListener(fontChooser, borderPreviewLabel);
borderPreviewLabel.addPropertyChangeListener(this);
tabbedPane = new JTabbedPane();
tabbedPane.add(Translator.get("theme_editor.general"), createGeneralPanel(fontChooser, foreground));
tabbedPane.add(Translator.get("theme_editor.free_space"), createFreeSpacePanel(fontChooser, foreground, background, border));