protected class DragDropPlugin.DragCaret extends BasicCaret
DragCaret class extends the editor caret
implementation to support the initiation of dragging without
moving the cursor.BasicCaret.MiddleButtonBehaviorCARET_BLINK_RATE, CARET_COLOR, CARET_DOUBLE_UNDER_BAR, CARET_DOUBLE_VERTICAL_BAR, CARET_EDITOR_SELECTION_COLUMNS, CARET_EDITOR_SELECTION_TYPE, CARET_EDITOR_SELECTION_WRAP, CARET_ENABLE_BLINK, CARET_OUTLINE_BOX, CARET_QUAD_UNDER_BAR, CARET_QUAD_VERTICAL_BAR, CARET_RIGHT_CLICK_SELECTION, CARET_SHAPE_INSERT, CARET_SHAPE_OVERWRITE, CARET_SOLID_BOX, CARET_TRIPLE_UNDER_BAR, CARET_TRIPLE_VERTICAL_BAR, CARET_UNDER_BAR, CARET_VERTICAL_BAR, CARET_XOR_PAINTING, HIGHLIGHT_SELECTION_NAME, lastClickCount, lastClickOffset| Modifier | Constructor and Description |
|---|---|
protected |
DragCaret() |
| Modifier and Type | Method and Description |
|---|---|
void |
focusGained(java.awt.event.FocusEvent event)
Called when the component containing the caret gains
focus.
|
boolean |
isVisible()
Determines if the caret is currently visible.
|
void |
mouseClicked(java.awt.event.MouseEvent event)
Called when the mouse is clicked.
|
void |
mouseDragged(java.awt.event.MouseEvent event)
Invoked when the mouse button has been pressed and dragged.
|
void |
mousePressed(java.awt.event.MouseEvent event)
Invoked when a mouse button has been pressed on a component.
|
void |
mouseReleased(java.awt.event.MouseEvent event)
Invoked when a mouse button has been released on a component.
|
protected boolean |
offsetInSelection(int offset)
Utility method to check if the given offset is in the selection.
|
adjustCaretPosition, adjustVisibility, damage, deinstall, fireStateChanged, getActionInvoker, getBlinkRate, getCaretInsets, getEditorSelection, getInsertMode, getOffsetForMouseEvent, getSelection, install, isPressInSelection, moveCaret, moveDot, paint, positionCaret, propertyChange, setBlinkRate, setDot, setEditorSelection, setInsertMode, setVisible, toggleInsertMode, updateHighlightaddChangeListener, equals, focusLost, getChangeListeners, getComponent, getDot, getDotBias, getListeners, getMagicCaretPosition, getMark, getMarkBias, getSelectionPainter, getUpdatePolicy, isActive, isSelectionVisible, mouseEntered, mouseExited, mouseMoved, moveDot, removeChangeListener, repaint, setDot, setMagicCaretPosition, setSelectionVisible, setUpdatePolicy, toStringadd, add, add, contains, contains, contains, contains, createIntersection, createUnion, getBounds, getBounds2D, getHeight, getLocation, getSize, getWidth, getX, getY, grow, inside, intersection, intersects, isEmpty, move, outcode, reshape, resize, setBounds, setBounds, setLocation, setLocation, setRect, setSize, setSize, translate, unionadd, add, add, contains, contains, getPathIterator, getPathIterator, hashCode, intersect, intersects, intersectsLine, intersectsLine, outcode, setFrame, setRect, unionclone, contains, contains, getCenterX, getCenterY, getFrame, getMaxX, getMaxY, getMinX, getMinY, intersects, setFrame, setFrame, setFrameFromCenter, setFrameFromCenter, setFrameFromDiagonal, setFrameFromDiagonalpublic void focusGained(java.awt.event.FocusEvent event)
focusGained in interface java.awt.event.FocusListenerfocusGained in class BasicCarete - the focus eventFocusListener#focusGainedpublic void mouseClicked(java.awt.event.MouseEvent event)
mouseClicked in interface java.awt.event.MouseListenermouseClicked in class BasicCaretevent - the mouse eventMouseListener.mouseClicked(java.awt.event.MouseEvent)public void mouseDragged(java.awt.event.MouseEvent event)
mouseDragged in interface java.awt.event.MouseMotionListenermouseDragged in class BasicCaretevent - the mouse drag eventpublic void mousePressed(java.awt.event.MouseEvent event)
mousePressed in interface java.awt.event.MouseListenermousePressed in class BasicCaretevent - the mouse event that occurredprotected boolean offsetInSelection(int offset)
offset - the offset to checkpublic void mouseReleased(java.awt.event.MouseEvent event)
mouseReleased in interface java.awt.event.MouseListenermouseReleased in class BasicCaretevent - the mouse event that occurredpublic boolean isVisible()
isVisible in interface javax.swing.text.CaretisVisible in class javax.swing.text.DefaultCaret