Search in sources :

Example 1 with PROP_NAME

use of org.csstudio.opibuilder.model.AbstractWidgetModel.PROP_NAME in project yamcs-studio by yamcs.

the class WidgetTreeEditpart method activate.

@Override
public void activate() {
    super.activate();
    PropertyChangeListener visualListener = evt -> refreshVisuals();
    var nameProperty = getWidgetModel().getProperty(PROP_NAME);
    if (nameProperty != null) {
        nameProperty.addPropertyChangeListener(visualListener);
    }
    var pvNameProperty = getWidgetModel().getProperty(PROP_PVNAME);
    if (pvNameProperty != null) {
        pvNameProperty.addPropertyChangeListener(visualListener);
    }
}
Also used : WidgetComponentEditPolicy(org.csstudio.opibuilder.editpolicies.WidgetComponentEditPolicy) WidgetsService(org.csstudio.opibuilder.util.WidgetsService) AbstractWidgetModel(org.csstudio.opibuilder.model.AbstractWidgetModel) Image(org.eclipse.swt.graphics.Image) PROP_PVNAME(org.csstudio.opibuilder.model.IPVWidgetModel.PROP_PVNAME) CustomMediaFactory(org.csstudio.ui.util.CustomMediaFactory) PROP_NAME(org.csstudio.opibuilder.model.AbstractWidgetModel.PROP_NAME) DisplayModel(org.csstudio.opibuilder.model.DisplayModel) PropertyChangeListener(java.beans.PropertyChangeListener) AbstractTreeEditPart(org.eclipse.gef.editparts.AbstractTreeEditPart) AbstractPVWidgetModel(org.csstudio.opibuilder.model.AbstractPVWidgetModel) Tree(org.eclipse.swt.widgets.Tree) ShowIndexInTreeViewAction(org.csstudio.opibuilder.actions.ShowIndexInTreeViewAction) WidgetTreeEditPolicy(org.csstudio.opibuilder.editpolicies.WidgetTreeEditPolicy) EditPolicy(org.eclipse.gef.EditPolicy) PropertyChangeListener(java.beans.PropertyChangeListener)

Aggregations

PropertyChangeListener (java.beans.PropertyChangeListener)1 ShowIndexInTreeViewAction (org.csstudio.opibuilder.actions.ShowIndexInTreeViewAction)1 WidgetComponentEditPolicy (org.csstudio.opibuilder.editpolicies.WidgetComponentEditPolicy)1 WidgetTreeEditPolicy (org.csstudio.opibuilder.editpolicies.WidgetTreeEditPolicy)1 AbstractPVWidgetModel (org.csstudio.opibuilder.model.AbstractPVWidgetModel)1 AbstractWidgetModel (org.csstudio.opibuilder.model.AbstractWidgetModel)1 PROP_NAME (org.csstudio.opibuilder.model.AbstractWidgetModel.PROP_NAME)1 DisplayModel (org.csstudio.opibuilder.model.DisplayModel)1 PROP_PVNAME (org.csstudio.opibuilder.model.IPVWidgetModel.PROP_PVNAME)1 WidgetsService (org.csstudio.opibuilder.util.WidgetsService)1 CustomMediaFactory (org.csstudio.ui.util.CustomMediaFactory)1 EditPolicy (org.eclipse.gef.EditPolicy)1 AbstractTreeEditPart (org.eclipse.gef.editparts.AbstractTreeEditPart)1 Image (org.eclipse.swt.graphics.Image)1 Tree (org.eclipse.swt.widgets.Tree)1