Package javax.swing.text

Examples of javax.swing.text.DefaultHighlighter$DefaultHighlightPainter


            newSearch = true;
            resetTextToFind();
        }
        this.results = results;
        // prepare highlighter to show text find with search command
        selection = new DefaultHighlighter();
        painter = new DefaultHighlighter.DefaultHighlightPainter(HILIT_COLOR);
        results.setHighlighter(selection);
    }
View Full Code Here


    if (jTextArea == null) {
      jTextArea = new JTextArea();
      jTextArea.setLineWrap(true);
     
      highlightPainter = new DefaultHighlightPainter(new Color(214, 186, 255));
      highlighter = new DefaultHighlighter();
      jTextArea.setHighlighter(highlighter);
     
      jTextArea.addKeyListener(new java.awt.event.KeyAdapter() {
        public void keyReleased(java.awt.event.KeyEvent e) {
          onTextChange();
View Full Code Here

      jRegExTextArea = new JTextArea();
      jRegExTextArea.setLineWrap(true);
      jRegExTextArea.setRows(3);
      jRegExTextArea.setBackground(new Color(199, 255, 191));
      highlightPainter = new DefaultHighlightPainter(new Color(255, 100, 100));
      highlighter = new DefaultHighlighter();
      jRegExTextArea.setHighlighter(highlighter);
      jRegExTextArea.addKeyListener(new java.awt.event.KeyAdapter() {  
        public void keyReleased(java.awt.event.KeyEvent e) {
          if (!e.isControlDown())
            // Warn the object when a key is being typed
View Full Code Here

            newSearch = true;
            resetTextToFind();
        }
        this.results = results;
        // prepare highlighter to show text find with search command
        selection = new DefaultHighlighter();
        painter = new DefaultHighlighter.DefaultHighlightPainter(HILIT_COLOR);
        results.setHighlighter(selection);
    }
View Full Code Here

    public Frame_Output() {
        initComponents();
        this.setDefaultCloseOperation(Frame_Output.DISPOSE_ON_CLOSE);
        this.setResizable(false);

        hilit = new DefaultHighlighter();
        painter = new DefaultHighlighter.DefaultHighlightPainter(HILIT_COLOR);
        jTextArea1.setHighlighter(hilit);
        jTextField1Bg = jTextField1.getBackground();
        jTextField1.getDocument().addDocumentListener((DocumentListener) this);
    }
View Full Code Here

            Logger.getLogger(Frame_Output.class.getName()).log(Level.SEVERE, null, ex);
        } catch (InterruptedException ex) {
            Logger.getLogger(Frame_Output.class.getName()).log(Level.SEVERE, null, ex);
        }

        hilit = new DefaultHighlighter();
        painter = new DefaultHighlighter.DefaultHighlightPainter(HILIT_COLOR);
        jTextArea1.setHighlighter(hilit);
        jTextField1Bg = jTextField1.getBackground();
        jTextField1.getDocument().addDocumentListener((DocumentListener) this);
    }
View Full Code Here

            Logger.getLogger(Frame_Output.class.getName()).log(Level.SEVERE, null, ex);
        } catch (InterruptedException ex) {
            Logger.getLogger(Frame_Output.class.getName()).log(Level.SEVERE, null, ex);
        }

        hilit = new DefaultHighlighter();
        painter = new DefaultHighlighter.DefaultHighlightPainter(HILIT_COLOR);
        jTextArea1.setHighlighter(hilit);
        jTextField1Bg = jTextField1.getBackground();
        jTextField1.getDocument().addDocumentListener((DocumentListener) this);
    }
View Full Code Here

            newSearch = true;
            resetTextToFind();
        }
        this.results = results;
        // prepare highlighter to show text find with search command
        selection = new DefaultHighlighter();
        painter = new DefaultHighlighter.DefaultHighlightPainter(HILIT_COLOR);
        results.setHighlighter(selection);
    }
View Full Code Here

    _editorPane = new JXEditorPane();
    _editorPane.setEditable(false);
    _editorPane.setDoubleBuffered(true);
    _editorPane.setAutoscrolls(false);
   
    DefaultHighlighter highlighter = new DefaultHighlighter();
    highlighter.setDrawsLayeredHighlights(true);   

    _editorPane.setHighlighter(highlighter);

    JScrollPane scrollPane = new JScrollPane(_editorPane,
        JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,
View Full Code Here

    // Define the search area
    entry = new JTextField(10);
    status = new JLabel("Enter text to search:");

    // Initialise the highlighter on the text area
    hilit = new DefaultHighlighter();
    painter = new DefaultHighlighter.DefaultHighlightPainter(HILIT_COLOR);
    listTextArea.setHighlighter(hilit);

    entryBg = entry.getBackground();
    entry.getDocument().addDocumentListener(this);
View Full Code Here

TOP

Related Classes of javax.swing.text.DefaultHighlighter$DefaultHighlightPainter

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.