Java Code Examples for org.eclipse.swt.custom.StyledText#removeVerifyKeyListener()

The following examples show how to use org.eclipse.swt.custom.StyledText#removeVerifyKeyListener() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ContentAssistSubjectControlAdapter.java    From APICloud-Studio with GNU General Public License v3.0 6 votes vote down vote up
/**
 * @see org.eclipse.jface.contentassist.IContentAssistSubjectControl#removeVerifyKeyListener(org.eclipse.swt.custom.VerifyKeyListener)
 */
public void removeVerifyKeyListener(VerifyKeyListener verifyKeyListener)
{
	if (fContentAssistSubjectControl != null)
	{
		fContentAssistSubjectControl.removeVerifyKeyListener(verifyKeyListener);
	}
	else if (fViewer instanceof ITextViewerExtension)
	{
		ITextViewerExtension extension = (ITextViewerExtension) fViewer;
		extension.removeVerifyKeyListener(verifyKeyListener);
	}
	else
	{
		StyledText textWidget = fViewer.getTextWidget();
		if (Helper.okToUse(textWidget))
		{
			textWidget.removeVerifyKeyListener(verifyKeyListener);
		}
	}
}
 
Example 2
Source File: StyledTextCellEditor.java    From translationstudio8 with GNU General Public License v2.0 6 votes vote down vote up
@Override
protected void setupReadOnlyMode() {
	checkWidget();

	StyledText text = viewer.getTextWidget();
	if (!close) {
		if (!editable) {
			return;
		}
		text.removeVerifyKeyListener(edit_VerifyKey);
		text.removeTraverseListener(edit_Traverse);
	}
	editable = false;
	text.setEditable(false);
	text.addVerifyKeyListener(readOnly_VerifyKey);
}
 
Example 3
Source File: StyledTextCellEditor.java    From translationstudio8 with GNU General Public License v2.0 6 votes vote down vote up
@Override
protected void setupEditMode() {
	checkWidget();

	StyledText text = viewer.getTextWidget();
	if (!close) {
		if (editable) {
			return;
		}
		text.removeVerifyKeyListener(readOnly_VerifyKey);
	}
	editable = true;
	text.setEditable(true);
	text.addVerifyKeyListener(edit_VerifyKey);
	text.addTraverseListener(edit_Traverse);
}
 
Example 4
Source File: StyledTextCellEditor.java    From tmxeditor8 with GNU General Public License v2.0 6 votes vote down vote up
@Override
protected void setupReadOnlyMode() {
	checkWidget();

	StyledText text = viewer.getTextWidget();
	if (!close) {
		if (!editable) {
			return;
		}
		text.removeVerifyKeyListener(edit_VerifyKey);
		text.removeTraverseListener(edit_Traverse);
	}
	editable = false;
	text.setEditable(false);
	text.addVerifyKeyListener(readOnly_VerifyKey);
}
 
Example 5
Source File: StyledTextCellEditor.java    From tmxeditor8 with GNU General Public License v2.0 6 votes vote down vote up
@Override
protected void setupEditMode() {
	checkWidget();

	StyledText text = viewer.getTextWidget();
	if (!close) {
		if (editable) {
			return;
		}
		text.removeVerifyKeyListener(readOnly_VerifyKey);
	}
	editable = true;
	text.setEditable(true);
	text.addVerifyKeyListener(edit_VerifyKey);
	text.addTraverseListener(edit_Traverse);
}
 
Example 6
Source File: OfflineActionTarget.java    From Pydev with Eclipse Public License 1.0 5 votes vote down vote up
/**
 * Uninstalls itself. I.e. removes all listeners installed in <code>install</code>.
 */
private void uninstall() {
    synchronized (lock) {
        if (!fInstalled) {
            return;
        }
        fTextViewer.removeTextListener(this);

        ISelectionProvider selectionProvider = fTextViewer.getSelectionProvider();
        if (selectionProvider != null)
            selectionProvider.removeSelectionChangedListener(this);

        StyledText text = fTextViewer.getTextWidget();
        if (text != null) {
            text.removeMouseListener(this);
            text.removeFocusListener(this);
        }

        if (fTextViewer instanceof ITextViewerExtension) {
            ((ITextViewerExtension) fTextViewer).removeVerifyKeyListener(this);

        } else {
            if (text != null)
                text.removeVerifyKeyListener(this);
        }

        if (keyAssistDialog != null) {
            keyAssistDialog.close();
        }
        keyAssistDialog = null;
        fInstalled = false;
    }
}