Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Eclipse Platform
Release 3.5

org.eclipse.jface.viewers
Class ComboBoxViewerCellEditor


java.lang.Object
  extended by 

org.eclipse.jface.viewers.CellEditor
      extended by 
org.eclipse.jface.viewers.ComboBoxViewerCellEditor

public class ComboBoxViewerCellEditor
extends CellEditor

A cell editor that presents a list of items in a combo box. In contrast to ComboBoxCellEditor it wraps the underlying CCombo using a ComboViewer

Since:
3.4

Nested Class Summary
 
Nested classes/interfaces inherited from class org.eclipse.jface.viewers. CellEditor
CellEditor.LayoutData
 
Field Summary
static int DROP_DOWN_ON_KEY_ACTIVATION
          The list is dropped down when the activation is done through the keyboard
static int DROP_DOWN_ON_MOUSE_ACTIVATION
          The list is dropped down when the activation is done through the mouse
static int DROP_DOWN_ON_PROGRAMMATIC_ACTIVATION
          The list is dropped down when the activation is done without ui-interaction
static int DROP_DOWN_ON_TRAVERSE_ACTIVATION
          The list is dropped down when the activation is done by traversing from cell to cell
 
Fields inherited from class org.eclipse.jface.viewers. CellEditor
COPY, CUT, DELETE, FIND, PASTE, REDO, SELECT_ALL, UNDO
 
Constructor Summary
ComboBoxViewerCellEditor ( Composite parent)
          Creates a new cell editor with a combo viewer and a default style
ComboBoxViewerCellEditor ( Composite parent, int style)
          Creates a new cell editor with a combo viewer and the given style
 
Method Summary
 void activate ( ColumnViewerEditorActivationEvent activationEvent)
          Activate the editor but also inform the editor which event triggered its activation.
protected   Control createControl ( Composite parent)
          Creates the control for this cell editor under the given parent control.
protected   Object doGetValue ()
          The ComboBoxCellEditor implementation of this CellEditor framework method returns the zero-based index of the current selection.
protected  void doSetFocus ()
          Sets the focus to the cell editor's control.
protected  void doSetValue ( Object value)
          Set a new value
protected  void focusLost ()
          Processes a focus lost event that occurred in this cell editor.
  CellEditor.LayoutData getLayoutData ()
          The ComboBoxCellEditor implementation of this CellEditor framework method sets the minimum width of the cell.
  ComboViewer getViewer ()
           
protected  void keyReleaseOccured ( KeyEvent keyEvent)
          Processes a key release event that occurred in this cell editor.
 void setActivationStyle (int activationStyle)
          This method allows to control how the combo reacts when activated
 void setContenProvider ( IStructuredContentProvider provider)
           
 void setInput ( Object input)
           
 void setLabelProvider ( IBaseLabelProvider labelProvider)
           
 
Methods inherited from class org.eclipse.jface.viewers. CellEditor
activate, addListener, addPropertyChangeListener, create, deactivate, deactivate, dependsOnExternalFocusListener, dispose, fireApplyEditorValue, fireCancelEditor, fireEditorValueChanged, fireEnablementChanged, getControl, getDoubleClickTimeout, getErrorMessage, getStyle, getValidator, getValue, isActivated, isCopyEnabled, isCorrect, isCutEnabled, isDeleteEnabled, isDirty, isFindEnabled, isPasteEnabled, isRedoEnabled, isSelectAllEnabled, isUndoEnabled, isValueValid, markDirty, performCopy, performCut, performDelete, performFind, performPaste, performRedo, performSelectAll, performUndo, removeListener, removePropertyChangeListener, setErrorMessage, setFocus, setStyle, setValidator, setValue, setValueValid, valueChanged
 
Methods inherited from class java.lang. Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DROP_DOWN_ON_MOUSE_ACTIVATION

public static final int DROP_DOWN_ON_MOUSE_ACTIVATION
The list is dropped down when the activation is done through the mouse

See Also:
Constant Field Values

DROP_DOWN_ON_KEY_ACTIVATION

public static final int DROP_DOWN_ON_KEY_ACTIVATION
The list is dropped down when the activation is done through the keyboard

See Also:
Constant Field Values

DROP_DOWN_ON_PROGRAMMATIC_ACTIVATION

