Package util.ui

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


   
    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

  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

    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

Related Classes of util.ui.FontChooserPanel

Copyright © 2018 www.massapicom. 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.