org.eclipse.emf.facet.widgets.nattable
Interface INatTableWidget


public interface INatTableWidget

This interface defines every public action a user can perform on the EMF Facet table widget


Method Summary
 void addQueryColumn()
          Open the query selection dialog.
 void addRows(java.util.List<EObject> newElements)
          Add a new row in the table for each given element.
 void copySelectionToClipboard()
          This method performs to usual "copy to clipboard" action.
 void createNewElement()
          This method calls the last launched InstantiationMethod and adds the result to the table if any.
 void createNewElement(InstantiationMethod instantiationMethod)
          This method calls the given InstantiationMethod and adds the result to the table if any.
 void deleteSelection()
          Delete the selected elements from their respective models and remove the corresponding line in the table.
 Control getComposite()
           
 java.util.List<InstantiationMethod> getInstantionMethodHistory()
           
 java.util.Collection<ISelectionChangedListener> getSelectionChangedListeners()
           
 TableConfiguration getTableConfiguration()
          This method returns the TableConfiguration attached to the table.
 TableInstance getTableInstance()
          This method returns the TableInstance attached to the table.
 boolean isCellsDeletable()
          Return whether the selection of cells can be deleted.
 boolean isCellSelected()
          Return whether there is at least a cell selected in the table
 boolean isColumnSelected()
          Return whether there is at least a column selected in the table
 boolean isSelectedColumnDeletable()
          Return whether the selected column can be deleted.
 void openLoadCustomizationDialog()
           
 void openLoadFacetsDialog()
           
 void openSavedTable()
          Allow the opening of an existing saved .table file within the current table widget.
 void registerActionDelegate(IActionDelegate action)
          Register an ActionDelegate.
 void removeLine()
          Remove the selected lines from the table.
 void save()
          Performs the usual save action.
 void saveAs()
          Open a "Save As" dialog to serialize the table.
 void selectAll()
          Perform the usual "Select All" action on the table's cells
 void selectColumnsToHide()
          Open a selection popup to select which columns to show/hide.
 void selectInstantiationMethodToLaunch()
          Open a dialog to choose the default instantiationMethod to perform when clicking on the "Create" button.
 void setHideEmptyColumns(boolean hideEmptyColumns)
          Whether to hide columns which don't contain any elements.
 void setOnlyShowCommonColumns(boolean onlyShowCommonColumns)
          Whether to show columns which are specific to a few elements (false), or only columns which are common to all the elements (true).
 void sortColumnsByType()
          Whether to sort columns by type of link (attributes first, then references, then derived references, ...).
 void unregisterActionDelegate(IActionDelegate action)
          Unregister an ActionDelegate
 

Method Detail

createNewElement

void createNewElement()
This method calls the last launched InstantiationMethod and adds the result to the table if any. If no InstantiationMethod is saved, then a selection popup is opened for the user to choose one via selectInstantiationMethodToLaunch()


createNewElement

void createNewElement(InstantiationMethod instantiationMethod)
This method calls the given InstantiationMethod and adds the result to the table if any.

Parameters:
instantiationMethod - an InstantiationMethod

selectInstantiationMethodToLaunch

void selectInstantiationMethodToLaunch()
Open a dialog to choose the default instantiationMethod to perform when clicking on the "Create" button.


save

void save()
Performs the usual save action.


saveAs

void saveAs()
Open a "Save As" dialog to serialize the table.


addQueryColumn

void addQueryColumn()
Open the query selection dialog. Add a column which contains the result of the selected query.


copySelectionToClipboard

void copySelectionToClipboard()
This method performs to usual "copy to clipboard" action.


deleteSelection

void deleteSelection()
Delete the selected elements from their respective models and remove the corresponding line in the table.


selectColumnsToHide

void selectColumnsToHide()
Open a selection popup to select which columns to show/hide.


setHideEmptyColumns

void setHideEmptyColumns(boolean hideEmptyColumns)
Whether to hide columns which don't contain any elements.

Parameters:
hideEmptyColumns - true to hide columns which don't contain any elements.

setOnlyShowCommonColumns

void setOnlyShowCommonColumns(boolean onlyShowCommonColumns)
Whether to show columns which are specific to a few elements (false), or only columns which are common to all the elements (true).

Parameters:
onlyShowCommonColumns - Whether to show columns which are specific to a few elements (false), or only columns which are common to all the elements (true)

sortColumnsByType

void sortColumnsByType()
Whether to sort columns by type of link (attributes first, then references, then derived references, ...).

Parameters:
sortColumnsByType - Boolean to sort columns by type of link

openSavedTable

void openSavedTable()
Allow the opening of an existing saved .table file within the current table widget.


removeLine

void removeLine()
Remove the selected lines from the table. The actual elements are not deleted. See deleteSelection() for that case.


selectAll

void selectAll()
Perform the usual "Select All" action on the table's cells


getTableConfiguration

TableConfiguration getTableConfiguration()
This method returns the TableConfiguration attached to the table.

Returns:
the TableConfiguration attached to the table.

getInstantionMethodHistory

java.util.List<InstantiationMethod> getInstantionMethodHistory()
Returns:
The history of launched instantiation methods.

getTableInstance

TableInstance getTableInstance()
This method returns the TableInstance attached to the table.

Returns:
returns the TableInstance attached to the table.

isCellSelected

boolean isCellSelected()
Return whether there is at least a cell selected in the table

Returns:
Whether there is at least a cell selected in the table

isColumnSelected

boolean isColumnSelected()
Return whether there is at least a column selected in the table

Returns:
whether there is at least a column selected in the table

isCellsDeletable

boolean isCellsDeletable()
Return whether the selection of cells can be deleted.

Returns:
Whether the selection of cells can be deleted.

isSelectedColumnDeletable

boolean isSelectedColumnDeletable()
Return whether the selected column can be deleted.

Returns:
whether the selected column can be deleted.

getComposite

Control getComposite()
Returns:
the widget composite itself.

addRows

void addRows(java.util.List<EObject> newElements)
Add a new row in the table for each given element.

Parameters:
newElements - the list of elements to add to the table

registerActionDelegate

void registerActionDelegate(IActionDelegate action)
Register an ActionDelegate. It will be notified after the opening of a saved table in a view.

Parameters:
action - the action to be registered

unregisterActionDelegate

void unregisterActionDelegate(IActionDelegate action)
Unregister an ActionDelegate

Parameters:
action - the action to be unregistered

getSelectionChangedListeners

java.util.Collection<ISelectionChangedListener> getSelectionChangedListeners()

openLoadCustomizationDialog

void openLoadCustomizationDialog()

openLoadFacetsDialog

void openLoadFacetsDialog()