org.beanfabrics.swt
Class BnButtonDecorator

java.lang.Object
  extended by org.beanfabrics.swt.AbstractDecorator<org.eclipse.swt.widgets.Button>
      extended by org.beanfabrics.swt.BnButtonDecorator
All Implemented Interfaces:
ModelSubscriber, View<IBooleanPM>

public class BnButtonDecorator
extends AbstractDecorator<org.eclipse.swt.widgets.Button>
implements View<IBooleanPM>, ModelSubscriber


Constructor Summary
BnButtonDecorator(org.eclipse.swt.widgets.Button button)
           
BnButtonDecorator(org.eclipse.swt.widgets.Composite parent, int style)
          Create the composite
 
Method Summary
 IModelProvider getModelProvider()
          Returns the provider.
 Path getPath()
          Returns the path.
 IBooleanPM getPresentationModel()
          Returns the PresentationModel of this view.
 ValidationIndicator getValidationIndicator()
           
protected  void refreshEnabled()
           
protected  void refreshSelection()
           
protected  void refreshTooltip()
           
protected  void refreshUI()
           
protected  void refreshValidationIndicator()
           
 void setModelProvider(IModelProvider provider)
          Sets the provider.
 void setPath(Path path)
          Sets the path.
 void setPresentationModel(IBooleanPM pModel)
          Sets the PresentationModel of this view.
 void setValidationIndicator(ValidationIndicator validationIndicator)
           
protected  void updateModel()
           
 
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

BnButtonDecorator

public BnButtonDecorator(org.eclipse.swt.widgets.Button button)

BnButtonDecorator

public BnButtonDecorator(org.eclipse.swt.widgets.Composite parent,
                         int style)
Create the composite

Parameters:
parent -
style - is ignored
Method Detail

getPresentationModel

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

Specified by:
getPresentationModel in interface View<IBooleanPM>
Returns:
the PresentationModel

setPresentationModel

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

Specified by:
setPresentationModel in interface View<IBooleanPM>
Parameters:
pModel - the PresentationModel

refreshUI

protected void refreshUI()

refreshEnabled

protected void refreshEnabled()

refreshTooltip

protected void refreshTooltip()

refreshSelection

protected void refreshSelection()

refreshValidationIndicator

protected void refreshValidationIndicator()

updateModel

protected void updateModel()

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

getValidationIndicator

public ValidationIndicator getValidationIndicator()

setValidationIndicator

public void setValidationIndicator(ValidationIndicator validationIndicator)