Java Doc for CellEditor.java in  » IDE-Eclipse » jface » org » eclipse » jface » viewers » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » IDE Eclipse » jface » org.eclipse.jface.viewers 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.eclipse.jface.viewers.CellEditor

All known Subclasses:   org.eclipse.jface.viewers.TextCellEditor,  org.eclipse.jface.viewers.CheckboxCellEditor,  org.eclipse.jface.viewers.ComboBoxCellEditor,  org.eclipse.jface.viewers.DialogCellEditor,
CellEditor
abstract public class CellEditor (Code)
Abstract base class for cell editors. Implements property change listener handling, and SWT window management.

Subclasses implement particular kinds of cell editors. This package contains various specialized cell editors:

  • TextCellEditor - for simple text strings
  • ColorCellEditor - for colors
  • ComboBoxCellEditor - value selected from drop-down combo box
  • CheckboxCellEditor - boolean valued checkbox
  • DialogCellEditor - value from arbitrary dialog


Inner Class :public static class LayoutData

Field Summary
final public static  StringCOPY
    
final public static  StringCUT
    
final public static  StringDELETE
    
final public static  StringFIND
    
final public static  StringPASTE
    
final public static  StringREDO
    
final public static  StringSELECT_ALL
    
final public static  StringUNDO
    

Constructor Summary
protected  CellEditor()
     Creates a new cell editor with no control The cell editor has no cell validator.
protected  CellEditor(Composite parent)
     Creates a new cell editor under the given parent control.
protected  CellEditor(Composite parent, int style)
     Creates a new cell editor under the given parent control.

Method Summary
public  voidactivate()
     Activates this cell editor.

The default implementation of this framework method does nothing.

public  voidactivate(ColumnViewerEditorActivationEvent activationEvent)
     Activate the editor but also inform the editor which event triggered its activation.
public  voidaddListener(ICellEditorListener listener)
     Adds a listener to this cell editor.
public  voidaddPropertyChangeListener(IPropertyChangeListener listener)
     Adds a property change listener to this cell editor.
public  voidcreate(Composite parent)
     Creates the control for this cell editor under the given parent control.
abstract protected  ControlcreateControl(Composite parent)
     Creates the control for this cell editor under the given parent control.
public  voiddeactivate()
     Hides this cell editor's control.
 booleandependsOnExternalFocusListener()
    
public  voiddispose()
     Disposes of this cell editor and frees any associated SWT resources.
abstract protected  ObjectdoGetValue()
     Returns this cell editor's value.
abstract protected  voiddoSetFocus()
     Sets the focus to the cell editor's control.
abstract protected  voiddoSetValue(Object value)
     Sets this cell editor's value.
protected  voidfireApplyEditorValue()
     Notifies all registered cell editor listeners of an apply event.
protected  voidfireCancelEditor()
     Notifies all registered cell editor listeners that editing has been canceled.
protected  voidfireEditorValueChanged(boolean oldValidState, boolean newValidState)
     Notifies all registered cell editor listeners of a value change.
protected  voidfireEnablementChanged(String actionId)
     Notifies all registered property listeners of an enablement change.
protected  voidfocusLost()
     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.

public  ControlgetControl()
     Returns the control used to implement this cell editor.
public  StringgetErrorMessage()
     Returns the current error message for this cell editor.
public  LayoutDatagetLayoutData()
     Returns a layout data object for this cell editor.
public  intgetStyle()
     Returns the style bits for this cell editor.
public  ICellEditorValidatorgetValidator()
     Returns the input validator for this cell editor.
final public  ObjectgetValue()
     Returns this cell editor's value provided that it has a valid one.
public  booleanisActivated()
     Returns whether this cell editor is activated.
public  booleanisCopyEnabled()
     Returns true if this cell editor is able to perform the copy action.
protected  booleanisCorrect(Object value)
     Returns whether the given value is valid for this cell editor.
public  booleanisCutEnabled()
     Returns true if this cell editor is able to perform the cut action.
public  booleanisDeleteEnabled()
     Returns true if this cell editor is able to perform the delete action.
public  booleanisDirty()
     Returns whether the value of this cell editor has changed since the last call to setValue.
