Package com.iizigo.editor
Class SyntSelectionProvider
java.lang.Object
com.iizigo.editor.SyntSelectionProvider
- All Implemented Interfaces:
- IClipboardSelection,- org.eclipse.jface.viewers.ISelectionProvider
- Direct Known Subclasses:
- SyntSelectionProvider.CCombo,- SyntSelectionProvider.Combo,- SyntSelectionProvider.Spinner,- SyntSelectionProvider.StyledText,- SyntSelectionProvider.Text
public abstract class SyntSelectionProvider extends Object implements org.eclipse.jface.viewers.ISelectionProvider, IClipboardSelection
Class for synthesized selection provider and clipboard selection routines of the Text control.
- Author:
- Christopher Mindus
- Nested Class SummaryNested ClassesModifier and TypeClassDescription- static classClass for Combo widget.- static classClass for Combo widget.- static classClass for Spinner widget: this widget doesn't really support selection in the same world as other text widgets.- static classClass for StyledText widget.- static classClass for Text widget.
- Method SummaryModifier and TypeMethodDescription- protected abstract org.eclipse.swt.graphics.PointGets the selection.- protected abstract void- _setSelection- (int begin, int end) Sets the selection.- void- addSelectionChangedListener- (org.eclipse.jface.viewers.ISelectionChangedListener listener) Adds a listener for selection changes in this selection provider.- boolean- canCopy()Check if Copy is enabled.- boolean- canCut()Check if Cut is enabled.- booleanChecks if Delete is enabled.- boolean- canPaste()Check for paste enabled.- abstract void- copy()Copy.- abstract void- cut()Cut.- void- delete()Delete.- org.eclipse.jface.viewers.ISelectionReturns the current selection for this provider.- protected abstract String- getText()Gets the text.- protected abstract booleanChecks if enabled.- protected booleanChecks if enabled.- abstract void- paste()Pastes text.- void- removeSelectionChangedListener- (org.eclipse.jface.viewers.ISelectionChangedListener listener) Removes the given selection change listener from this selection provider.- voidSelect all.- void- setSelection- (org.eclipse.jface.viewers.ISelection selection) Sets the current selection for this selection provider.- protected abstract voidSets the text.
- Method Details- addSelectionChangedListenerpublic void addSelectionChangedListener- (org.eclipse.jface.viewers.ISelectionChangedListener listener) Adds a listener for selection changes in this selection provider. Has no effect if an identical listener is already registered.- Specified by:
- addSelectionChangedListenerin interface- org.eclipse.jface.viewers.ISelectionProvider
- Parameters:
- listener- a selection changed listener
 
- removeSelectionChangedListenerpublic void removeSelectionChangedListener- (org.eclipse.jface.viewers.ISelectionChangedListener listener) Removes the given selection change listener from this selection provider. Has no effect if an identical listener is not registered.- Specified by:
- removeSelectionChangedListenerin interface- org.eclipse.jface.viewers.ISelectionProvider
- Parameters:
- listener- a selection changed listener
 
- getSelectionpublic org.eclipse.jface.viewers.ISelection getSelection()Returns the current selection for this provider.- Specified by:
- getSelectionin interface- org.eclipse.jface.viewers.ISelectionProvider
- Returns:
- the current selection
 
- setSelectionpublic void setSelection- (org.eclipse.jface.viewers.ISelection selection) Sets the current selection for this selection provider.- Specified by:
- setSelectionin interface- org.eclipse.jface.viewers.ISelectionProvider
- Parameters:
- selection- the new selection
 
- canPastepublic boolean canPaste()Check for paste enabled.- Specified by:
- canPastein interface- IClipboardSelection
 
- canCutpublic boolean canCut()Check if Cut is enabled.- Specified by:
- canCutin interface- IClipboardSelection
 
- canCopypublic boolean canCopy()Check if Copy is enabled.- Specified by:
- canCopyin interface- IClipboardSelection
 
- canDeletepublic boolean canDelete()Checks if Delete is enabled.- Specified by:
- canDeletein interface- IClipboardSelection
 
- deletepublic void delete()Delete.- Specified by:
- deletein interface- IClipboardSelection
 
- selectAllpublic void selectAll()Select all.- Specified by:
- selectAllin interface- IClipboardSelection
 
- isEnabledprotected abstract boolean isEnabled()Checks if enabled.
- getTextGets the text.
- setTextSets the text.
- isPasswordprotected boolean isPassword()Checks if enabled.
- copypublic abstract void copy()Copy.- Specified by:
- copyin interface- IClipboardSelection
 
- cutpublic abstract void cut()Cut.- Specified by:
- cutin interface- IClipboardSelection
 
- pastepublic abstract void paste()Pastes text.- Specified by:
- pastein interface- IClipboardSelection
 
- _setSelectionprotected abstract void _setSelection- (int begin, int end) Sets the selection.
- _getSelectionprotected abstract org.eclipse.swt.graphics.Point _getSelection()Gets the selection.