org.beanfabrics.swt
Class BnTextDecorator

java.lang.Object
  extended by org.beanfabrics.swt.AbstractDecorator<org.eclipse.swt.widgets.Text>
      extended by org.beanfabrics.swt.BnTextDecorator
All Implemented Interfaces:
ModelSubscriber, View<ITextPM>

public class BnTextDecorator
extends AbstractDecorator<org.eclipse.swt.widgets.Text>
implements View<ITextPM>, ModelSubscriber


Constructor Summary
BnTextDecorator(org.eclipse.swt.widgets.Composite parent, int style)
           
BnTextDecorator(org.eclipse.swt.widgets.Text text)
           
 
Method Summary
 IModelProvider getModelProvider()
          Returns the provider.
 Path getPath()
          Returns the path.
 ITextPM getPresentationModel()
          Returns the PresentationModel of this view.
 ValidationIndicator getValidationIndicator()
           
protected  void refreshEditable()
           
protected  void refreshText()
           
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(ITextPM 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

BnTextDecorator

public BnTextDecorator(org.eclipse.swt.widgets.Text text)

BnTextDecorator

public BnTextDecorator(org.eclipse.swt.widgets.Composite parent,
                       int style)
Method Detail

updateModel

protected void updateModel()

getPresentationModel

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

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

setPresentationModel

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

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

refreshUI

protected void refreshUI()

refreshEditable

protected void refreshEditable()

refreshText

protected void refreshText()

refreshTooltip

protected void refreshTooltip()

refreshValidationIndicator

protected void refreshValidationIndicator()

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)