public  booleanisFindEnabled()
     Returns true if this cell editor is able to perform the find action.
public  booleanisPasteEnabled()
     Returns true if this cell editor is able to perform the paste action.
public  booleanisRedoEnabled()
     Returns true if this cell editor is able to perform the redo action.
public  booleanisSelectAllEnabled()
     Returns true if this cell editor is able to perform the select all action.
public  booleanisUndoEnabled()
     Returns true if this cell editor is able to perform the undo action.
public  booleanisValueValid()
     Returns whether this cell editor has a valid value.
protected  voidkeyReleaseOccured(KeyEvent keyEvent)
     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.

protected  voidmarkDirty()
     Marks this cell editor as dirty.
public  voidperformCopy()
     Performs the copy action.
public  voidperformCut()
     Performs the cut action.
public  voidperformDelete()
     Performs the delete action.
public  voidperformFind()
     Performs the find action.
public  voidperformPaste()
     Performs the paste action.
public  voidperformRedo()
     Performs the redo action.
public  voidperformSelectAll()
     Performs the select all action.
public  voidperformUndo()
     Performs the undo action.
public  voidremoveListener(ICellEditorListener listener)
     Removes the given listener from this cell editor.
public  voidremovePropertyChangeListener(IPropertyChangeListener listener)
     Removes the given property change listener from this cell editor.
protected  voidsetErrorMessage(String message)
     Sets or clears the current error message for this cell editor.
public  voidsetFocus()
     Sets the focus to the cell editor's control.
public  voidsetStyle(int style)
     Sets the style bits for this cell editor.
public  voidsetValidator(ICellEditorValidator validator)
     Sets the input validator for this cell editor.
final public  voidsetValue(Object value)
     Sets this cell editor's value.
protected  voidsetValueValid(boolean valid)
     Sets the valid state of this cell editor.
protected  voidvalueChanged(boolean oldValidState, boolean newValidState)
     The value has changed.

Field Detail
COPY
final public static String COPY(Code)
Property name for the copy action



CUT
final public static String CUT(Code)
Property name for the cut action



DELETE
final public static String DELETE(Code)
Property name for the delete action



FIND
final public static String FIND(Code)
Property name for the find action



PASTE
final public static String PASTE(Code)
Property name for the paste action



REDO
final public static String REDO(Code)
Property name for the redo action



SELECT_ALL
final public static String SELECT_ALL(Code)
Property name for the select all action



UNDO
final public static String UNDO(Code)
Property name for the undo action




Constructor Detail
CellEditor
protected CellEditor()(Code)
Creates a new cell editor with no control The cell editor has no cell validator.
since:
   2.1



CellEditor
protected CellEditor(Composite parent)(Code)
Creates a new cell editor under the given parent control. The cell editor has no cell validator.
Parameters:
  parent - the parent control



CellEditor
protected CellEditor(Composite parent, int style)(Code)
Creates a new cell editor under the given parent control. The cell editor has no cell validator.
Parameters:
  parent - the parent control
Parameters:
  style - the style bits
since:
   2.1




Method Detail
activate
public void activate()(Code)
Activates this cell editor.

The default implementation of this framework method does nothing. Subclasses may reimplement.




activate
public void activate(ColumnViewerEditorActivationEvent activationEvent)(Code)
Activate the editor but also inform the editor which event triggered its activation. The default implementation simply calls CellEditor.activate()
Parameters:
  activationEvent - the editor activation event
since:
   3.3



addListener
public void addListener(ICellEditorListener listener)(Code)
Adds a listener to this cell editor. Has no effect if an identical listener is already registered.
Parameters:
  listener - a cell editor listener



addPropertyChangeListener
public void addPropertyChangeListener(IPropertyChangeListener listener)(Code)
Adds a property change listener to this cell editor. Has no effect if an identical property change listener is already registered.
Parameters:
  listener - a property change listener



create
public void create(Composite parent)(Code)
Creates the control for this cell editor under the given parent control.
Parameters:
  parent - the parent control
since:
   2.1



createControl
abstract protected Control createControl(Composite parent)(Code)
Creates the control for this cell editor under the given parent control.

This framework method must be implemented by concrete subclasses.


Parameters:
  parent - the parent control the new control, or null if this cell editor has no control



