org.beanfabrics.swt.table
Class BnTableDecorator

java.lang.Object
  extended by org.beanfabrics.swt.AbstractDecorator<org.eclipse.swt.widgets.Table>
      extended by org.beanfabrics.swt.table.BnTableDecorator
All Implemented Interfaces:
ModelSubscriber, View<IListPM<? extends PresentationModel>>

public class BnTableDecorator
extends AbstractDecorator<org.eclipse.swt.widgets.Table>
implements View<IListPM<? extends PresentationModel>>, ModelSubscriber

This is a Beanfabrics view on a IListPM using an SWT Table.


Constructor Summary
BnTableDecorator(org.eclipse.swt.widgets.Composite parent)
          Create the BnTable
BnTableDecorator(org.eclipse.swt.widgets.Composite parent, int style)
          Create the BnTable
BnTableDecorator(org.eclipse.swt.widgets.Table table)
          Create the BnTable
 
Method Summary
 void dispose()
           
 IModelProvider getModelProvider()
          Returns the provider.
 Path getPath()
          Returns the path.
 IListPM getPresentationModel()
          Returns the PresentationModel of this view.
 org.eclipse.swt.widgets.Table getTable()
           
protected  void hookControl(org.eclipse.swt.widgets.Table table)
           
protected  void refreshTableItem(int index)
           
protected  void refreshUI()
           
protected  void refreshUISelection()
           
 void setModelProvider(IModelProvider provider)
          Sets the provider.
 void setPath(Path path)
          Sets the path.
 void setPresentationModel(IListPM pModel)
          Sets the PresentationModel of this view.
 void setViewConfig(ViewConfig aConfig)
           
protected  void updateModelSelection()
           
 
Methods inherited from class org.beanfabrics.swt.AbstractDecorator
getControl
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BnTableDecorator

public BnTableDecorator(org.eclipse.swt.widgets.Table table)
Create the BnTable

Parameters:
parent -
style -

BnTableDecorator

public BnTableDecorator(org.eclipse.swt.widgets.Composite parent,
                        int style)
Create the BnTable

Parameters:
parent -
style -

BnTableDecorator

public BnTableDecorator(org.eclipse.swt.widgets.Composite parent)
Create the BnTable

Parameters:
parent -
Method Detail

hookControl

protected void hookControl(org.eclipse.swt.widgets.Table table)

dispose

public void dispose()

getPresentationModel

public IListPM getPresentationModel()
Returns the PresentationModel of this view.

Specified by:
getPresentationModel in interface View<IListPM<? extends PresentationModel>>
Returns:
the PresentationModel

setPresentationModel

public void setPresentationModel(IListPM pModel)
Sets the PresentationModel of this view.

Specified by:
setPresentationModel in interface View<IListPM<? extends PresentationModel>>
Parameters:
pModel - the PresentationModel

setViewConfig

public void setViewConfig(ViewConfig aConfig)

setModelProvider

public void setModelProvider(IModelProvider provider)
Sets the provider.

Specified by:
setModelProvider in interface ModelSubscriber
Parameters:
provider - the provider

getModelProvider

public IModelProvider getModelProvider()
Returns the provider.

Specified by:
getModelProvider in interface ModelSubscriber
Returns:
the ModelProvider

setPath

public void setPath(Path path)
Sets the path. The Path is used to locate the model inside the provider.

Specified by:
setPath in interface ModelSubscriber
Parameters:
path - the path relative to the provider's root model

getPath

public Path getPath()
Returns the path.

Specified by:
getPath in interface ModelSubscriber
Returns:
the path

getTable

public org.eclipse.swt.widgets.Table getTable()

refreshUI

protected void refreshUI()

updateModelSelection

protected void updateModelSelection()

refreshUISelection

protected void refreshUISelection()

refreshTableItem

protected void refreshTableItem(int index)