org.eclipse.datatools.enablement.sybase.asa.schemaobjecteditor.examples.tableeditor.pages.columns
Class ASATableEditorColumnsViewerCellModifier

java.lang.Object
  extended by org.eclipse.datatools.sqltools.common.ui.tableviewer.TableDataCellModifier
      extended by org.eclipse.datatools.enablement.sybase.asa.schemaobjecteditor.examples.tableeditor.pages.columns.ASATableEditorColumnsViewerCellModifier
All Implemented Interfaces:
org.eclipse.jface.viewers.ICellModifier

public class ASATableEditorColumnsViewerCellModifier
extends TableDataCellModifier

Cell modified for ASA columns table viewer

Author:
Idull

Constructor Summary
ASATableEditorColumnsViewerCellModifier(AccessibleTableViewer viewer, BaseTable table)
           
 
Method Summary
 boolean canChange(java.lang.Object element, int index)
          This method is used to verify if the specified column is editable.
 void modify(java.lang.Object element, java.lang.String property, java.lang.Object value)
          1.If the current column is PRI_KEY_COLUMN, and current value is false, if it's the last column in PK, should popup dialog to let user confirm;
2.
 void setViewer(AccessibleTableViewer viewer)
           
 
Methods inherited from class org.eclipse.datatools.sqltools.common.ui.tableviewer.TableDataCellModifier
canModify, getValue, setCanModify
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ASATableEditorColumnsViewerCellModifier

public ASATableEditorColumnsViewerCellModifier(AccessibleTableViewer viewer,
                                               BaseTable table)
Method Detail

setViewer

public void setViewer(AccessibleTableViewer viewer)

modify

public void modify(java.lang.Object element,
                   java.lang.String property,
                   java.lang.Object value)
1.If the current column is PRI_KEY_COLUMN, and current value is false, if it's the last column in PK, should popup dialog to let user confirm;
2.

Specified by:
modify in interface org.eclipse.jface.viewers.ICellModifier
Overrides:
modify in class TableDataCellModifier

canChange

public boolean canChange(java.lang.Object element,
                         int index)
Description copied from class: TableDataCellModifier
This method is used to verify if the specified column is editable. User needs to override this method if he wants to make some column readonly.

Overrides:
canChange in class TableDataCellModifier
index - the specified column
Returns:
true is editable