Class KlighdLabelWidgetEventHandler
java.lang.Object
edu.umd.cs.piccolo.event.PBasicInputEventHandler
de.cau.cs.kieler.klighd.piccolo.internal.events.KlighdBasicInputEventHandler
de.cau.cs.kieler.klighd.ui.viewers.KlighdLabelWidgetEventHandler
- All Implemented Interfaces:
IKlighdInputEventHandlerEx,edu.umd.cs.piccolo.event.PInputEventListener,EventListener
A dedicated
The text label shall be as smoothly as possible integrated into the diagram meaning that there should be as little as possible additional clicks required in order to select the text (or parts of it) and copy it, for example. This however requires quite some event handling magic like duplicating SWT events.
Update: deactivated the magic code as it doesn't work properly on windows setups
KlighdBasicInputEventHandler in charge of putting the text label widget in
place and updating it.The text label shall be as smoothly as possible integrated into the diagram meaning that there should be as little as possible additional clicks required in order to select the text (or parts of it) and copy it, for example. This however requires quite some event handling magic like duplicating SWT events.
Update: deactivated the magic code as it doesn't work properly on windows setups
- Author:
- chsch
-
Nested Class Summary
Nested classes/interfaces inherited from interface de.cau.cs.kieler.klighd.piccolo.internal.events.IKlighdInputEventHandlerEx
IKlighdInputEventHandlerEx.IKlighdInputEvent -
Constructor Summary
ConstructorsConstructorDescriptionKlighdLabelWidgetEventHandler(PiccoloViewerUI viewer, org.eclipse.swt.custom.StyledText labelWidget) Constructor that just calls super. -
Method Summary
Modifier and TypeMethodDescriptionvoidmouseMoved(edu.umd.cs.piccolo.event.PInputEvent event)
This method triggers the preparation of the text label widget if it's not blocked due to a text selection and the mouse moved over a text figure node, and hides the widget if the mouse moved over a non-text figure and no text selection was defined.voidmousePressed(edu.umd.cs.piccolo.event.PInputEvent event)
This method triggers the preparation of the text label widget if the user clicked on it, regardless whether the widget is blocked due to text selection.voidmouseReleased(edu.umd.cs.piccolo.event.PInputEvent event) Methods inherited from class de.cau.cs.kieler.klighd.piccolo.internal.events.KlighdBasicInputEventHandler
gesture, mouseDoubleClicked, mouseHorizontalWheelRotated, mouseHovered, mouseSingleOrMultiClicked, processEventMethods inherited from class edu.umd.cs.piccolo.event.PBasicInputEventHandler
acceptsEvent, getEventFilter, keyboardFocusGained, keyboardFocusLost, keyPressed, keyReleased, keyTyped, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseWheelRotated, mouseWheelRotatedByBlock, paramString, setEventFilter
-
Constructor Details
-
KlighdLabelWidgetEventHandler
public KlighdLabelWidgetEventHandler(PiccoloViewerUI viewer, org.eclipse.swt.custom.StyledText labelWidget) Constructor that just calls super.- Parameters:
viewer- the employedPiccoloViewerUIlabelWidget- the employed labelWidget
-
-
Method Details
-
mouseMoved
public void mouseMoved(edu.umd.cs.piccolo.event.PInputEvent event)
This method triggers the preparation of the text label widget if it's not blocked due to a text selection and the mouse moved over a text figure node, and hides the widget if the mouse moved over a non-text figure and no text selection was defined.- Overrides:
mouseMovedin classedu.umd.cs.piccolo.event.PBasicInputEventHandler
-
mousePressed
public void mousePressed(edu.umd.cs.piccolo.event.PInputEvent event)
This method triggers the preparation of the text label widget if the user clicked on it, regardless whether the widget is blocked due to text selection.- Overrides:
mousePressedin classedu.umd.cs.piccolo.event.PBasicInputEventHandler
-
mouseReleased
public void mouseReleased(edu.umd.cs.piccolo.event.PInputEvent event) - Overrides:
mouseReleasedin classedu.umd.cs.piccolo.event.PBasicInputEventHandler
-