Class PiccoloViewerUI.LabelTextWidgetListener
java.lang.Object
de.cau.cs.kieler.klighd.ui.viewers.PiccoloViewerUI.LabelTextWidgetListener
- All Implemented Interfaces:
org.eclipse.swt.widgets.Listener
- Enclosing class:
- PiccoloViewerUI
public static class PiccoloViewerUI.LabelTextWidgetListener
extends Object
implements org.eclipse.swt.widgets.Listener
SWT event
Note: This class may be subclassed. However, make sure to call
Listener implementation that is dedicated to the creation and propagation of
KlighdTextSelections after corresponding mouse and key events
notified to the employed label text widget.Note: This class may be subclassed. However, make sure to call
super.handleEvent(event) for the event types distinguished in this
implementation. Make also sure to register your subclass for additional event types if necessary,
see LabelTextWidgetListener(PiccoloViewerUI, StyledText).- Author:
- chsch
-
Constructor Summary
ConstructorsConstructorDescriptionLabelTextWidgetListener(PiccoloViewerUI viewer, org.eclipse.swt.custom.StyledText textLabelWidget) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected KlighdNode.KlighdFigureNode<KText>Provides theKlighdNode.KlighdFigureNodethe label text widget is currently attached to.protected StringvoidhandleEvent(org.eclipse.swt.widgets.Event event) protected voidsetPrevSelection(String prevSelection)
-
Constructor Details
-
LabelTextWidgetListener
public LabelTextWidgetListener(PiccoloViewerUI viewer, org.eclipse.swt.custom.StyledText textLabelWidget) Constructor.- Parameters:
viewer- employed instance ofPiccoloViewerUItextLabelWidget- the employed instance ofStyledText
-
-
Method Details
-
getFigureNode
Provides theKlighdNode.KlighdFigureNodethe label text widget is currently attached to. Make sure to let this method be executed by the UI thread as it relies onWidget#getData().- Returns:
- the desired
KlighdNode.KlighdFigureNode
-
getPrevSelection
- Returns:
- the prevSelection
-
setPrevSelection
- Parameters:
prevSelection- the prevSelection to set
-
handleEvent
public void handleEvent(org.eclipse.swt.widgets.Event event) - Specified by:
handleEventin interfaceorg.eclipse.swt.widgets.Listener
-