protected class DragDropPlugin.DragCaret extends BasicCaret
DragCaret
class extends the editor caret
implementation to support the initiation of dragging without
moving the cursor.BasicCaret.MiddleButtonBehavior
CARET_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 |
DragDropPlugin.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, getCaretInsets, getEditorSelection, getInsertMode, getOffsetForMouseEvent, install, isPressInSelection, moveCaret, moveDot, paint, positionCaret, propertyChange, setDot, setEditorSelection, setInsertMode, toggleInsertMode, updateHighlight
addChangeListener, equals, focusLost, getBlinkRate, getChangeListeners, getComponent, getDot, getDotBias, getListeners, getMagicCaretPosition, getMark, getMarkBias, getSelectionPainter, getUpdatePolicy, isActive, isSelectionVisible, mouseEntered, mouseExited, mouseMoved, moveDot, removeChangeListener, repaint, setBlinkRate, setDot, setMagicCaretPosition, setSelectionVisible, setUpdatePolicy, setVisible, toString
add, 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, union
add, add, add, contains, contains, getPathIterator, getPathIterator, hashCode, intersect, intersects, intersectsLine, intersectsLine, outcode, setFrame, setRect, union
clone, contains, contains, getCenterX, getCenterY, getFrame, getMaxX, getMaxY, getMinX, getMinY, intersects, setFrame, setFrame, setFrameFromCenter, setFrameFromCenter, setFrameFromDiagonal, setFrameFromDiagonal
public void focusGained(java.awt.event.FocusEvent event)
focusGained
in interface java.awt.event.FocusListener
focusGained
in class BasicCaret
e
- the focus eventFocusListener#focusGained
public void mouseClicked(java.awt.event.MouseEvent event)
mouseClicked
in interface java.awt.event.MouseListener
mouseClicked
in class BasicCaret
event
- the mouse eventMouseListener.mouseClicked(java.awt.event.MouseEvent)
public void mouseDragged(java.awt.event.MouseEvent event)
mouseDragged
in interface java.awt.event.MouseMotionListener
mouseDragged
in class BasicCaret
event
- the mouse drag eventpublic void mousePressed(java.awt.event.MouseEvent event)
mousePressed
in interface java.awt.event.MouseListener
mousePressed
in class BasicCaret
event
- 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.MouseListener
mouseReleased
in class BasicCaret
event
- the mouse event that occurredpublic boolean isVisible()
isVisible
in interface javax.swing.text.Caret
isVisible
in class javax.swing.text.DefaultCaret