Package net.sourceforge.squirrel_sql.fw.gui

Examples of net.sourceforge.squirrel_sql.fw.gui.FontInfo


   public void setFontInfo(FontInfo data)
   {
      if (_fi == null || !_fi.equals(data))
      {
         final FontInfo oldValue = _fi;
         _fi = data != null ? data : (FontInfo)DEFAULT_FONT_INFO.clone();
         getPropertyChangeReporter().firePropertyChange(
                           IPropertyNames.FONT_INFO, oldValue, _fi);
      }
   }
View Full Code Here


      _limitSQLResultTabsChk.setSelected(props.getLimitSQLResultTabs());
      _limitSQLResultTabsField.setInt(props.getSqlResultTabLimit());

      _showResultsMetaChk.setSelected(props.getShowResultsMetaData());

      FontInfo fi = props.getFontInfo();
      if (fi == null)
      {
        fi = new FontInfo(UIManager.getFont("TextArea.font"));
      }
      _fontLbl.setText(fi.toString());
      _fontBtn.setSelectedFont(fi.createFont());

      updateControlStatus();
    }
View Full Code Here

      void setSelectedFont(Font font)
      {
        _font = font;
        if (_fi == null)
        {
          _fi = new FontInfo(font);
        }
        else
        {
          _fi.setFont(font);
        }
View Full Code Here

      public void actionPerformed(ActionEvent evt)
      {
        if (evt.getSource() instanceof FontButton)
        {
          FontButton btn = (FontButton) evt.getSource();
          FontInfo fi = btn.getFontInfo();
          Font font = null;
          if (fi != null)
          {
            font = fi.createFont();
          }
          font = new FontChooser().showDialog(font);
          if (font != null)
          {
            btn.setSelectedFont(font);
            btn._lbl.setText(new FontInfo(font).toString());
          }
        }
      }
View Full Code Here

  public FontInfoStore()
  {
      Font tmp = (Font)UIManager.get("Label.font");
      if (tmp != null) {
          Font font = tmp.deriveFont(10.0f);
          _statusBarFontInfo = new FontInfo(font);         
      }
  }
View Full Code Here

   private static class MyTextArea extends JTextArea
  {
    private MyTextArea(ISession session)
    {
      SessionProperties props = session.getProperties();
      final FontInfo fi = props.getFontInfo();
      if (fi != null)
      {
        this.setFont(props.getFontInfo().createFont());
      }
    }
View Full Code Here

      _nbrRows.setInt(props.getSQLNbrRowsToShow());
    }

    if (propName == null || propName.equals(SessionProperties.IPropertyNames.FONT_INFO))
    {
      FontInfo fi = props.getFontInfo();
      if (fi != null)
      {
        _sqlEntry.setFont(fi.createFont());
      }
    }

    if (propName == null || propName.equals(SessionProperties.IPropertyNames.SQL_ENTRY_HISTORY_SIZE)
              || propName.equals(SessionProperties.IPropertyNames.LIMIT_SQL_ENTRY_HISTORY_SIZE))
View Full Code Here

   * Update the applications fonts.
   */
  void updateApplicationFonts()
  {
    final LAFPreferences prefs = _plugin.getLAFPreferences();
    FontInfo fi = prefs.getMenuFontInfo();
    String[] keys = FONT_KEYS[FONT_KEYS_ARRAY_MENU];
    for (int i = 0; i < keys.length; ++i)
    {
      if (prefs.isMenuFontEnabled())
      {
        if (fi != null)
        {
          UIManager.put(keys[i], fi.createFont());
        }
      }
      else
      {
        UIManager.put(keys[i], _origUIDefaults.getFont(keys[i]));
      }
    }
    fi = prefs.getStaticFontInfo();
    keys = FONT_KEYS[FONT_KEYS_ARRAY_STATIC];
    for (int i = 0; i < keys.length; ++i)
    {
      if (prefs.isStaticFontEnabled())
      {
        if (fi != null)
        {
          UIManager.put(keys[i], fi.createFont());
        }
      }
      else
      {
        UIManager.put(keys[i], _origUIDefaults.getFont(keys[i]));
      }
    }
    fi = prefs.getOtherFontInfo();
    keys = FONT_KEYS[FONT_KEYS_ARRAY_OTHER];
    for (int i = 0; i < keys.length; ++i)
    {
      if (prefs.isOtherFontEnabled())
      {
        if (fi != null)
        {
          UIManager.put(keys[i], fi.createFont());
        }
      }
      else
      {
        UIManager.put(keys[i], _origUIDefaults.getFont(keys[i]));
View Full Code Here

      _staticFontEnabledChk.setSelected(_prefs.isStaticFontEnabled());
      _statusBarFontEnabledChk.setSelected(
        _prefs.isStatusBarFontEnabled());
      _otherFontEnabledChk.setSelected(_prefs.isOtherFontEnabled());

      FontInfo fi = _prefs.getMenuFontInfo();
      _menuFontLbl.setText(fi != null ? fi.toString() : "");
      fi = _prefs.getStaticFontInfo();
      _staticFontLbl.setText(fi != null ? fi.toString() : "");
      fi = _prefs.getStatusBarFontInfo();
      _statusBarFontLbl.setText(fi != null ? fi.toString() : "");
      fi = _prefs.getOtherFontInfo();
      _otherFontLbl.setText(fi != null ? fi.toString() : "");

      _menuFontBtn.setEnabled(_prefs.isMenuFontEnabled());
      _staticFontBtn.setEnabled(_prefs.isStaticFontEnabled());
      _statusBarFontBtn.setEnabled(_prefs.isStatusBarFontEnabled());
      _otherFontBtn.setEnabled(_prefs.isOtherFontEnabled());
View Full Code Here

      void setSelectedFont(Font font)
      {
        _font = font;
        if (_fi == null)
        {
          _fi = new FontInfo(font);
        }
        else
        {
          _fi.setFont(font);
        }
View Full Code Here

TOP

Related Classes of net.sourceforge.squirrel_sql.fw.gui.FontInfo

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.