Package net.sourceforge.squirrel_sql.fw.gui

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


      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


  void updateFromPreferences()
  {
    synchronized (doclock)
    {
      final FontInfo fi = _session.getProperties().getFontInfo();
      SyntaxStyle style;
      SimpleAttributeSet attribs;

      style = _syntaxPrefs.getColumnStyle();
      attribs = getMyStyle(IConstants.IStyleNames.COLUMN);
View Full Code Here

  /**
   * Create the styles and place them in the hash table.
   */
  private void initStyles()
  {
    final FontInfo fi = _session.getProperties().getFontInfo();

    SyntaxStyle style;
    SimpleAttributeSet attribs;

    // TODO: Do we need this one. */
    attribs = new SimpleAttributeSet();
    StyleConstants.setFontFamily(attribs, fi.getFamily());
    StyleConstants.setFontSize(attribs, fi.getSize());
    StyleConstants.setBackground(attribs, Color.white);
    StyleConstants.setForeground(attribs, Color.black);
    StyleConstants.setBold(attribs, false);
    StyleConstants.setItalic(attribs, false);
    styles.put("body", attribs);

    // TODO: Do we need this one. */
    attribs = new SimpleAttributeSet();
    StyleConstants.setFontFamily(attribs, fi.getFamily());
    StyleConstants.setFontSize(attribs, fi.getSize());
    StyleConstants.setBackground(attribs, Color.white);
    StyleConstants.setForeground(attribs, Color.blue);
    StyleConstants.setBold(attribs, true);
    StyleConstants.setItalic(attribs, false);
    styles.put("tag", attribs);

    // TODO: Do we need this one. */
    attribs = new SimpleAttributeSet();
    StyleConstants.setFontFamily(attribs, fi.getFamily());
    StyleConstants.setFontSize(attribs, fi.getSize());
    StyleConstants.setBackground(attribs, Color.white);
    StyleConstants.setForeground(attribs, Color.blue);
    StyleConstants.setBold(attribs, false);
    StyleConstants.setItalic(attribs, false);
    styles.put("endtag", attribs);

    // TODO: Do we need this one. */
    attribs = new SimpleAttributeSet();
    StyleConstants.setFontFamily(attribs, fi.getFamily());
    StyleConstants.setFontSize(attribs, fi.getSize());
    StyleConstants.setBackground(attribs, Color.white);
    StyleConstants.setForeground(attribs, Color.black);
    StyleConstants.setBold(attribs, false);
    StyleConstants.setItalic(attribs, false);
    styles.put("reference", attribs);

    // TODO: Do we need this one. */
    attribs = new SimpleAttributeSet();
    StyleConstants.setFontFamily(attribs, fi.getFamily());
    StyleConstants.setFontSize(attribs, fi.getSize());
    StyleConstants.setBackground(attribs, Color.white);
    StyleConstants.setForeground(attribs, new Color(0xB03060)/*Color.maroon*/);
    StyleConstants.setBold(attribs, true);
    StyleConstants.setItalic(attribs, false);
    styles.put("name", attribs);

    // TODO: Do we need this one. */
    attribs = new SimpleAttributeSet();
    StyleConstants.setFontFamily(attribs, fi.getFamily());
    StyleConstants.setFontSize(attribs, fi.getSize());
    StyleConstants.setBackground(attribs, Color.white);
    StyleConstants.setForeground(attribs, new Color(0xB03060)/*Color.maroon*/);
    StyleConstants.setBold(attribs, false);
    StyleConstants.setItalic(attribs, true);
    styles.put("value", attribs);

    // TODO: Do we need this one. */
    attribs = new SimpleAttributeSet();
    StyleConstants.setFontFamily(attribs, fi.getFamily());
    StyleConstants.setFontSize(attribs, fi.getSize());
    StyleConstants.setBackground(attribs, Color.white);
    StyleConstants.setForeground(attribs, Color.black);
    StyleConstants.setBold(attribs, true);
    StyleConstants.setItalic(attribs, false);
    styles.put("text", attribs);

    style = _syntaxPrefs.getColumnStyle();
    attribs = new SimpleAttributeSet();
    applyStyle(attribs, style, fi);
    styles.put(IConstants.IStyleNames.COLUMN, attribs);

    style = _syntaxPrefs.getCommentStyle();
    attribs = new SimpleAttributeSet();
    applyStyle(attribs, style, fi);
    styles.put(IConstants.IStyleNames.COMMENT, attribs);

    style = _syntaxPrefs.getDataTypeStyle();
    attribs = new SimpleAttributeSet();
    applyStyle(attribs, style, fi);
    styles.put(IConstants.IStyleNames.DATA_TYPE, attribs);

    style = _syntaxPrefs.getErrorStyle();
    attribs = new SimpleAttributeSet();
    applyStyle(attribs, style, fi);
    styles.put(IConstants.IStyleNames.ERROR, attribs);

    style = _syntaxPrefs.getFunctionStyle();
    attribs = new SimpleAttributeSet();
    applyStyle(attribs, style, fi);
    styles.put(IConstants.IStyleNames.FUNCTION, attribs);

    style = _syntaxPrefs.getIdentifierStyle();
    attribs = new SimpleAttributeSet();
    applyStyle(attribs, style, fi);
    styles.put(IConstants.IStyleNames.IDENTIFIER, attribs);

    style = _syntaxPrefs.getLiteralStyle();
    attribs = new SimpleAttributeSet();
    applyStyle(attribs, style, fi);
    styles.put(IConstants.IStyleNames.LITERAL, attribs);

    style = _syntaxPrefs.getOperatorStyle();
    attribs = new SimpleAttributeSet();
    applyStyle(attribs, style, fi);
    styles.put(IConstants.IStyleNames.OPERATOR, attribs);

    style = _syntaxPrefs.getReservedWordStyle();
    attribs = new SimpleAttributeSet();
    applyStyle(attribs, style, fi);
    styles.put(IConstants.IStyleNames.RESERVED_WORD, attribs);

    style = _syntaxPrefs.getSeparatorStyle();
    attribs = new SimpleAttributeSet();
    applyStyle(attribs, style, fi);
    styles.put(IConstants.IStyleNames.SEPARATOR, attribs);

    style = _syntaxPrefs.getTableStyle();
    attribs = new SimpleAttributeSet();
    applyStyle(attribs, style, fi);
    styles.put(IConstants.IStyleNames.TABLE, attribs);

    style = _syntaxPrefs.getWhiteSpaceStyle();
    attribs = new SimpleAttributeSet();
    applyStyle(attribs, style, fi);
    styles.put(IConstants.IStyleNames.WHITESPACE, attribs);

    // TODO: Do we need this one. */
    attribs = new SimpleAttributeSet();
    StyleConstants.setFontFamily(attribs, fi.getFamily());
    StyleConstants.setFontSize(attribs, fi.getSize());
    StyleConstants.setBackground(attribs, Color.white);
    StyleConstants.setForeground(attribs, new Color(0xA020F0).darker());
    StyleConstants.setBold(attribs, false);
    StyleConstants.setItalic(attribs, false);
    styles.put("preprocessor", attribs);

    // TODO: Do we need this one. */
    attribs = new SimpleAttributeSet();
    StyleConstants.setFontFamily(attribs, fi.getFamily());
    StyleConstants.setFontSize(attribs, fi.getSize());
    StyleConstants.setBackground(attribs, Color.white);
    StyleConstants.setForeground(attribs, Color.orange);
    StyleConstants.setBold(attribs, false);
    StyleConstants.setItalic(attribs, false);
    styles.put("unknown", attribs);
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.