Package org.fife.ui.rsyntaxtextarea

Examples of org.fife.ui.rsyntaxtextarea.SyntaxScheme




   public Object clone()
   {
      SyntaxScheme shcs = null;
      shcs = (SyntaxScheme) super.clone();

      shcs.styles = new Style[SquirrelTokenMarker.getNumTokenTypes()];
      for (int i = 0; i < SquirrelTokenMarker.getNumTokenTypes(); i++)
      {
View Full Code Here


        setMarkOccurrencesColor(new Color(220, 220, 220));
        setMatchedBracketBGColor(null);
        setMatchedBracketBorderColor(new Color(192, 192, 192));
        getActionMap().put("copy", new RSyntaxTextAreaEditorKit.CopyAsRtfAction());
        Font editorFont = getFont().deriveFont(UIManager.getFont("TextField.font").getSize2D());
        SyntaxScheme syntaxScheme = getSyntaxScheme();
        syntaxScheme.setStyle(Token.SEPARATOR, new Style(new Color(200, 0, 0), null));
        syntaxScheme.setStyle(Token.RESERVED_WORD, new Style(Color.BLUE, null, editorFont));
        setFont(new Font("Monospaced", editorFont.getStyle(), editorFont.getSize()));
        addKeyListener(new KeyAdapter() {
            @Override
            public void keyPressed(KeyEvent e) {
                boolean isControlDown = e.isControlDown();
View Full Code Here

        setupGutterListener(gutter);
    }

    @Override protected void init() {
        setTextAreaFont();
        syntaxScheme = new SyntaxScheme(getFont());
        readPreferences();
        super.init();
    }
View Full Code Here

  CodeArea(CodePanel panel) {
    this.codePanel = panel;
    this.cls = panel.getCls();

    setSyntaxEditingStyle(SyntaxConstants.SYNTAX_STYLE_JAVA);
    SyntaxScheme scheme = getSyntaxScheme();
    scheme.getStyle(Token.FUNCTION).foreground = Color.BLACK;

    setMarkOccurrences(true);
    setBackground(BACKGROUND);
    setAntiAliasingEnabled(true);
    setEditable(false);
View Full Code Here

    mEditor = new RSyntaxTextArea();
    mEditor.setHighlightCurrentLine(false);
    mEditor.setFont(new Font(Font.MONOSPACED, Font.PLAIN, 18));
    mEditor.setRoundedSelectionEdges(false);
    SyntaxScheme syntaxSceheme = mEditor.getDefaultSyntaxScheme();
    syntaxSceheme.setStyle(
      Token.SEPARATOR,
      new Style(Color.BLACK, null));
    syntaxSceheme.setStyle(
      Token.LITERAL_STRING_DOUBLE_QUOTE,
      new Style(new Color(0, 0, 175), null));
    syntaxSceheme.setStyle(
      Token.LITERAL_CHAR,
      new Style(new Color(0, 0, 175), null));
    mEditor.setSyntaxScheme(syntaxSceheme);

    mScrollPane.setViewportView(mEditor);
View Full Code Here

                    textArea.setHighlightCurrentLine(caretIndexInsideEditable);
                    super.paintComponent(g);
                }

            };
            SyntaxScheme def = textArea.getSyntaxScheme();
            def.getStyle(Token.COMMENT_EOL).foreground = Color.lightGray;

//            ((RSyntaxDocument)textArea.getDocument()).setTokenMakerFactory(new AbstractTokenMakerFactory() {
//
//                @Override
//                protected void initTokenMakerMap() {
View Full Code Here

TOP

Related Classes of org.fife.ui.rsyntaxtextarea.SyntaxScheme

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.