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 java.lang.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 Summary- Nested Classes - Modifier and Type - Class - Description - static class- SyntSelectionProvider.CComboClass for Combo widget.- static class- SyntSelectionProvider.ComboClass for Combo widget.- static class- SyntSelectionProvider.SpinnerClass for Spinner widget: this widget doesn't really support selection in the same world as other text widgets.- static class- SyntSelectionProvider.StyledTextClass for StyledText widget.- static class- SyntSelectionProvider.TextClass for Text widget.
 - Method Summary- All Methods Instance Methods Abstract Methods Concrete Methods - Modifier and Type - Method - Description - protected abstract org.eclipse.swt.graphics.Point- _getSelection()Gets 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.- boolean- canDelete()Checks 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.ISelection- getSelection()Returns the current selection for this provider.- protected abstract java.lang.String- getText()Gets the text.- protected abstract boolean- isEnabled()Checks if enabled.- protected boolean- isPassword()Checks 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.- void- selectAll()Select all.- void- setSelection(org.eclipse.jface.viewers.ISelection selection)Sets the current selection for this selection provider.- protected abstract void- setText(java.lang.String s)Sets the text.
 
- Method Detail- addSelectionChangedListener- public 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
 
 - removeSelectionChangedListener- public 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
 
 - getSelection- public 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
 
 - setSelection- public 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
 
 - canPaste- public boolean canPaste() Check for paste enabled.- Specified by:
- canPastein interface- IClipboardSelection
 
 - canCut- public boolean canCut() Check if Cut is enabled.- Specified by:
- canCutin interface- IClipboardSelection
 
 - canCopy- public boolean canCopy() Check if Copy is enabled.- Specified by:
- canCopyin interface- IClipboardSelection
 
 - canDelete- public boolean canDelete() Checks if Delete is enabled.- Specified by:
- canDeletein interface- IClipboardSelection
 
 - delete- public void delete() Delete.- Specified by:
- deletein interface- IClipboardSelection
 
 - selectAll- public void selectAll() Select all.- Specified by:
- selectAllin interface- IClipboardSelection
 
 - isEnabled- protected abstract boolean isEnabled() Checks if enabled.
 - getText- protected abstract java.lang.String getText() Gets the text.
 - setText- protected abstract void setText(java.lang.String s) Sets the text.
 - isPassword- protected boolean isPassword() Checks if enabled.
 - copy- public abstract void copy() Copy.- Specified by:
- copyin interface- IClipboardSelection
 
 - cut- public abstract void cut() Cut.- Specified by:
- cutin interface- IClipboardSelection
 
 - paste- public abstract void paste() Pastes text.- Specified by:
- pastein interface- IClipboardSelection
 
 - _setSelection- protected abstract void _setSelection(int begin, int end)Sets the selection.
 - _getSelection- protected abstract org.eclipse.swt.graphics.Point _getSelection() Gets the selection.