Package java.awt

Examples of java.awt.Font$FontAccessImpl


    FontMetrics metric = grp.getFontMetrics();
    for (Channel channel : channelArr) {
      String msg = channel.getCopyrightNotice();
      // repeatedly reduce the font size while the copyright notice is wider than the column
      while (metric.stringWidth(msg) > mColumnWidth) {
        Font font = grp.getFont();
        grp.setFont(font.deriveFont((float)(font.getSize()-1)));
        metric = grp.getFontMetrics();
      }
    }
    for (int i = 0; i < channelArr.length; i++) {
      String msg = channelArr[i].getCopyrightNotice();
View Full Code Here


  public Font getDefault() {
    if (mCachedValue == null) {
      // do not use the getAllFontFamilyNames() method as that leads to scanning
      // the system for all font files
      for (String knownFont : KNOWN_GOOD_FONTS) {
        final Font font = new Font(knownFont, mDefFont.getStyle(), mDefFont
            .getSize());
        // comparing the font name and Font.DIALOG is not really correct.
        // font family name would be more precise, but takes too much time
        if (font != null && !font.getName().startsWith(Font.DIALOG)) {
          mCachedValue = font;
          break;
        }
      }
    }
View Full Code Here

      e.paintValue(g, box);
    }
   
    public Dimension getPreferredSize() {

      Font f = this.getFont();
      FontMetrics fm = this.getFontMetrics(f);
      return new Dimension(0, fm.getHeight());
    }
  };
      } catch (Exception ex) {
View Full Code Here

   * box is to be displayed with the histogram/barplot, or false otherwise.
   * P.S: the combo box is always created it just won't be shown if
   * showColouringOption is false.
   */
  public AttributeVisualizationPanel(boolean showColouringOption) {
    this.setFont( new Font("Default", Font.PLAIN, 9) );
    m_fm = this.getFontMetrics( this.getFont() );
    this.setToolTipText("");
    FlowLayout fl= new FlowLayout(FlowLayout.LEFT);
    this.setLayout(fl);
    this.addComponentListener( new ComponentAdapter() {
View Full Code Here

      else {
        m_CapabilitiesBut = null;
      }

      jt.setColumns(30);
      jt.setFont(new Font("SansSerif", Font.PLAIN,12));
      jt.setEditable(false);
      jt.setLineWrap(true);
      jt.setWrapStyleWord(true);
      jt.setText(summary);
            jt.setBackground(getBackground());
View Full Code Here

    final JTextArea textData = new JTextArea(data);
    final JPanel panel = new JPanel();
    panel.setLayout(new FlowLayout(FlowLayout.RIGHT));
    textData.setEditable(false);
    textData.setFont(
        new Font("Monospaced", Font.PLAIN, textData.getFont().getSize()));

    saveButton.setMnemonic('S');
    saveButton.setToolTipText("Saves the output to a file");
    saveButton.addActionListener(new ActionListener(){
      public void actionPerformed(ActionEvent evt){
View Full Code Here

   */
  public ClustererPanel() {

    // Connect / configure the components
    m_OutText.setEditable(false);
    m_OutText.setFont(new Font("Monospaced", Font.PLAIN, 12));
    m_OutText.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
    m_OutText.addMouseListener(new MouseAdapter() {
      public void mouseClicked(MouseEvent e) {
  if ((e.getModifiers() & InputEvent.BUTTON1_MASK)
      != InputEvent.BUTTON1_MASK) {
View Full Code Here

    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

      ProgramInfo.getInstance().setOrder();

      settings.setAntialiasing(mAntiAliasing.isSelected());
      settings.setUserFont(mUserFont.isSelected());

      Font f = mTitleFont.getChosenFont();
      settings.setTitleFontName(f.getFamily());
      settings.setTitleFontSize(f.getSize());
      settings.setTitleFontStyle(f.getStyle());

      f = mBodyFont.getChosenFont();
      settings.setBodyFontName(f.getFamily());
      settings.setBodyFontSize(f.getSize());
      settings.setBodyFontStyle(f.getStyle());

      settings.setLook(mLf[mLook.getSelectedIndex()]);
      ProgramInfo.getInstance().setLook();

      if (mShowFunctions != null) {
View Full Code Here

    configurationHandler.storeSettings(mProperties);
  }

  protected Font getUsedTitleFont() {
    if (getUserFont()) {
      return new Font(getTitleFontName(), getTitleFontStyle(), getTitleFontSize());
    }
    return new Font(DEFAULT_TITLE_FONT_NAME, DEFAULT_TITLE_STYLE, DEFAULT_TITLE_FONT_SIZE);
  }
View Full Code Here

TOP

Related Classes of java.awt.Font$FontAccessImpl

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.