Search in sources :

Example 1 with FontComboBox

use of com.intellij.ui.FontComboBox in project intellij-community by JetBrains.

the class PrintDialog method createPrintSettingsPanel.

private JPanel createPrintSettingsPanel() {
    JPanel panel = new JPanel(new GridBagLayout());
    GridBagConstraints gbConstraints = new GridBagConstraints();
    panel.setBorder(BorderFactory.createEmptyBorder(8, 8, 4, 4));
    gbConstraints.gridy = 0;
    gbConstraints.gridx = 0;
    gbConstraints.gridwidth = 1;
    gbConstraints.gridheight = 1;
    gbConstraints.weightx = 1;
    gbConstraints.weighty = 0;
    gbConstraints.insets = new Insets(0, 8, 6, 4);
    gbConstraints.fill = GridBagConstraints.BOTH;
    JLabel paperSizeLabel = new MyLabel(CodeEditorBundle.message("print.settings.paper.size.label"));
    panel.add(paperSizeLabel, gbConstraints);
    myPaperSizeCombo = createPageSizesCombo();
    gbConstraints.gridx = 1;
    gbConstraints.gridwidth = 2;
    panel.add(myPaperSizeCombo, gbConstraints);
    JLabel fontLabel = new MyLabel(CodeEditorBundle.message("print.settings.font.label"));
    gbConstraints.gridx = 0;
    gbConstraints.gridwidth = 1;
    gbConstraints.gridy++;
    panel.add(fontLabel, gbConstraints);
    myFontNameCombo = new FontComboBox(true);
    gbConstraints.gridx = 1;
    panel.add(myFontNameCombo, gbConstraints);
    myFontSizeCombo = createFontSizesComboBox();
    gbConstraints.gridx = 2;
    panel.add(myFontSizeCombo, gbConstraints);
    myCbLineNumbers = new JCheckBox(CodeEditorBundle.message("print.settings.show.line.numbers.checkbox"));
    gbConstraints.gridx = 0;
    gbConstraints.gridwidth = 3;
    gbConstraints.gridy++;
    panel.add(myCbLineNumbers, gbConstraints);
    myCbDrawBorder = new JCheckBox(CodeEditorBundle.message("print.settings.draw.border.checkbox"));
    gbConstraints.gridy++;
    panel.add(myCbDrawBorder, gbConstraints);
    myCbEvenNumberOfPages = new JCheckBox(CodeEditorBundle.message("print.settings.even.number.of.pages"));
    gbConstraints.gridy++;
    panel.add(myCbEvenNumberOfPages, gbConstraints);
    gbConstraints.insets = new Insets(0, 0, 6, 4);
    gbConstraints.gridx = 0;
    gbConstraints.gridwidth = 3;
    gbConstraints.gridy++;
    panel.add(createStyleAndLayoutPanel(), gbConstraints);
    gbConstraints.gridy++;
    gbConstraints.weighty = 1;
    panel.add(new MyTailPanel(), gbConstraints);
    return panel;
}
Also used : FontComboBox(com.intellij.ui.FontComboBox)

Example 2 with FontComboBox

use of com.intellij.ui.FontComboBox in project intellij-community by JetBrains.

the class PrintDialog method createHeaderAndFooterPanel.

private JPanel createHeaderAndFooterPanel() {
    //    JPanel panel = createGroupPanel("Header");
    JPanel panel = new JPanel();
    panel.setBorder(BorderFactory.createEmptyBorder(8, 8, 4, 4));
    panel.setLayout(new GridBagLayout());
    GridBagConstraints gbConstraints = new GridBagConstraints();
    gbConstraints.gridy = 0;
    gbConstraints.gridx = 0;
    gbConstraints.gridwidth = 1;
    gbConstraints.gridheight = 1;
    gbConstraints.weightx = 1;
    gbConstraints.fill = GridBagConstraints.BOTH;
    gbConstraints.insets = new Insets(0, 0, 6, 4);
    gbConstraints.gridwidth = 3;
    myLineTextField1 = new MyTextField(30);
    myLinePlacementCombo1 = new ComboBox();
    myLineAlignmentCombo1 = new ComboBox();
    JPanel linePanel1 = createLinePanel(CodeEditorBundle.message("print.header.line.1.label"), myLineTextField1, myLinePlacementCombo1, myLineAlignmentCombo1);
    panel.add(linePanel1, gbConstraints);
    myLineTextField2 = new MyTextField(30);
    myLinePlacementCombo2 = new ComboBox();
    myLineAlignmentCombo2 = new ComboBox();
    JPanel linePanel2 = createLinePanel(CodeEditorBundle.message("print.header.line.2.label"), myLineTextField2, myLinePlacementCombo2, myLineAlignmentCombo2);
    gbConstraints.gridy++;
    panel.add(linePanel2, gbConstraints);
    gbConstraints.insets = new Insets(0, 8, 6, 4);
    gbConstraints.gridy++;
    gbConstraints.gridwidth = 1;
    gbConstraints.gridx = 0;
    panel.add(new MyLabel(CodeEditorBundle.message("print.header.font.label")), gbConstraints);
    myFooterFontNameCombo = new FontComboBox(true);
    gbConstraints.gridx = 1;
    panel.add(myFooterFontNameCombo, gbConstraints);
    myFooterFontSizeCombo = createFontSizesComboBox();
    gbConstraints.gridx = 2;
    panel.add(myFooterFontSizeCombo, gbConstraints);
    return panel;
}
Also used : FontComboBox(com.intellij.ui.FontComboBox) ComboBox(com.intellij.openapi.ui.ComboBox) FontComboBox(com.intellij.ui.FontComboBox)

Aggregations

FontComboBox (com.intellij.ui.FontComboBox)2 ComboBox (com.intellij.openapi.ui.ComboBox)1