public static final int DROP_DOWN_ON_PROGRAMMATIC_ACTIVATION
The list is dropped down when the activation is done without ui-interaction

See Also:
Constant Field Values

DROP_DOWN_ON_TRAVERSE_ACTIVATION

public static final int DROP_DOWN_ON_TRAVERSE_ACTIVATION
The list is dropped down when the activation is done by traversing from cell to cell

See Also:
Constant Field Values
Constructor Detail

ComboBoxViewerCellEditor

public ComboBoxViewerCellEditor(
Composite parent)
Creates a new cell editor with a combo viewer and a default style

Parameters:
parent - the parent control

ComboBoxViewerCellEditor

public ComboBoxViewerCellEditor(
Composite parent,
                                int style)
Creates a new cell editor with a combo viewer and the given style

Parameters:
parent - the parent control
style - the style bits
Method Detail

createControl

protected 
Control createControl(
Composite parent)
Description copied from class: CellEditor
Creates the control for this cell editor under the given parent control.

This framework method must be implemented by concrete subclasses.

Specified by:
createControl in class CellEditor
Parameters:
parent - the parent control
Returns:
the new control, or null if this cell editor has no control

doGetValue

protected 
Object doGetValue()
The ComboBoxCellEditor implementation of this CellEditor framework method returns the zero-based index of the current selection.

Specified by:
doGetValue in class CellEditor
Returns:
the zero-based index of the current selection wrapped as an Integer
See Also:
CellEditor.getValue()

doSetFocus

protected void doSetFocus()
Description copied from class: CellEditor
Sets the focus to the cell editor's control.

This framework method must be implemented by concrete subclasses.

Specified by:
doSetFocus in class CellEditor
See Also:
CellEditor.setFocus()

getLayoutData

public 
CellEditor.LayoutData getLayoutData()
The ComboBoxCellEditor implementation of this CellEditor framework method sets the minimum width of the cell. The minimum width is 10 characters if comboBox is not null or disposed eles it is 60 pixels to make sure the arrow button and some text is visible. The list of CCombo will be wide enough to show its longest item.

Overrides:
getLayoutData in class CellEditor
Returns:
the layout data object

doSetValue

protected void doSetValue(
Object value)
Set a new value

Specified by:
doSetValue in class CellEditor
Parameters:
value - the new value
See Also:
CellEditor.setValue(java.lang.Object)

setLabelProvider

public void setLabelProvider(
IBaseLabelProvider labelProvider)
Parameters:
labelProvider - the label provider used
See Also:
StructuredViewer.setLabelProvider(IBaseLabelProvider)

setContenProvider

public void setContenProvider(
IStructuredContentProvider provider)
Parameters:
provider - the content provider used
See Also:
StructuredViewer.setContentProvider(IContentProvider)

setInput

public void setInput(
Object input)
Parameters:
input - the input used
See Also:
StructuredViewer.setInput(Object)

getViewer

public 
ComboViewer getViewer()
Returns:
get the viewer

focusLost

protected void focusLost()
Description copied from class: CellEditor
Processes a focus lost event that occurred in this cell editor.

The default implementation of this framework method applies the current value and deactivates the cell editor. Subclasses should call this method at appropriate times. Subclasses may also extend or reimplement.

Overrides:
focusLost in class CellEditor

keyReleaseOccured

protected void keyReleaseOccured(
KeyEvent keyEvent)
Description copied from class: CellEditor
Processes a key release event that occurred in this cell editor.

The default implementation of this framework method cancels editing when the ESC key is pressed. When the RETURN key is pressed the current value is applied and the cell editor deactivates. Subclasses should call this method at appropriate times. Subclasses may also extend or reimplement.

Overrides:
keyReleaseOccured in class CellEditor
Parameters:
keyEvent - the key event

activate

public void activate(
ColumnViewerEditorActivationEvent activationEvent)
Description copied from class: CellEditor
Activate the editor but also inform the editor which event triggered its activation. The default implementation simply calls CellEditor.activate()

Overrides:
activate in class CellEditor
Parameters:
activationEvent - the editor activation event

setActivationStyle

public void setActivationStyle(int activationStyle)
This method allows to control how the combo reacts when activated

Parameters:
activationStyle - the style used

Eclipse Platform
Release 3.5

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire