Class VarValViewerHandler
java.lang.Object
org.apache.uima.pear.insd.edit.vars.VarValViewerHandler
Handles the display and management of an environment variables table.
-
Field Summary
Modifier and TypeFieldDescriptionorg.eclipse.swt.widgets.Button
The add.protected org.eclipse.swt.widgets.Button
The close button.protected String[]
The column names.org.eclipse.swt.widgets.Button
The delete.protected org.eclipse.jface.viewers.ITableLabelProvider
The label provider.org.eclipse.swt.widgets.Table
The table.protected VarValList
The table row list.org.eclipse.jface.viewers.TableViewer
The table viewer. -
Constructor Summary
ConstructorDescriptionVarValViewerHandler
(org.eclipse.swt.widgets.Composite parent, String[] columnNames, int numParentColumns, VarValList tableRowList) Instantiates a new var val viewer handler. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addChildControls
(org.eclipse.swt.widgets.Composite composite, int numColumns) Create a new shell, add the widgets, open the shell.void
close()
Close.protected void
createButtons
(org.eclipse.swt.widgets.Composite parent) Add the "Add", "Delete" and "Close" buttons.protected org.eclipse.jface.viewers.CellEditor[]
Creates the cell editors.protected org.eclipse.jface.viewers.ICellModifier
Creates the cell modifiers.protected org.eclipse.jface.viewers.ViewerSorter
Creates the sorter.protected void
createTable
(org.eclipse.swt.widgets.Composite parent) Create the Table.protected void
Creates the table columns.protected void
Create the TableViewer.void
dispose()
Release resources.org.eclipse.swt.widgets.Button
Return the 'close' Button.Return the column names in a collection.org.eclipse.swt.widgets.Control
Return the parent composite.org.eclipse.jface.viewers.ISelection
Gets the selection.Return the VarValList.
-
Field Details
-
table
public org.eclipse.swt.widgets.Table tableThe table. -
tableViewer
public org.eclipse.jface.viewers.TableViewer tableViewerThe table viewer. -
add
public org.eclipse.swt.widgets.Button addThe add. -
delete
public org.eclipse.swt.widgets.Button deleteThe delete. -
closeButton
protected org.eclipse.swt.widgets.Button closeButtonThe close button. -
labelProvider
protected org.eclipse.jface.viewers.ITableLabelProvider labelProviderThe label provider. -
tableRowList
The table row list. -
columnNames
The column names.
-
-
Constructor Details
-
VarValViewerHandler
public VarValViewerHandler(org.eclipse.swt.widgets.Composite parent, String[] columnNames, int numParentColumns, VarValList tableRowList) Instantiates a new var val viewer handler.- Parameters:
parent
- the parentcolumnNames
- the column namesnumParentColumns
- the num parent columnstableRowList
- the table row list
-
-
Method Details
-
createCellModifiers
protected org.eclipse.jface.viewers.ICellModifier createCellModifiers()Creates the cell modifiers.- Returns:
- the i cell modifier
-
createSorter
protected org.eclipse.jface.viewers.ViewerSorter createSorter()Creates the sorter.- Returns:
- the viewer sorter
-
createTableColumns
protected void createTableColumns()Creates the table columns. -
createCellEditors
protected org.eclipse.jface.viewers.CellEditor[] createCellEditors()Creates the cell editors.- Returns:
- the cell editor[]
-
dispose
public void dispose()Release resources. -
addChildControls
protected void addChildControls(org.eclipse.swt.widgets.Composite composite, int numColumns) Create a new shell, add the widgets, open the shell.- Parameters:
composite
- the compositenumColumns
- the num columns
-
createTable
protected void createTable(org.eclipse.swt.widgets.Composite parent) Create the Table.- Parameters:
parent
- the parent
-
createTableViewer
protected void createTableViewer()Create the TableViewer. -
close
public void close()Close. -
createButtons
protected void createButtons(org.eclipse.swt.widgets.Composite parent) Add the "Add", "Delete" and "Close" buttons.- Parameters:
parent
- the parent composite
-
getColumnNames
Return the column names in a collection.- Returns:
- List containing column names
-
getSelection
public org.eclipse.jface.viewers.ISelection getSelection()Gets the selection.- Returns:
- currently selected item
-
getTableRowList
Return the VarValList.- Returns:
- the table row list
-
getControl
public org.eclipse.swt.widgets.Control getControl()Return the parent composite.- Returns:
- the control
-
getCloseButton
public org.eclipse.swt.widgets.Button getCloseButton()Return the 'close' Button.- Returns:
- the close button
-