Examples of SyntaxStyle


Examples of net.sourceforge.squirrel_sql.plugins.syntax.SyntaxStyle

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

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

Examples of net.sourceforge.squirrel_sql.plugins.syntax.SyntaxStyle

   */
  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());
View Full Code Here

Examples of net.sourceforge.squirrel_sql.plugins.syntax.SyntaxStyle

      _list = list;
    }

    public void actionPerformed(ActionEvent evt)
    {
      final SyntaxStyle style = _list.getSelectedSyntaxStyle();
      final int origRGB = style.getTextRGB();
      final Color color = JColorChooser.showDialog(null,
        //i18n[syntax.selColor=Select Color]
                        s_stringMgr.getString("syntax.selColor"), new Color(origRGB));
      if (color != null)
      {
        style.setTextRGB(color.getRGB());
      }
    }
View Full Code Here

Examples of net.sourceforge.squirrel_sql.plugins.syntax.SyntaxStyle

      _list = list;
    }

    public void actionPerformed(ActionEvent evt)
    {
      final SyntaxStyle style = _list.getSelectedSyntaxStyle();
      final int origRGB = style.getBackgroundRGB();
      final Color color = JColorChooser.showDialog(null,
        //i18n[syntax.selColor2=Select Color]
                        s_stringMgr.getString("syntax.selColor2"), new Color(origRGB));
      if (color != null)
      {
        style.setBackgroundRGB(color.getRGB());
      }

    }
View Full Code Here

Examples of net.sourceforge.squirrel_sql.plugins.syntax.SyntaxStyle

  public void loadData(SyntaxPreferences prefs)
  {
    removeAll();

    _styles[IStylesListIndices.COLUMNS] = new SyntaxStyle(prefs.getColumnStyle());
    _styles[IStylesListIndices.COMMENTS] = new SyntaxStyle(prefs.getCommentStyle());
    _styles[IStylesListIndices.DATA_TYPES] = new SyntaxStyle(prefs.getDataTypeStyle());
    _styles[IStylesListIndices.ERRORS] = new SyntaxStyle(prefs.getErrorStyle());
    _styles[IStylesListIndices.FUNCTIONS] = new SyntaxStyle(prefs.getFunctionStyle());
    _styles[IStylesListIndices.IDENTIFIERS] = new SyntaxStyle(prefs.getIdentifierStyle());
    _styles[IStylesListIndices.LITERALS] = new SyntaxStyle(prefs.getLiteralStyle());
    _styles[IStylesListIndices.OPERATORS] = new SyntaxStyle(prefs.getOperatorStyle());
    _styles[IStylesListIndices.RESERVED_WORDS] = new SyntaxStyle(prefs.getReservedWordStyle());
    _styles[IStylesListIndices.SEPARATORS] = new SyntaxStyle(prefs.getSeparatorStyle());
    _styles[IStylesListIndices.TABLES] = new SyntaxStyle(prefs.getTableStyle());
    _styles[IStylesListIndices.WHITE_SPACE] = new SyntaxStyle(prefs.getWhiteSpaceStyle());

    final DefaultListModel model = (DefaultListModel)getModel();
    for (int i = 0; i < _styles.length; ++i)
    {
      model.addElement(_styles[i]);
View Full Code Here

Examples of net.sourceforge.squirrel_sql.plugins.syntax.SyntaxStyle

    public Component getListCellRendererComponent(JList list,
                                   Object value, int idx, boolean isSelected,
                                   boolean cellHasFocus)
    {
      final SyntaxStyle style = (SyntaxStyle)value;
      setForeground(new Color(style.getTextRGB()));
      setBackground(new Color(style.getBackgroundRGB()));

//TODO:      setFont(style.createStyledFont(getFont()));
      setText(s_styleTitles[idx]);

      if (isSelected)
View Full Code Here

Examples of org.gjt.sp.jedit.syntax.SyntaxStyle

      }
      else
        throw new IllegalArgumentException(
          "Invalid directive: " + s);
    }
    return new SyntaxStyle(fgColor,bgColor,
      new Font(family,
      (italic ? Font.ITALIC : 0) | (bold ? Font.BOLD : 0),
      size));
  } //}}}
View Full Code Here

Examples of org.jedit.syntax.SyntaxStyle

   
    if("XML".equals(mode))
      {setTokenMarker(new XMLTokenMarker());}
    final TextAreaPainter painter = getPainter();
    final SyntaxStyle[] styles = painter.getStyles();
    styles[Token.KEYWORD1] = new SyntaxStyle(new Color(0, 102, 153), false, true);
    styles[Token.KEYWORD2] = new SyntaxStyle(new Color(0, 153, 102), false, true);
    styles[Token.KEYWORD3] = new SyntaxStyle(new Color(0, 153, 255), false, true);
    styles[Token.LITERAL1] = new SyntaxStyle(new Color(255, 0, 204), false, false);
    styles[Token.LITERAL2] = new SyntaxStyle(new Color(204, 0, 204), false, false);
    painter.setStyles(styles);
    painter.setEOLMarkersPainted(true);
    painter.setBracketHighlightEnabled(true);
  }
View Full Code Here

Examples of org.syntax.jedit.SyntaxStyle

  public SyntaxStyle[] createXmlStyles()
  {
    SyntaxStyle[] styles = new SyntaxStyle[Token.ID_COUNT];

    styles[Token.COMMENT1] = new SyntaxStyle( Color.black, true, false );
    styles[Token.COMMENT2] = new SyntaxStyle( new Color( 0x990033 ), true, false );
    styles[Token.KEYWORD1] = new SyntaxStyle( Color.blue, false, false );
    styles[Token.KEYWORD2] = new SyntaxStyle( Color.magenta, false, false );
    styles[Token.KEYWORD3] = new SyntaxStyle( new Color( 0x009600 ), false, false );
    styles[Token.LITERAL1] = new SyntaxStyle( new Color( 0x650099 ), false, false );
    styles[Token.LITERAL2] = new SyntaxStyle( new Color( 0x650099 ), false, true );
    styles[Token.LABEL] = new SyntaxStyle( new Color( 0x990033 ), false, true );
    styles[Token.OPERATOR] = new SyntaxStyle( Color.black, false, true );
    styles[Token.INVALID] = new SyntaxStyle( Color.red, false, true );

    return styles;
  }
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.