Class MouseNavigator
java.lang.Object
org.eclipse.swt.custom.MouseNavigator
This class add the following behaviour to
StyledText widgets:
When the user clicks on the wheel, a circle with arrows appears. When the user moves the mouse, the StyledText content is scrolled (on the right or on the left for horizontal movements, up or down for vertical movements).
- Since:
- 3.110
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final intprivate static final intprivate final Listenerprivate GCprivate booleanprivate booleanprivate final Listenerprivate final Listenerprivate final Listener(package private) booleanprivate Pointprivate final Listenerprivate final StyledTextprivate Cursor -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintprivate booleanprivate booleanprivate void(package private) voiddispose()private voidprivate voidprivate voidprivate voidprivate voidprivate voidfireSelectionEvent(Event e, ScrollBar bar) private Pointprivate voidprivate voidonFocusOut(Event e) (package private) voidonMouseDown(Event e) private voidonMouseMove(Event e) private voidprivate void
-
Field Details
-
parent
-
gc
-
CIRCLE_RADIUS
private static final int CIRCLE_RADIUS- See Also:
-
CENTRAL_POINT_RADIUS
private static final int CENTRAL_POINT_RADIUS- See Also:
-
originalMouseLocation
-
mouseDownListener
-
mouseUpListener
-
paintListener
-
mouseMoveListener
-
focusOutListener
-
hasHBar
private boolean hasHBar -
hasVBar
private boolean hasVBar -
previousCursor
-
-
Constructor Details
-
MouseNavigator
MouseNavigator(StyledText styledText)
-
-
Method Details
-
onMouseDown
-
initBarState
private void initBarState() -
computeHasHorizontalBar
private boolean computeHasHorizontalBar() -
computeHasVerticalBar
private boolean computeHasVerticalBar() -
onMouseUp
-
computeDist
public int computeDist() -
deactivate
private void deactivate() -
onFocusOut
-
onMouseMove
-
fireSelectionEvent
-
getMouseLocation
-
onPaint
-
drawCircle
private void drawCircle() -
drawCentralPoint
private void drawCentralPoint() -
drawArrows
private void drawArrows() -
drawHorizontalArrows
private void drawHorizontalArrows() -
drawVerticalArrows
private void drawVerticalArrows() -
dispose
void dispose()
-