Package net.sourceforge.squirrel_sql.plugins.syntax

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


   */
  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

      _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

      _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

  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

    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

TOP

Related Classes of net.sourceforge.squirrel_sql.plugins.syntax.SyntaxStyle

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.