deactivate
public void deactivate()(Code)
Hides this cell editor's control. Does nothing if this cell editor is not visible.



dependsOnExternalFocusListener
boolean dependsOnExternalFocusListener()(Code)
This method is for interal use in ColumnViewerEditor to not break clients who don't implement the ICellEditorListener appropiately true to indicate that a focus listener has to be attached



dispose
public void dispose()(Code)
Disposes of this cell editor and frees any associated SWT resources.



doGetValue
abstract protected Object doGetValue()(Code)
Returns this cell editor's value.

This framework method must be implemented by concrete subclasses.

the value of this cell editor
See Also:   CellEditor.getValue



doSetFocus
abstract protected void doSetFocus()(Code)
Sets the focus to the cell editor's control.

This framework method must be implemented by concrete subclasses.


See Also:   CellEditor.setFocus



doSetValue
abstract protected void doSetValue(Object value)(Code)
Sets this cell editor's value.

This framework method must be implemented by concrete subclasses.


Parameters:
  value - the value of this cell editor
See Also:   CellEditor.setValue



fireApplyEditorValue
protected void fireApplyEditorValue()(Code)
Notifies all registered cell editor listeners of an apply event. Only listeners registered at the time this method is called are notified.
See Also:   ICellEditorListener.applyEditorValue



fireCancelEditor
protected void fireCancelEditor()(Code)
Notifies all registered cell editor listeners that editing has been canceled.
See Also:   ICellEditorListener.cancelEditor



fireEditorValueChanged
protected void fireEditorValueChanged(boolean oldValidState, boolean newValidState)(Code)
Notifies all registered cell editor listeners of a value change.
Parameters:
  oldValidState - the valid state before the end user changed the value
Parameters:
  newValidState - the current valid state
See Also:   ICellEditorListener.editorValueChanged



fireEnablementChanged
protected void fireEnablementChanged(String actionId)(Code)
Notifies all registered property listeners of an enablement change.
Parameters:
  actionId - the id indicating what action's enablement has changed.



focusLost
protected void focusLost()(Code)
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.




getControl
public Control getControl()(Code)
Returns the control used to implement this cell editor. the control, or null if this cell editor has no control



getErrorMessage
public String getErrorMessage()(Code)
Returns the current error message for this cell editor. the error message if the cell editor is in an invalid state,and null if the cell editor is valid



getLayoutData
public LayoutData getLayoutData()(Code)
Returns a layout data object for this cell editor. This is called each time the cell editor is activated and controls the layout of the SWT table editor.

The default implementation of this method sets the minimum width to the control's preferred width. Subclasses may extend or reimplement.

the layout data object



getStyle
public int getStyle()(Code)
Returns the style bits for this cell editor. the style for this cell editor
since:
   2.1



getValidator
public ICellEditorValidator getValidator()(Code)
Returns the input validator for this cell editor. the input validator, or null if none



getValue
final public Object getValue()(Code)
Returns this cell editor's value provided that it has a valid one. the value of this cell editor, or nullif the cell editor does not contain a valid value



isActivated
public boolean isActivated()(Code)
Returns whether this cell editor is activated. true if this cell editor's control iscurrently activated, and false if not activated



isCopyEnabled
public boolean isCopyEnabled()(Code)
Returns true if this cell editor is able to perform the copy action.

This default implementation always returns false.

Subclasses may override

true if copy is possible,false otherwise



isCorrect
protected boolean isCorrect(Object value)(Code)
Returns whether the given value is valid for this cell editor. This cell editor's validator (if any) makes the actual determination.
Parameters:
  value - the value to check for true if the value is valid, and falseif invalid



isCutEnabled
public boolean isCutEnabled()(Code)
Returns true if this cell editor is able to perform the cut action.

This default implementation always returns false.

Subclasses may override

true if cut is possible,false otherwise



isDeleteEnabled
public boolean isDeleteEnabled()(Code)
Returns true if this cell editor is able to perform the delete action.

This default implementation always returns false.

Subclasses may override

true if delete is possible,false otherwise



isDirty
public boolean isDirty()(Code)
Returns whether the value of this cell editor has changed since the last call to setValue. true if the value has changed, and falseif unchanged



