Class TextUpdateEditPart

java.lang.Object
org.eclipse.gef.editparts.AbstractEditPart
org.eclipse.gef.editparts.AbstractGraphicalEditPart
All Implemented Interfaces:
IPVWidgetEditpart, IAdaptable, org.eclipse.gef.EditPart, org.eclipse.gef.GraphicalEditPart, org.eclipse.gef.NodeEditPart, org.eclipse.gef.RequestConstants
Direct Known Subclasses:
TextInputEditpart

public class TextUpdateEditPart extends AbstractPVWidgetEditPart
  • Field Details

  • Constructor Details

    • TextUpdateEditPart

      public TextUpdateEditPart()
  • Method Details

    • doCreateFigure

      protected org.eclipse.draw2d.IFigure doCreateFigure()
      Description copied from class: AbstractBaseEditPart
      Create and initialize the widget figure with the property values in model.
      Specified by:
      doCreateFigure in class AbstractBaseEditPart
      Returns:
      the widget figure
    • initTextFigure

      protected void initTextFigure(TextFigure labelFigure)
    • initFields

      protected void initFields()
    • createTextFigure

      protected TextFigure createTextFigure()
    • createEditPolicies

      protected void createEditPolicies()
      Overrides:
      createEditPolicies in class AbstractPVWidgetEditPart
    • activate

      public void activate()
      Specified by:
      activate in interface org.eclipse.gef.EditPart
      Overrides:
      activate in class AbstractPVWidgetEditPart
    • setFigureText

      protected void setFigureText(String text)
      Parameters:
      text -
    • registerPropertyChangeHandlers

      protected void registerPropertyChangeHandlers()
      Description copied from class: AbstractBaseEditPart
      Register the property change handlers. Subclass should register its property change handlers in this method.
      Specified by:
      registerPropertyChangeHandlers in class AbstractBaseEditPart
    • getWidgetModel

      public TextUpdateModel getWidgetModel()
      Overrides:
      getWidgetModel in class AbstractBaseEditPart
    • performDirectEdit

      protected void performDirectEdit()
    • performRequest

      public void performRequest(org.eclipse.gef.Request request)
      Specified by:
      performRequest in interface org.eclipse.gef.EditPart
      Overrides:
      performRequest in class org.eclipse.gef.editparts.AbstractEditPart
    • performAutoSize

      protected void performAutoSize()
    • formatValue

      protected String formatValue(Object newValue, String propId)
    • getValue

      public String getValue()
      Description copied from class: AbstractBaseEditPart
      The value of the widget that is in representing. It is not the value of the attached PV even though they are equals in most cases. The value type is specified by the widget, for example, boolean for boolean widget, double for meter and gauge.
      Overrides:
      getValue in class AbstractBaseEditPart
      Returns:
      The value of the widget.
    • setValue

      public void setValue(Object value)
      Description copied from class: AbstractBaseEditPart
      Set the value of the widget. This only takes effect on the visual presentation of the widget and will not write the value to the PV attached to this widget. Since setting value to a widget usually results in figure repaint, this method should be called in UI thread. To call it in non-UI thread, see AbstractBaseEditPart.setValueInUIThread(Object).
      Overrides:
      setValue in class AbstractBaseEditPart
      Parameters:
      value - the value to be set. It must be the compatible type for the widget. For example, a boolean widget only accept boolean or number.
    • getAdapter

      public Object getAdapter(Class key)
      Specified by:
      getAdapter in interface IAdaptable
      Overrides:
      getAdapter in class AbstractPVWidgetEditPart