Package javax.swing.text

Examples of javax.swing.text.DefaultCaret


        setEditable(false);
        setRequestFocusEnabled(false);
        setFocusable(false);
        JideSwingUtilities.setComponentTransparent(this);

        setCaret(new DefaultCaret() {
            private static final long serialVersionUID = 1242467463492127346L;

            @Override
            protected void adjustVisibility(Rectangle nloc) {
            }
View Full Code Here


      public void actionPerformed(ActionEvent arg0) {
        textPane.setText("");
      }
    });
    pnlEvntLog.add(btnClearLog);
    DefaultCaret caret = (DefaultCaret)textPane.getCaret();
    caret.setUpdatePolicy(DefaultCaret.ALWAYS_UPDATE);
  }
View Full Code Here

        //getContentPane().add("South", input);
        text.setEditable(false);
        setBackground(text.getBackground());
       
        DefaultCaret c = new DefaultCaret();
        c.setBlinkRate(1000);
       
        text.setCaret(c);
        text.setCaretColor(Color.BLACK);
        c.setVisible(true);
       
        text.setLineWrap(true);

        text.addKeyListener(new KeyAdapter()
            {
View Full Code Here

        panel = new JPanel(new BorderLayout());
        htmlPane = new HtmlPane();
        panel.add(htmlPane);
        htmlPane.setEditorKit(new InternalHTMLEditorKit());
        htmlPane.setFocusCycleRoot(false);
        htmlPane.setCaret(new DefaultCaret() {
            public void mouseDragged(MouseEvent e) {
            }

            public void mouseMoved(MouseEvent e) {
            }
View Full Code Here

    JPanel statusPanel = new JPanel();
    statusPanel.setSize(new Dimension(320, 190));
    statusTextPane = new JTextPane();
    statusTextPane.setEditable(false);
    statusTextPane.setPreferredSize(new Dimension(320, 190));
    DefaultCaret caret = (DefaultCaret)statusTextPane.getCaret();
    caret.setUpdatePolicy(DefaultCaret.ALWAYS_UPDATE);
    JScrollPane scroll = new JScrollPane(statusTextPane);
    scroll.setPreferredSize(new Dimension(320, 190));
    scroll.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
    scroll.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
    statusPanel.add(scroll);
View Full Code Here

        System.setErr(consoleStream);

     GlobalValues.outputPane  =  new JScrollPane(  );
     GlobalValues.outputPane.setViewportView(output);
    
     DefaultCaret caret = (DefaultCaret) output.getCaret();
     caret.setUpdatePolicy(DefaultCaret.NEVER_UPDATE);

       
     }
View Full Code Here

        Dimension d = Toolkit.getDefaultToolkit().getScreenSize();

        textArea = new JTextArea(50, 80);
        textArea.setEditable(false);

        DefaultCaret caret = (DefaultCaret) textArea.getCaret();
        caret.setUpdatePolicy(DefaultCaret.ALWAYS_UPDATE);
        JScrollPane sp = new JScrollPane(textArea);
        sp.setHorizontalScrollBarPolicy(HORIZONTAL_SCROLLBAR_NEVER);
        content.add(sp);

        content.setSize(d.width / 2, 100);
View Full Code Here

        setEditable(false);
        setRequestFocusEnabled(false);
        setFocusable(false);
        JideSwingUtilities.setTextComponentTransparent(this);

        setCaret(new DefaultCaret() {
            private static final long serialVersionUID = 1242467463492127346L;

            @Override
            protected void adjustVisibility(Rectangle nloc) {
            }
View Full Code Here

    //center Panel
    textArea.setEditable(false);
    textArea.setContentType("text/html");
    scrollPane.setViewportView(textArea);
    scrollPane.setBorder(BorderFactory.createEtchedBorder());
    DefaultCaret caret = (DefaultCaret) textArea.getCaret();
    caret.setUpdatePolicy(DefaultCaret.ALWAYS_UPDATE);
    centerPanel.add(scrollPane, BorderLayout.CENTER);
    cp.add(centerPanel, BorderLayout.CENTER);
   
    //bottom Panel
    writeArea.setBorder(BorderFactory.createBevelBorder(BevelBorder.LOWERED));
View Full Code Here

public class MarkdownPane extends javax.swing.JTextPane {

  public void Init() {

    DefaultCaret caret = (DefaultCaret) getCaret();
    caret.setUpdatePolicy(DefaultCaret.NEVER_UPDATE);

    HTMLEditorKit kit = new HTMLEditorKit();
    setEditorKit(kit);

    kit.getStyleSheet().addRule(""
View Full Code Here

TOP

Related Classes of javax.swing.text.DefaultCaret

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.