/** * Gets the text editor component that this caret is bound to. * * @return The <code>RTextArea</code>. */ protected RTextArea getTextArea() { return (RTextArea)getComponent(); }
/** * Overridden to also focus the text component on right mouse clicks. * * @param e The mouse event. */ @Override public void mousePressed(MouseEvent e) { super.mousePressed(e); if (!e.isConsumed() && SwingUtilities.isRightMouseButton(e)) { JTextComponent c = getComponent(); if (c!=null && c.isEnabled() && c.isRequestFocusEnabled()) { c.requestFocusInWindow(); } } }
/** * Gets the text editor component that this caret is bound to. * * @return The <code>RTextArea</code>. */ protected RTextArea getTextArea() { return (RTextArea)getComponent(); }
/** * Gets the text editor component that this caret is bound to. * * @return The <code>RTextArea</code>. */ protected RTextArea getTextArea() { return (RTextArea)getComponent(); }
/** * Gets the text editor component that this caret is bound to. * * @return The <code>RTextArea</code>. */ protected RTextArea getTextArea() { return (RTextArea)getComponent(); }
/** * Overridden to also focus the text component on right mouse clicks. * * @param e The mouse event. */ @Override public void mousePressed(MouseEvent e) { super.mousePressed(e); if (!e.isConsumed() && SwingUtilities.isRightMouseButton(e)) { JTextComponent c = getComponent(); if (c!=null && c.isEnabled() && c.isRequestFocusEnabled()) { c.requestFocusInWindow(); } } }