当前位置: 首页>>代码示例>>Java>>正文


Java IPropertyChangeListener类代码示例

本文整理汇总了Java中org.eclipse.jface.util.IPropertyChangeListener的典型用法代码示例。如果您正苦于以下问题:Java IPropertyChangeListener类的具体用法?Java IPropertyChangeListener怎么用?Java IPropertyChangeListener使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


IPropertyChangeListener类属于org.eclipse.jface.util包,在下文中一共展示了IPropertyChangeListener类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: attachVisibleExpression

import org.eclipse.jface.util.IPropertyChangeListener; //导入依赖的package包/类
private void attachVisibleExpression ( final ViewInstanceDescriptor descriptor, final IEvaluationService evaluationService )
{
    if ( descriptor.getVisibleExpression () != null )
    {
        this.visibileRef = evaluationService.addEvaluationListener ( descriptor.getVisibleExpression (), new IPropertyChangeListener () {

            @Override
            public void propertyChange ( final PropertyChangeEvent event )
            {
                if ( PROP_VISIBLE.equals ( event.getProperty () ) && event.getNewValue () instanceof Boolean )
                {
                    setVisibleState ( (Boolean)event.getNewValue () );
                }
            }
        }, PROP_VISIBLE );
    }
    else
    {
        setVisibleState ( true );
    }
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:22,代码来源:AbstractViewInstance.java

示例2: attachLazyExpression

import org.eclipse.jface.util.IPropertyChangeListener; //导入依赖的package包/类
private void attachLazyExpression ( final ViewInstanceDescriptor descriptor, final IEvaluationService evaluationService )
{
    if ( descriptor.getLazyExpression () != null )
    {
        this.lazyRef = evaluationService.addEvaluationListener ( descriptor.getLazyExpression (), new IPropertyChangeListener () {

            @Override
            public void propertyChange ( final PropertyChangeEvent event )
            {
                if ( PROP_LAZY.equals ( event.getProperty () ) && event.getNewValue () instanceof Boolean )
                {
                    setLazy ( (Boolean)event.getNewValue () );
                }
            }
        }, PROP_LAZY );
    }
    else
    {
        setLazy ( false );
    }
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:22,代码来源:AbstractViewInstance.java

示例3: attachDefaultInstanceExpression

import org.eclipse.jface.util.IPropertyChangeListener; //导入依赖的package包/类
private void attachDefaultInstanceExpression ( final ViewInstanceDescriptor descriptor, final IEvaluationService evaluationService )
{
    if ( descriptor.getDefaultInstanceExpression () != null )
    {
        this.defaultInstanceRef = evaluationService.addEvaluationListener ( descriptor.getDefaultInstanceExpression (), new IPropertyChangeListener () {

            @Override
            public void propertyChange ( final PropertyChangeEvent event )
            {
                if ( PROP_DEFAULT_INSTANCE.equals ( event.getProperty () ) && event.getNewValue () instanceof Boolean )
                {
                    setDefaultInstance ( (Boolean)event.getNewValue () );
                }
            }
        }, PROP_DEFAULT_INSTANCE );
    }
    else
    {
        setDefaultInstance ( descriptor.isDefaultInstance () );
    }
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:22,代码来源:AbstractViewInstance.java

示例4: PreferenceSelectorStyleGenerator

import org.eclipse.jface.util.IPropertyChangeListener; //导入依赖的package包/类
public PreferenceSelectorStyleGenerator ( final IPreferenceStore preferenceStore )
{
    this.preferenceStore = preferenceStore;
    this.preferenceStore.addPropertyChangeListener ( new IPropertyChangeListener () {

        @Override
        public void propertyChange ( final PropertyChangeEvent event )
        {
            logger.trace ( "Property change - name: {}, newValue: {}", event.getProperty (), event.getNewValue () ); //$NON-NLS-1$
            if ( PreferenceConstants.PREF_STYLE_GENERATOR_ID.equals ( event.getProperty () ) )
            {
                logger.info ( "Change of style generator: {}", event.getNewValue () ); //$NON-NLS-1$
                handleChange ( event.getNewValue () );
            }
        }
    } );

    setInitial ();
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:20,代码来源:PreferenceSelectorStyleGenerator.java

示例5: AbstractEditorPreferences

import org.eclipse.jface.util.IPropertyChangeListener; //导入依赖的package包/类
public AbstractEditorPreferences() {
	store = createStore();
	store.addPropertyChangeListener(new IPropertyChangeListener() {
		
		@Override
		public void propertyChange(PropertyChangeEvent event) {
			if (event==null){
				return;
			}
			String property = event.getProperty();
			if (property==null){
				return;
			}
			boolean colorChanged = checkPropertyMeansEditorColorsChanged(property);
			if (colorChanged){
				updateColorsInEditors();
			}
			
			
		}
		
	});
}
 
开发者ID:de-jcup,项目名称:egradle,代码行数:24,代码来源:AbstractEditorPreferences.java

示例6: start

import org.eclipse.jface.util.IPropertyChangeListener; //导入依赖的package包/类
@Override
public void start(BundleContext context) throws Exception {
  plugin = this;
  super.start(context);
  this.command = new BazelCommand(new BazelAspectLocationImpl(), new CommandConsoleFactoryImpl());
  // Get the bazel path from the settings
  this.command.setBazelPath(getPreferenceStore().getString("BAZEL_PATH"));
  getPreferenceStore().addPropertyChangeListener(new IPropertyChangeListener() {
    @Override
    public void propertyChange(PropertyChangeEvent event) {
      if (event.getProperty().equals("BAZEL_PATH")) {
        command.setBazelPath(event.getNewValue().toString());
      }
    }
  });
}
 
开发者ID:bazelbuild,项目名称:eclipse,代码行数:17,代码来源:Activator.java

示例7: SynchronizeLabelDecorator

import org.eclipse.jface.util.IPropertyChangeListener; //导入依赖的package包/类
public SynchronizeLabelDecorator(final Subscriber subscriber) {
    this.subscriber = subscriber;

    preferenceStore = new ScopedPreferenceStore(new InstanceScope(), TEAM_UI_PLUGIN_ID);

    decorate = Boolean.TRUE.equals(preferenceStore.getBoolean(DECORATION_PREFERENCE_CONSTANT));

    preferenceStore.addPropertyChangeListener(new IPropertyChangeListener() {
        @Override
        public void propertyChange(final PropertyChangeEvent event) {
            if (event.getProperty().equals(DECORATION_PREFERENCE_CONSTANT)) {
                /*
                 * Note that we compare against the string value of the
                 * preference here. Preferences are not strongly typed
                 * (they're strings under the hood), so in the property
                 * change event, we're given the string value.
                 */
                decorate = "true".equals(event.getNewValue()); //$NON-NLS-1$

                ((ILabelProviderListener) listeners.getListener()).labelProviderChanged(
                    new LabelProviderChangedEvent(SynchronizeLabelDecorator.this));
            }
        }
    });
}
 
开发者ID:Microsoft,项目名称:team-explorer-everywhere,代码行数:26,代码来源:SynchronizeLabelDecorator.java

示例8: createDialogArea

import org.eclipse.jface.util.IPropertyChangeListener; //导入依赖的package包/类
protected Control createDialogArea(Composite parent) {
	getShell().setText(Policy.bind("ReleaseCommentDialog.title")); //$NON-NLS-1$
	Composite composite = new Composite(parent, SWT.NULL);
	composite.setLayout(new GridLayout());
	composite.setLayoutData(new GridData(GridData.FILL_BOTH));
	
	commitCommentArea.createArea(composite);
	commitCommentArea.addPropertyChangeListener(new IPropertyChangeListener() {
		public void propertyChange(PropertyChangeEvent event) {
			if (event.getProperty() == CommitCommentArea.OK_REQUESTED)
				okPressed();
		}
	});
	
	// set F1 help
	PlatformUI.getWorkbench().getHelpSystem().setHelp(composite, IHelpContextIds.RELEASE_COMMENT_DIALOG);	
	
	return composite;
}
 
开发者ID:subclipse,项目名称:subclipse,代码行数:20,代码来源:ReleaseCommentDialog.java

示例9: createContents

import org.eclipse.jface.util.IPropertyChangeListener; //导入依赖的package包/类
@Override
public Control createContents(Composite parent) {
  Composite container = new Composite(parent, SWT.NONE);
  parent.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
  fieldEditor = createFieldEditor(container);
  fieldEditor.setPage(messages);
  fieldEditor.setPropertyChangeListener(new IPropertyChangeListener() {
    @Override
    public void propertyChange(PropertyChangeEvent event) {
      if (FieldEditor.IS_VALID.equals(event.getProperty())) {
        fireValueChanged(IS_VALID, event.getOldValue(), event.getNewValue());
      } else if (FieldEditor.VALUE.equals(event.getProperty())) {
        fireValueChanged(VALUE, event.getOldValue(), event.getNewValue());
      }
    }
  });
  fieldEditor.setPreferenceStore(getPreferenceStore());
  fieldEditor.load();
  fieldEditor.fillIntoGrid(container, fieldEditor.getNumberOfControls());
  return container;
}
 
开发者ID:GoogleCloudPlatform,项目名称:google-cloud-eclipse,代码行数:22,代码来源:FieldEditorWrapper.java

示例10: init

import org.eclipse.jface.util.IPropertyChangeListener; //导入依赖的package包/类
@Override
public void init(IPageBookViewPage page, IConsole console) {
  Preconditions.checkArgument(console instanceof DeployConsole,
                              "console should be instance of %s",
                              DeployConsole.class.getName());
  this.console = (DeployConsole) console;

  console.addPropertyChangeListener(new IPropertyChangeListener() {
    @Override
    public void propertyChange(PropertyChangeEvent event) {
      if (event.getProperty().equals(DeployConsole.PROPERTY_JOB)) {
        // keep the order of adding a listener and then calling update() to ensure update
        // is called regardless of when the job finishes
        addJobChangeListener();
        update();
      }
    }
  });
  IActionBars actionBars = page.getSite().getActionBars();
  configureToolBar(actionBars.getToolBarManager());
  // keep the order of adding a listener and then calling update() to ensure update
  // is called regardless of when the job finishes
  addJobChangeListener();
  update();
}
 
开发者ID:GoogleCloudPlatform,项目名称:google-cloud-eclipse,代码行数:26,代码来源:DeployConsolePageParticipant.java

示例11: addOfflineChangedListener

import org.eclipse.jface.util.IPropertyChangeListener; //导入依赖的package包/类
@Override
public void addOfflineChangedListener(OnValueChanged<Boolean> onChange) {
	preferenceStore.addPropertyChangeListener(new IPropertyChangeListener() {
		@Override
		public void propertyChange(PropertyChangeEvent event) {
			if (event.getProperty().equals(FtcPreferenceStore.KEY_OFFLINE)) {
				boolean recent = offline;
				offline = Unbox.asBoolean(event.getNewValue());
				if (recent != offline) {
					onChange.notify(offline);
					refreshEditors();
					if (offline)
						logging.Info("working offline");
				}
			}
		}
	});

}
 
开发者ID:curiosag,项目名称:ftc,代码行数:20,代码来源:FtcPluginFrontEnd.java

示例12: FtcEditor

import org.eclipse.jface.util.IPropertyChangeListener; //导入依赖的package包/类
public FtcEditor() {
	super();
	sourceViewerConfiguration = new FtcSourceViewerConfiguration();
	setSourceViewerConfiguration(sourceViewerConfiguration);

	IPreferenceStore pref = FtcPluginClient.getDefault().getPreferenceStore();
	showCaretPosition = pref.getBoolean(FtcPreferenceStore.KEY_SHOW_CARETPOS);

	pref.addPropertyChangeListener(new IPropertyChangeListener() {
		@Override
		public void propertyChange(PropertyChangeEvent event) {
			if (event.getProperty().equals(FtcPreferenceStore.KEY_SHOW_CARETPOS)) {
				showCaretPosition = Unbox.asBoolean(event.getNewValue());
				if (!showCaretPosition)
					setStatusLineMessage("");
			}
		}
	});

}
 
开发者ID:curiosag,项目名称:ftc,代码行数:21,代码来源:FtcEditor.java

示例13: TexlipseAnnotationUpdater

import org.eclipse.jface.util.IPropertyChangeListener; //导入依赖的package包/类
/**
 * Creates a new TexlipseAnnotationUpdater and adds itself to the TexEditor via
 * <code>addPostSelectionChangedListener</code>
 * @param editor The TexEditor
 */
public TexlipseAnnotationUpdater (AbstractTextEditor editor) {
    //Add this listener to the current editors IPostSelectionListener (lazy update)
    ((IPostSelectionProvider) editor.getSelectionProvider()).addPostSelectionChangedListener(this);
    fEditor = editor;
    fEnabled = TexlipsePlugin.getDefault().getPreferenceStore().getBoolean(
            TexlipseProperties.TEX_EDITOR_ANNOTATATIONS);
    
    //Add a PropertyChangeListener
    TexlipsePlugin.getDefault().getPreferenceStore().addPropertyChangeListener(new  
            IPropertyChangeListener() {
        
        public void propertyChange(PropertyChangeEvent event) {    
            String property = event.getProperty();
            if (TexlipseProperties.TEX_EDITOR_ANNOTATATIONS.equals(property)) {
                boolean enabled = TexlipsePlugin.getDefault().getPreferenceStore().getBoolean(
                                TexlipseProperties.TEX_EDITOR_ANNOTATATIONS);
                fEnabled = enabled;
            }
        }
    });
}
 
开发者ID:eclipse,项目名称:texlipse,代码行数:27,代码来源:TexlipseAnnotationUpdater.java

示例14: registerPropertyChangeListeners

import org.eclipse.jface.util.IPropertyChangeListener; //导入依赖的package包/类
private void registerPropertyChangeListeners() {
	final IPreferenceStore store = getDefault().getPreferenceStore();

	getDefault().getPreferenceStore().addPropertyChangeListener(new IPropertyChangeListener() {
		@Override
		public void propertyChange(PropertyChangeEvent event) {

			String property = event.getProperty();

			if (property.equals(CONFIG_VERBOSE.longName())) {
				Logger.setVerbose(store.getBoolean(property));
			} else if (property.equals(CONFIG_MAX_THREADS.longName())) {
				DEFAULT_MAX_THREADS = store.getInt(property);
			} else if (property.equals(CONFIG_QUEUES_SIZE.longName())) {
				DEFAULT_QUEUE_SIZE = store.getInt(property);
			} else if (property.equals(CONFIG_STREAM_BUFFERS_SIZE.longName())) {
				DEFAULT_STREAM_BUFFER_SIZE = store.getInt(property);
			} else if (property.equals(CONFIG_REMOVE_TEMP_TRACE_FILES.longName())) {
				DEFAULT_REMOVE_TEMP_TRACE_FILES = store.getBoolean(property);
			} else if (property.equals(CONFIG_MINIMIZE_MEMORY_USAGE.longName())) {
				DEFAULT_MINIMIZE_MEMORY_USAGE = store.getBoolean(property);
			}
		}
	});

}
 
开发者ID:turnus,项目名称:turnus,代码行数:27,代码来源:Activator.java

示例15: TLCPreferencePage

import org.eclipse.jface.util.IPropertyChangeListener; //导入依赖的package包/类
/**
   * Constructor
   */
  public TLCPreferencePage()
  {
      super(GRID);
      // Copy preference value to non-ui plugin.
      TLCUIActivator.getDefault().getPreferenceStore().addPropertyChangeListener(new IPropertyChangeListener() {
	@Override
	public void propertyChange(PropertyChangeEvent event) {
		final IPreferenceStore store = TLCActivator.getDefault().getPreferenceStore();
		if (TLCActivator.I_TLC_SNAPSHOT_KEEP_COUNT.equals(event.getProperty())) {
			store.setValue(TLCActivator.I_TLC_SNAPSHOT_KEEP_COUNT, (int)event.getNewValue());
		}
	}
});
setPreferenceStore(TLCUIActivator.getDefault().getPreferenceStore());
      setDescription("TLC Model Checker preferences");
  }
 
开发者ID:tlaplus,项目名称:tlaplus,代码行数:20,代码来源:TLCPreferencePage.java


注:本文中的org.eclipse.jface.util.IPropertyChangeListener类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。