Examples of FontChooserPanel


Examples of org.jfree.ui.FontChooserPanel

    /**
     * Presents a tick label font selection dialog to the user.
     */
    public void attemptTickLabelFontSelection() {

        FontChooserPanel panel = new FontChooserPanel(this.tickLabelFont);
        int result = JOptionPane.showConfirmDialog(this, panel,
            localizationResources.getString("Font_Selection"),
            JOptionPane.OK_CANCEL_OPTION, JOptionPane.PLAIN_MESSAGE);

        if (result == JOptionPane.OK_OPTION) {
            this.tickLabelFont = panel.getSelectedFont();
            this.tickLabelFontField.setText(
                this.tickLabelFont.getFontName() + " "
                + this.tickLabelFont.getSize()
            );
        }
View Full Code Here

Examples of org.jfree.ui.FontChooserPanel

    /**
     * Displays a primitive font chooser dialog to allow the user to change the font.
     */
    private void displayFontDialog() {

        final FontChooserPanel panel = new FontChooserPanel(this.drawStringPanel1.getFont());
        final int result = JOptionPane.showConfirmDialog(this, panel, "Font Selection",
                                                   JOptionPane.OK_CANCEL_OPTION,
                                                   JOptionPane.PLAIN_MESSAGE);

        if (result == JOptionPane.OK_OPTION) {
            this.drawStringPanel1.setFont(panel.getSelectedFont());
            this.drawStringPanel2.setFont(panel.getSelectedFont());
        }

    }
View Full Code Here

Examples of org.jfree.ui.FontChooserPanel

    /**
     * Presents a font selection dialog to the user.
     */
    private void attemptLabelFontSelection() {

        FontChooserPanel panel = new FontChooserPanel(this.labelFont);
        int result = JOptionPane.showConfirmDialog(this, panel,
            localizationResources.getString("Font_Selection"),
            JOptionPane.OK_CANCEL_OPTION, JOptionPane.PLAIN_MESSAGE);

        if (result == JOptionPane.OK_OPTION) {
            this.labelFont = panel.getSelectedFont();
            this.labelFontField.setText(
                this.labelFont.getFontName() + " " + this.labelFont.getSize()
            );
        }

View Full Code Here

Examples of org.jfree.ui.FontChooserPanel

    /**
     * Presents a tick label font selection dialog to the user.
     */
    public void attemptTickLabelFontSelection() {

        FontChooserPanel panel = new FontChooserPanel(this.tickLabelFont);
        int result = JOptionPane.showConfirmDialog(this, panel,
            localizationResources.getString("Font_Selection"),
            JOptionPane.OK_CANCEL_OPTION, JOptionPane.PLAIN_MESSAGE);

        if (result == JOptionPane.OK_OPTION) {
            this.tickLabelFont = panel.getSelectedFont();
            this.tickLabelFontField.setText(
                this.tickLabelFont.getFontName() + " "
                + this.tickLabelFont.getSize()
            );
        }
View Full Code Here

Examples of org.jfree.ui.FontChooserPanel

    /**
     * Presents a font selection dialog to the user.
     */
    public void attemptFontSelection() {

        FontChooserPanel panel = new FontChooserPanel(this.titleFont);
        int result =
            JOptionPane.showConfirmDialog(
                this, panel, localizationResources.getString("Font_Selection"),
                JOptionPane.OK_CANCEL_OPTION, JOptionPane.PLAIN_MESSAGE
            );

        if (result == JOptionPane.OK_OPTION) {
            this.titleFont = panel.getSelectedFont();
            this.fontfield.setText(
                this.titleFont.getFontName() + " " + this.titleFont.getSize()
            );
        }
    }
View Full Code Here

Examples of simtools.ui.FontChooserPanel

    public TextPropertiesPanel(boolean showTransform, String shapeName) {
        super(false, true, true, showTransform, shapeName);
        source = null;
        tfText = new JTextField("");
        fontChooserPanel = new FontChooserPanel(this, simtools.shapes.AbstractShape.FONT_NAMES, tfText);
        dynamicDataPanel = new GridBagPanel(resources.getString("DynamicData"));
        textSizePanel = new GridBagPanel(resources.getString("TextSize"));
       
        // Create contents
        setTextSizePanel();
View Full Code Here

Examples of util.ui.FontChooserPanel

    mAntiAliasing.setSelected(mOldAntiAliasingSelected);

    mUserFont = new JCheckBox(ProgramInfo.mLocalizer.msg("userfont", "Use user fonts"));
    mUserFont.setSelected(mOldUserFontSelected);

    mTitleFont = new FontChooserPanel(null, new Font(mOldTitleFont, mOldTitleStyle, mOldTitleFontSize), true);
    mTitleFont.setBorder(BorderFactory.createEmptyBorder());
//    mTitleFont.setMaximumSize(mTitleFont.getPreferredSize());
    mTitleFont.setAlignmentX(Component.LEFT_ALIGNMENT);

    mBodyFont = new FontChooserPanel(null, new Font(mOldBodyFont, mOldBodyStyle, mOldBodyFontSize), true);
    mBodyFont.setBorder(BorderFactory.createEmptyBorder());
//    mBodyFont.setMaximumSize(mBodyFont.getPreferredSize());
    mBodyFont.setAlignmentX(Component.LEFT_ALIGNMENT);

    mTitleFont.setEnabled(mUserFont.isSelected());
View Full Code Here

Examples of util.ui.FontChooserPanel

   
    mainPanel.add(mUseDefaultFontsCB, cc.xyw(2,7, 4));
       
    mTitleFontLabel = new JLabel(mLocalizer.msg("ProgramTitle", "Program title"));
    mainPanel.add(mTitleFontLabel, cc.xy(3,9));
    mTitleFontPanel = new FontChooserPanel(Settings.propProgramTitleFont.getFont());
    mainPanel.add(mTitleFontPanel, cc.xy(5,9));

    mInfoFontLabel = new JLabel(mLocalizer.msg("ProgramInfo", "Program information"));
    mainPanel.add(mInfoFontLabel, cc.xy(3,11));
    mInfoFontPanel = new FontChooserPanel(Settings.propProgramInfoFont.getFont());
    mainPanel.add(mInfoFontPanel, cc.xy(5,11));

    mChannelNameFontLabel = new JLabel(mLocalizer.msg("ChannelNames", "Channel name"));
    mainPanel.add(mChannelNameFontLabel, cc.xy(3,13));
    mChannelNameFontPanel = new FontChooserPanel(Settings.propChannelNameFont.getFont());
    mainPanel.add(mChannelNameFontPanel, cc.xy(5,13));

    mTimeFontLabel = new JLabel(mLocalizer.msg("Time", "Time"));
    mainPanel.add(mTimeFontLabel, cc.xy(3,15));
    mTimeFontPanel = new FontChooserPanel(Settings.propProgramTimeFont.getFont());
    mainPanel.add(mTimeFontPanel, cc.xy(5,15));

    mUseDefaultFontsCB.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        enableFontFields(!mUseDefaultFontsCB.isSelected());
View Full Code Here

Examples of util.ui.FontChooserPanel

  private void createGUI(final Window parent, final Program program) {
    UiUtilities.registerForClosing(this);
    mDialog.setTitle(mLocalizer.msg("title","Print program info"));

    final OrderChooser fieldChooser = new OrderChooser(ProgramInfoPrintSettings.getInstance().getFieldTypes(),ProgramTextCreator.getDefaultOrder(),true);
    final FontChooserPanel fontChooser = new FontChooserPanel("",ProgramInfoPrintSettings.getInstance().getFont(), false);
    final JCheckBox printImage = new JCheckBox(mLocalizer.msg("printImage","Print image"), ProgramInfoPrintSettings.getInstance().isPrintImage());
    final JCheckBox printPluginIcons = new JCheckBox(mLocalizer.msg("printPluginIcons","Print plugin icons"), ProgramInfoPrintSettings.getInstance().isPrintPluginIcons());
    final PrinterJob printerJob = PrinterJob.getPrinterJob();
    mPageFormat = printerJob.defaultPage();
   
    JButton printerSetupBtn = new JButton(SettingsDialog.mLocalizer.ellipsisMsg("printer","Printer"),PrintPlugin.getInstance().createImageIcon("devices", "printer", 16));
    printerSetupBtn.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        new Thread("Printer setup") {
          public void run() {
            printerJob.printDialog();
          }
        }.start();
      }
    });
   
    JButton pageBtn = new JButton(SettingsDialog.mLocalizer.ellipsisMsg("page","Page"), PrintPlugin.getInstance().createImageIcon("actions", "document-properties", 16));
    pageBtn.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent event) {
        new Thread("Document setup (printing)"){
          public void run(){
            if (mPageFormat == null) {
              mPageFormat = printerJob.defaultPage();
            }
            mPageFormat = printerJob.pageDialog(mPageFormat);
          }
        }.start();
      }
    });
   
    JButton previewBtn = new JButton(SettingsDialog.mLocalizer.ellipsisMsg("preview","Preview"), PrintPlugin.getInstance().createImageIcon("actions", "document-print-preview", 16));
    previewBtn.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        if (mPageFormat == null) {
          mPageFormat = printerJob.defaultPage();
        }
       
        mFieldTypes = fieldChooser.getOrder();
       
        DocumentRenderer printJob = createPrintjob(program, fontChooser, printImage, printPluginIcons);
       
        PreviewDlg dlg = new PreviewDlg(mDialog, printJob, mPageFormat, printJob.getPageCount());
       
        PrintPlugin.getInstance().layoutWindow("previewDlg",dlg);
       
        dlg.setVisible(true);
      }
    });
   
    JButton print = new JButton(SettingsDialog.mLocalizer.msg("print","Drucken"));
    print.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        if (mPageFormat == null) {
          mPageFormat = printerJob.defaultPage();
        }
       
        mFieldTypes = fieldChooser.getOrder();
       
        ProgramInfoPrintSettings.getInstance().setFont(fontChooser.getChosenFont());
        ProgramInfoPrintSettings.getInstance().setFieldTypes(mFieldTypes);
        ProgramInfoPrintSettings.getInstance().setPrintImage(printImage.isSelected());
        ProgramInfoPrintSettings.getInstance().setPrintPluginIcons(printPluginIcons.isSelected());
        close();
       
View Full Code Here

Examples of util.ui.FontChooserPanel

    PanelBuilder pb = new PanelBuilder(layout, content);
    pb.setBorder(Borders.DLU4_BORDER);
   
    pb.addSeparator(mLocalizer.msg("fonts","Fonts"), cc.xyw(1,1,2));
   
    mTitleFontPanel=new FontChooserPanel(mLocalizer.msg("title","Title"), titleFont);
    mDescriptionFontPanel=new FontChooserPanel(mLocalizer.msg("description","Description"), descriptionFont);
    if (dateFont != null) {
      mDateFontPanel = new FontChooserPanel(mLocalizer.msg("date","Date"), dateFont);
    }
   
    int y = 3;
   
    pb.add(mTitleFontPanel, cc.xy(2,y++));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.