public void addMouseListener( MouseAdapter mouseAdapter ) { styledText.addMouseListener( mouseAdapter ); }
inputCmd.addMouseListener(new MouseAdapter() { @Override public void mouseDown(MouseEvent e) { cmdResult.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1)); cmdResult.setEditable(false); cmdResult.addMouseListener(new MouseAdapter() { @Override public void mouseDown(MouseEvent e) {
text.setMenu( menu ); text.addMouseListener( new MouseAdapter() { public void mouseDown( MouseEvent event ) { if ( event.button == 3 ) {
/** * Installs this cursor listener. */ private void install() { if (fTextWidget != null && !fTextWidget.isDisposed()) { fTextWidget.addKeyListener(this); fTextWidget.addMouseListener(this); } }
/** * Installs this cursor listener. */ private void install() { if (fTextWidget != null && !fTextWidget.isDisposed()) { fTextWidget.addKeyListener(this); fTextWidget.addMouseListener(this); } }
private void addListeners() { if (isInputInitialized() == false) { return; } fStyledText.addMouseListener(this); fStyledText.addKeyListener(this); }
protected void addListeners() { if (!hasDetector() || isTextDisposed()) return; fStyledText.addMouseListener(this); fStyledText.addKeyListener(this); }
/** * Adds the selection listener to the text widget underlying the viewer, if * not already done. */ private void ensureSelectionListenerAdded() { if (fSelectionListener == null) { fSelectionListener= new SelectionListener(); StyledText textWidget= fViewer.getTextWidget(); textWidget.addFocusListener(fSelectionListener); textWidget.addKeyListener(fSelectionListener); textWidget.addMouseListener(fSelectionListener); } }
/** * Installs our listener set on the text viewer and the text widget, * respectively. */ private void addListeners() { ISelectionProvider provider= fTextViewer.getSelectionProvider(); provider.addSelectionChangedListener(this); fTextViewer.addTextListener(this); StyledText text= fTextViewer.getTextWidget(); text.addKeyListener(this); text.addMouseListener(this); }
/** * Registers all necessary listeners with the text viewer. */ private void addListeners() { StyledText text= fTextViewer.getTextWidget(); if (text != null) { fKeyAndMouseListener= new KeyAndMouseListener(); text.addMouseListener(fKeyAndMouseListener); text.addKeyListener(fKeyAndMouseListener); fTextInputListener= new TextInputListener(); fTextViewer.addTextInputListener(fTextInputListener); } }
/** * Installs our listener set on the text viewer and the text widget, * respectively. */ private void addListeners() { ISelectionProvider provider= fTextViewer.getSelectionProvider(); provider.addSelectionChangedListener(this); fTextViewer.addTextListener(this); StyledText text= fTextViewer.getTextWidget(); text.addKeyListener(this); text.addMouseListener(this); }
/** * Registers all necessary listeners with the text viewer. */ private void addListeners() { StyledText text= fTextViewer.getTextWidget(); if (text != null) { fKeyAndMouseListener= new KeyAndMouseListener(); text.addMouseListener(fKeyAndMouseListener); text.addKeyListener(fKeyAndMouseListener); fTextInputListener= new TextInputListener(); fTextViewer.addTextInputListener(fTextInputListener); } }
private void addListeners(ITextViewer viewer) { fWidgetEventSource= viewer.getTextWidget(); if (fWidgetEventSource != null) { fWidgetEventSource.addVerifyKeyListener(fEventListener); fWidgetEventSource.addMouseListener(fEventListener); fWidgetEventSource.addFocusListener(fEventListener); } ICommandService commandService= (ICommandService)PlatformUI.getWorkbench().getAdapter(ICommandService.class); if (commandService != null) commandService.addExecutionListener(fEventListener); }
private void addListeners() { fWidgetEventSource= fViewer.getTextWidget(); if (fWidgetEventSource != null) { fWidgetEventSource.addVerifyKeyListener(fEventListener); fWidgetEventSource.addMouseListener(fEventListener); fWidgetEventSource.addFocusListener(fEventListener); } ICommandService commandService= PlatformUI.getWorkbench().getAdapter(ICommandService.class); if (commandService != null) commandService.addExecutionListener(fEventListener); }
private void addListeners(ITextViewer viewer) { fWidgetEventSource= viewer.getTextWidget(); if (fWidgetEventSource != null) { fWidgetEventSource.addVerifyKeyListener(fEventListener); fWidgetEventSource.addMouseListener(fEventListener); fWidgetEventSource.addFocusListener(fEventListener); } ICommandService commandService= PlatformUI.getWorkbench().getAdapter(ICommandService.class); if (commandService != null) commandService.addExecutionListener(fEventListener); }
private void addListeners(ITextViewer viewer) { fWidgetEventSource= viewer.getTextWidget(); if (fWidgetEventSource != null) { fWidgetEventSource.addVerifyKeyListener(fEventListener); fWidgetEventSource.addMouseListener(fEventListener); fWidgetEventSource.addFocusListener(fEventListener); } ICommandService commandService= (ICommandService)PlatformUI.getWorkbench().getAdapter(ICommandService.class); if (commandService != null) commandService.addExecutionListener(fEventListener); }
private void addListeners(ITextViewer viewer) { fWidgetEventSource= viewer.getTextWidget(); if (fWidgetEventSource != null) { fWidgetEventSource.addVerifyKeyListener(fEventListener); fWidgetEventSource.addMouseListener(fEventListener); fWidgetEventSource.addFocusListener(fEventListener); } ICommandService commandService= PlatformUI.getWorkbench().getAdapter(ICommandService.class); if (commandService != null) commandService.addExecutionListener(fEventListener); }
private void addListeners() { fWidgetEventSource= fViewer.getTextWidget(); if (fWidgetEventSource != null) { fWidgetEventSource.addVerifyKeyListener(fEventListener); fWidgetEventSource.addMouseListener(fEventListener); fWidgetEventSource.addFocusListener(fEventListener); } ICommandService commandService= PlatformUI.getWorkbench().getAdapter(ICommandService.class); if (commandService != null) commandService.addExecutionListener(fEventListener); }
@Override public void start(Rectangle subjectArea) { fSubjectArea= subjectArea; fDisplay= fSubjectControl.getDisplay(); if (!fDisplay.isDisposed()) { fDisplay.addFilter(SWT.FocusOut, this); fDisplay.addFilter(SWT.MouseMove, this); fTextViewer.getTextWidget().addKeyListener(this); fTextViewer.getTextWidget().addMouseListener(this); } }
@Override public void start(Rectangle subjectArea) { fSubjectArea= subjectArea; fDisplay= fSubjectControl.getDisplay(); if (!fDisplay.isDisposed()) { fDisplay.addFilter(SWT.FocusOut, this); fDisplay.addFilter(SWT.MouseMove, this); fTextViewer.getTextWidget().addKeyListener(this); fTextViewer.getTextWidget().addMouseListener(this); } }