Search in sources :

Example 6 with FontChooser

use of com.mucommander.ui.chooser.FontChooser in project mucommander by mucommander.

the class FileEditorPanel method initUI.

/**
 * Initialises the panel's UI.
 */
private void initUI() {
    // Contains all the configuration elements.
    YBoxPanel configurationPanel;
    // Used to select a font.
    FontChooser fontChooser;
    // Main panel.
    JPanel mainPanel;
    // Font chooser and preview initialisation.
    mainPanel = new JPanel(new BorderLayout());
    fontChooser = createFontChooser(ThemeData.EDITOR_FONT);
    mainPanel.add(createPreviewPanel(), BorderLayout.EAST);
    addFontChooserListener(fontChooser, preview);
    // Configuration panel initialisation.
    configurationPanel = new YBoxPanel();
    configurationPanel.add(fontChooser);
    configurationPanel.addSpace(10);
    configurationPanel.add(createColorsPanel(fontChooser));
    mainPanel.add(configurationPanel, BorderLayout.CENTER);
    // Layout.
    setLayout(new BorderLayout());
    add(mainPanel, BorderLayout.NORTH);
}
Also used : YBoxPanel(com.mucommander.commons.util.ui.layout.YBoxPanel) FontChooser(com.mucommander.ui.chooser.FontChooser)

Example 7 with FontChooser

use of com.mucommander.ui.chooser.FontChooser in project mucommander by mucommander.

the class FolderPanePanel method initUI.

// - UI initialisation ---------------------------------------------------------------
// -----------------------------------------------------------------------------------
/**
 * Initialises the panel's UI.
 */
private void initUI() {
    JTabbedPane tabbedPane;
    FontChooser fontChooser;
    FilePanel filePanel;
    tabbedPane = new JTabbedPane(JTabbedPane.TOP);
    // Adds the general panel.
    tabbedPane.add(Translator.get("theme_editor.general"), createScrollPane(createGeneralPanel(fontChooser = createFontChooser(ThemeData.FILE_TABLE_FONT))));
    // Adds the active panel.
    filePanel = new FilePanel(parent, true, themeData, fontChooser);
    tabbedPane.add(filePanel.getTitle(), createScrollPane(filePanel));
    // Adds the inactive panel.
    filePanel = new FilePanel(parent, false, themeData, fontChooser);
    tabbedPane.add(filePanel.getTitle(), createScrollPane(filePanel));
    // Creates the layout.
    setLayout(new BorderLayout());
    add(tabbedPane, BorderLayout.NORTH);
}
Also used : FontChooser(com.mucommander.ui.chooser.FontChooser)

Aggregations

FontChooser (com.mucommander.ui.chooser.FontChooser)7 YBoxPanel (com.mucommander.commons.util.ui.layout.YBoxPanel)4 ProportionalGridPanel (com.mucommander.commons.util.ui.layout.ProportionalGridPanel)2 PreviewLabel (com.mucommander.ui.chooser.PreviewLabel)2 BorderLayout (java.awt.BorderLayout)1 ComponentEvent (java.awt.event.ComponentEvent)1 ComponentListener (java.awt.event.ComponentListener)1 JPanel (javax.swing.JPanel)1 JTabbedPane (javax.swing.JTabbedPane)1 ChangeListener (javax.swing.event.ChangeListener)1