isFindEnabled
public boolean isFindEnabled()(Code)
Returns true if this cell editor is able to perform the find action.

This default implementation always returns false.

Subclasses may override

true if find is possible,false otherwise



isPasteEnabled
public boolean isPasteEnabled()(Code)
Returns true if this cell editor is able to perform the paste action.

This default implementation always returns false.

Subclasses may override

true if paste is possible,false otherwise



isRedoEnabled
public boolean isRedoEnabled()(Code)
Returns true if this cell editor is able to perform the redo action.

This default implementation always returns false.

Subclasses may override

true if redo is possible,false otherwise



isSelectAllEnabled
public boolean isSelectAllEnabled()(Code)
Returns true if this cell editor is able to perform the select all action.

This default implementation always returns false.

Subclasses may override

true if select all is possible,false otherwise



isUndoEnabled
public boolean isUndoEnabled()(Code)
Returns true if this cell editor is able to perform the undo action.

This default implementation always returns false.

Subclasses may override

true if undo is possible,false otherwise



isValueValid
public boolean isValueValid()(Code)
Returns whether this cell editor has a valid value. The default value is false. true if the value is valid, and falseif invalid
See Also:   CellEditor.setValueValid(boolean)



keyReleaseOccured
protected void keyReleaseOccured(KeyEvent keyEvent)(Code)
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.


Parameters:
  keyEvent - the key event



markDirty
protected void markDirty()(Code)
Marks this cell editor as dirty.
since:
   2.1



performCopy
public void performCopy()(Code)
Performs the copy action. This default implementation does nothing.

Subclasses may override




performCut
public void performCut()(Code)
Performs the cut action. This default implementation does nothing.

Subclasses may override




performDelete
public void performDelete()(Code)
Performs the delete action. This default implementation does nothing.

Subclasses may override




performFind
public void performFind()(Code)
Performs the find action. This default implementation does nothing.

Subclasses may override




performPaste
public void performPaste()(Code)
Performs the paste action. This default implementation does nothing.

Subclasses may override




performRedo
public void performRedo()(Code)
Performs the redo action. This default implementation does nothing.

Subclasses may override




performSelectAll
public void performSelectAll()(Code)
Performs the select all action. This default implementation does nothing.

Subclasses may override




performUndo
public void performUndo()(Code)
Performs the undo action. This default implementation does nothing.

Subclasses may override




removeListener
public void removeListener(ICellEditorListener listener)(Code)
Removes the given listener from this cell editor. Has no affect if an identical listener is not registered.
Parameters:
  listener - a cell editor listener



removePropertyChangeListener
public void removePropertyChangeListener(IPropertyChangeListener listener)(Code)
Removes the given property change listener from this cell editor. Has no affect if an identical property change listener is not registered.
Parameters:
  listener - a property change listener



setErrorMessage
protected void setErrorMessage(String message)(Code)
Sets or clears the current error message for this cell editor.

No formatting is done here, the message to be set is expected to be fully formatted before being passed in.


Parameters:
  message - the error message, or null to clear



setFocus
public void setFocus()(Code)
Sets the focus to the cell editor's control.



setStyle
public void setStyle(int style)(Code)
Sets the style bits for this cell editor.
Parameters:
  style - the SWT style bits for this cell editor
since:
   2.1



setValidator
public void setValidator(ICellEditorValidator validator)(Code)
Sets the input validator for this cell editor.
Parameters:
  validator - the input validator, or null if none



setValue
final public void setValue(Object value)(Code)
Sets this cell editor's value.
Parameters:
  value - the value of this cell editor



setValueValid
protected void setValueValid(boolean valid)(Code)
Sets the valid state of this cell editor. The default value is false. Subclasses should call this method on construction.
Parameters:
  valid - true if the current value is valid,and false if invalid
See Also:   CellEditor.isValueValid



valueChanged
protected void valueChanged(boolean oldValidState, boolean newValidState)(Code)
The value has changed. Updates the valid state flag, marks this cell editor as dirty, and notifies all registered cell editor listeners of a value change.
Parameters:
  oldValidState - the valid state before the end user changed the value
Parameters:
  newValidState - the current valid state
See Also:   ICellEditorListener.editorValueChanged



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.