Пример #1
0
 private void setBackgroundColors() {
   shellPreview.setBackground(themeData.getColor(ThemeData.SHELL_BACKGROUND_COLOR));
   shellPreview.setSelectionColor(themeData.getColor(ThemeData.SHELL_SELECTED_BACKGROUND_COLOR));
   historyPreview.setBackground(themeData.getColor(ThemeData.SHELL_HISTORY_BACKGROUND_COLOR));
   historyPreview.setSelectionBackground(
       themeData.getColor(ThemeData.SHELL_HISTORY_SELECTED_BACKGROUND_COLOR));
 }
Пример #2
0
 private void setForegroundColors() {
   shellPreview.setForeground(themeData.getColor(ThemeData.SHELL_FOREGROUND_COLOR));
   shellPreview.setSelectedTextColor(
       themeData.getColor(ThemeData.SHELL_SELECTED_FOREGROUND_COLOR));
   shellPreview.setCaretColor(themeData.getColor(ThemeData.SHELL_FOREGROUND_COLOR));
   historyPreview.setForeground(themeData.getColor(ThemeData.SHELL_HISTORY_FOREGROUND_COLOR));
   historyPreview.setSelectionForeground(
       themeData.getColor(ThemeData.SHELL_HISTORY_SELECTED_FOREGROUND_COLOR));
 }
Пример #3
0
  private JPanel createPreviewPanel() {
    JPanel panel;
    YBoxPanel headerPanel;
    JScrollPane scroll;

    panel = new JPanel(new BorderLayout());
    panel.setBorder(BorderFactory.createTitledBorder(Translator.get("preview")));

    headerPanel = new YBoxPanel();
    headerPanel.add(new JLabel(Translator.get("run_dialog.run_command_description") + ":"));
    headerPanel.add(historyPreview = new EditableComboBox(new JTextField("mucommander -v")));
    historyPreview.addItem("mucommander -v");
    historyPreview.addItem("java -version");

    headerPanel.addSpace(10);
    headerPanel.add(new JLabel(Translator.get("run_dialog.command_output") + ":"));

    panel.add(headerPanel, BorderLayout.NORTH);

    shellPreview = new JTextArea(15, 15);
    panel.add(
        scroll =
            new JScrollPane(
                shellPreview,
                JScrollPane.VERTICAL_SCROLLBAR_ALWAYS,
                JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED),
        BorderLayout.CENTER);
    scroll.getViewport().setPreferredSize(shellPreview.getPreferredSize());
    shellPreview.append(RuntimeConstants.APP_STRING);
    shellPreview.append("\nCopyright (C) ");
    shellPreview.append(RuntimeConstants.COPYRIGHT);
    shellPreview.append(
        " Maxence Bernard\nThis is free software, distributed under the terms of the GNU General Public License.");
    //        shellPreview.setLineWrap(true);
    shellPreview.setCaretPosition(0);

    setForegroundColors();
    setBackgroundColors();

    return panel;
  }