org.beanfabrics.swt
Class BnPushButtonDecorator

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

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


Constructor Summary
BnPushButtonDecorator(org.eclipse.swt.widgets.Button button)
          Create the BnPushButtonDecorator
BnPushButtonDecorator(org.eclipse.swt.widgets.Composite parent)
          Create the BnPushButtonDecorator
BnPushButtonDecorator(org.eclipse.swt.widgets.Composite parent, int style)
          Create the BnPushButtonDecorator
 
Method Summary
 org.eclipse.swt.widgets.Button getButton()
          Deprecated. use AbstractDecorator.getControl()
 IModelProvider getModelProvider()
          Returns the provider.
 Path getPath()
          Returns the path.
 IOperationPM getPresentationModel()
          Returns the PresentationModel of this view.
protected  void hookControl(org.eclipse.swt.widgets.Button button)
           
protected  void refreshEnabled()
           
protected  void refreshTooltip()
           
protected  void refreshUI()
           
 void setModelProvider(IModelProvider provider)
          Sets the provider.
 void setPath(Path path)
          Sets the path.
 void setPresentationModel(IOperationPM pModel)
          Sets the PresentationModel of this view.
 
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

BnPushButtonDecorator

public BnPushButtonDecorator(org.eclipse.swt.widgets.Button button)
Create the BnPushButtonDecorator


BnPushButtonDecorator

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

Parameters:
parent -
style - is ignored

BnPushButtonDecorator

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

Parameters:
parent -
Method Detail

hookControl

protected void hookControl(org.eclipse.swt.widgets.Button button)

getPresentationModel

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

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

setPresentationModel

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

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

refreshUI

protected void refreshUI()

refreshEnabled

protected void refreshEnabled()

refreshTooltip

protected void refreshTooltip()

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

getButton

public org.eclipse.swt.widgets.Button getButton()
Deprecated. use AbstractDecorator.getControl()