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


Java PropertyChangeEvent.getProperty方法代码示例

本文整理汇总了Java中org.eclipse.jface.util.PropertyChangeEvent.getProperty方法的典型用法代码示例。如果您正苦于以下问题:Java PropertyChangeEvent.getProperty方法的具体用法?Java PropertyChangeEvent.getProperty怎么用?Java PropertyChangeEvent.getProperty使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.eclipse.jface.util.PropertyChangeEvent的用法示例。


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

示例1: getStrategy

import org.eclipse.jface.util.PropertyChangeEvent; //导入方法依赖的package包/类
/**
 * Returns with the strategy for the given property change even argument,
 *
 * @param event
 *            a property change argument.
 * @return a strategy encapsulating an actual working set manager modification.
 */
public WorkingSetManagerModificationStrategy getStrategy(final PropertyChangeEvent event) {

	if (event == null) {
		return NOOP;
	}

	final String property = event.getProperty();
	switch (property) {
	case CHANGE_WORKING_SET_ADD:
		return new AddWorkingSetModificationStrategy((IWorkingSet) event.getNewValue());
	case CHANGE_WORKING_SET_REMOVE:
		return new RemoveWorkingSetModificationStrategy((IWorkingSet) event.getOldValue());
	case CHANGE_WORKING_SET_LABEL_CHANGE: //$FALL-THROUGH$
	case CHANGE_WORKING_SET_NAME_CHANGE: //$FALL-THROUGH$
	case CHANGE_WORKING_SET_CONTENT_CHANGE:
		return new UpdateWorkingSetModificationStraregy(
				(IWorkingSet) event.getOldValue(),
				(IWorkingSet) event.getNewValue());
	default:
		return NOOP;
	}
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:30,代码来源:WorkingSetManagerModificationStrategyProvider.java

示例2: propertyChange

import org.eclipse.jface.util.PropertyChangeEvent; //导入方法依赖的package包/类
/**
 * @see IPropertyChangeListener#propertyChange(PropertyChangeEvent)
 */
public void propertyChange(PropertyChangeEvent event) {
    String property = event.getProperty();
    if (property == ISVNUIConstants.PREF_SVNINTERFACE) {
        String newValue = (String)event.getNewValue();
        setSvnClientInterface(newValue);
    }
    if (property == ISVNUIConstants.PREF_SVNCONFIGDIR) {
    	String configDir = (String)event.getNewValue();
        setSvnClientConfigDir(configDir);
    }
    if (property == ISVNUIConstants.PREF_FETCH_CHANGE_PATH_ON_DEMAND) {
    	boolean fetchChangePathOnDemand = ((Boolean) event.getNewValue()).booleanValue();
    	setSvnChangePathOnDemand(fetchChangePathOnDemand);        	
    }
        
}
 
开发者ID:subclipse,项目名称:subclipse,代码行数:20,代码来源:Preferences.java

示例3: handlePreferenceStoreChanged

import org.eclipse.jface.util.PropertyChangeEvent; //导入方法依赖的package包/类
/**
 * Handles a property change event describing a change of the editor's preference delta and updates
 * the preference related editor properties.
 *
 * @param event the property change event
 */
@Override
protected void handlePreferenceStoreChanged(PropertyChangeEvent event) {
	String property = event.getProperty();
	try {
		SourceViewerConfiguration config = getSourceViewerConfiguration();
		if (config != null) ((FluentMkSourceViewerConfiguration) config).handlePropertyChangeEvent(event);

		if (Prefs.EDITOR_TAB_WIDTH.equals(property)) {
			StyledText textWidget = getViewer().getTextWidget();
			int tabWidth = getSourceViewerConfiguration().getTabWidth(getViewer());
			if (textWidget.getTabs() != tabWidth) {
				textWidget.setTabs(tabWidth);
			}
			uninstallTabsToSpacesConverter();
			if (isTabsToSpacesConversionEnabled()) {
				installTabsToSpacesConverter();
			} else {
				updateIndentPrefixes();
			}
			return;
		}
	} finally {
		super.handlePreferenceStoreChanged(event);
	}
}
 
开发者ID:grosenberg,项目名称:fluentmark,代码行数:32,代码来源:FluentMkEditor.java

示例4: adaptToColorChange

import org.eclipse.jface.util.PropertyChangeEvent; //导入方法依赖的package包/类
private void adaptToColorChange(Token token, PropertyChangeEvent event) {
	RGB rgb = null;

	Object value = event.getNewValue();
	if (value instanceof RGB) {
		rgb = (RGB) value;
	} else if (value instanceof String) {
		rgb = StringConverter.asRGB((String) value);
	}

	if (rgb != null) {

		String property = event.getProperty();
		Color color = colorMgr.getColor(property);
		if (!rgb.equals(color.getRGB())) {
			colorMgr.setValue(property, rgb);
			color = colorMgr.getColor(property);
		}

		Object data = token.getData();
		if (data instanceof TextAttribute) {
			TextAttribute oldAttr = (TextAttribute) data;
			token.setData(new TextAttribute(color, oldAttr.getBackground(), oldAttr.getStyle()));
		}
	}
}
 
开发者ID:grosenberg,项目名称:fluentmark,代码行数:27,代码来源:AbstractBufferedRuleBasedScanner.java

示例5: addPrefListener

import org.eclipse.jface.util.PropertyChangeEvent; //导入方法依赖的package包/类
private void addPrefListener() {

		_prefChangeListener = new IPropertyChangeListener() {
			@Override
			public void propertyChange(final PropertyChangeEvent event) {

				final String property = event.getProperty();

				if (property.equals(IPhotoPreferences.PHOTO_VIEWER_PREF_EVENT_IMAGE_VIEWER_UI_IS_MODIFIED)) {

					updateColors(false);
				}
			}
		};
		_prefStore.addPropertyChangeListener(_prefChangeListener);
	}
 
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:17,代码来源:TourPhotosView.java

示例6: propertyChange

import org.eclipse.jface.util.PropertyChangeEvent; //导入方法依赖的package包/类
/**
 * Sets default preference values. These values will be used until some
 * preferences are actually set using the preference dialog.
 * 
 * @see org.eclipse.ui.plugin.AbstractUIPlugin#initializeDefaultPreferences(org.eclipse.jface.preference.IPreferenceStore)
 */
// protected void initializeDefaultPreferences(IPreferenceStore aStore)
// {
// super.initializeDefaultPreferences(aStore);
// aStore.setDefault(IPreferencesConstants.EDITOR_SHOW_SEGMENTS, false);
// aStore.setDefault(IPreferencesConstants.VELOCITY_COUNTER_NAME,
// "velocityCount");
// aStore.setDefault(IPreferencesConstants.VELOCITY_USER_DIRECTIVES, "");
// VelocityColorProvider.initializeDefaults(aStore);
// }
/*
 * (non-Javadoc)
 * 
 * @see org.eclipse.jface.util.IPropertyChangeListener#propertyChange(org.eclipse.jface.util.PropertyChangeEvent)
 */
public void propertyChange(PropertyChangeEvent anEvent)
{
    String prop = anEvent.getProperty();
    VelocityEditorEnvironment.getColorProvider().handlePreferenceStoreChanged(anEvent);
    if (prop.equals(IPreferencesConstants.VELOCITY_USER_DIRECTIVES) || prop.equals(IPreferencesConstants.LIBRARY_LIST))
    {
        VelocityEditorEnvironment.createVelocityParser();
    }
}
 
开发者ID:ninneko,项目名称:velocity-edit,代码行数:30,代码来源:VelocityPlugin.java

示例7: addPrefListener

import org.eclipse.jface.util.PropertyChangeEvent; //导入方法依赖的package包/类
/**
 * listen for changes in the person list
 */
private void addPrefListener() {

	_prefChangeListener = new IPropertyChangeListener() {
		@Override
		public void propertyChange(final PropertyChangeEvent event) {

			final String property = event.getProperty();

			if (property.equals(ITourbookPreferences.MEASUREMENT_SYSTEM)) {

				_isFireSelectionEvent = false;
				{
					selectSystemFromPrefStore(_combo);
				}
				_isFireSelectionEvent = true;
			}
		}

	};
	// register the listener
	_prefStore.addPropertyChangeListener(_prefChangeListener);
}
 
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:26,代码来源:MeasurementSystemContributionItem.java

示例8: addPrefListener

import org.eclipse.jface.util.PropertyChangeEvent; //导入方法依赖的package包/类
private void addPrefListener() {

		_prefListener = new IPropertyChangeListener() {

			@Override
			public void propertyChange(final PropertyChangeEvent event) {

				final String property = event.getProperty();
				if (property.equals(ITourbookPreferences.APPEARANCE_SHOW_TOUR_TYPE_CONTEXT_MENU)) {

					if (event.getNewValue() instanceof Boolean) {
						_isShowTourTypeContextMenu = (Boolean) event.getNewValue();
					}
				}
			}
		};

		_prefStore.addPropertyChangeListener(_prefListener);
	}
 
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:20,代码来源:TourTypeContributionItem.java

示例9: addPrefListener

import org.eclipse.jface.util.PropertyChangeEvent; //导入方法依赖的package包/类
private void addPrefListener() {

		_prefChangeListener = new IPropertyChangeListener() {
			@Override
			public void propertyChange(final PropertyChangeEvent event) {

				final String property = event.getProperty();

				if (property.equals(ITourbookPreferences.MEASUREMENT_SYSTEM)) {

					// measurement system has changed

				} else if (property.equals(ITourbookPreferences.GRAPH_MARKER_IS_MODIFIED)) {

					updateUI();
				}
			}
		};
		_prefStore.addPropertyChangeListener(_prefChangeListener);
	}
 
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:21,代码来源:TourBlogView.java

示例10: isEventOfInterest

import org.eclipse.jface.util.PropertyChangeEvent; //导入方法依赖的package包/类
private boolean isEventOfInterest(PropertyChangeEvent event) {
     String prop = event.getProperty();
     return prop.equals(TeamUI.GLOBAL_IGNORES_CHANGED) 
     	|| prop.equals(TeamUI.GLOBAL_FILE_TYPES_CHANGED) 
     	|| prop.equals(SVNUIPlugin.P_DECORATORS_CHANGED)
|| prop.equals(SVNDecoratorConfiguration.OUTGOING_CHANGE_BACKGROUND_COLOR)
|| prop.equals(SVNDecoratorConfiguration.OUTGOING_CHANGE_FOREGROUND_COLOR)
|| prop.equals(SVNDecoratorConfiguration.OUTGOING_CHANGE_FONT)
|| prop.equals(SVNDecoratorConfiguration.IGNORED_FOREGROUND_COLOR)
|| prop.equals(SVNDecoratorConfiguration.IGNORED_BACKGROUND_COLOR)
|| prop.equals(SVNDecoratorConfiguration.IGNORED_FONT);
 }
 
开发者ID:subclipse,项目名称:subclipse,代码行数:13,代码来源:SVNLightweightDecorator.java

示例11: propertyChange

import org.eclipse.jface.util.PropertyChangeEvent; //导入方法依赖的package包/类
@Override
public void propertyChange(PropertyChangeEvent event) {
  if (event.getProperty() == DirectoryFieldEditor.IS_VALID) {
    fireValueChanged(IS_VALID, event.getOldValue(), event.getNewValue());
  } else if (event.getProperty() == DirectoryFieldEditor.VALUE) {
    fireValueChanged(VALUE, event.getOldValue(), event.getNewValue());
  }
}
 
开发者ID:GoogleCloudPlatform,项目名称:google-cloud-eclipse,代码行数:9,代码来源:CloudSdkPreferenceArea.java

示例12: propertyChange

import org.eclipse.jface.util.PropertyChangeEvent; //导入方法依赖的package包/类
/**
 * Changes between wrap types (soft <-> hard) if wrap toggle
 * button is checked.
 */
public void propertyChange(PropertyChangeEvent event) {
    String ev = event.getProperty();
    if (ev.equals("wrapType")) {
        if (!off) {
            setType();
        }
    }
}
 
开发者ID:eclipse,项目名称:texlipse,代码行数:13,代码来源:TexWordWrapAction.java

示例13: propertyChange

import org.eclipse.jface.util.PropertyChangeEvent; //导入方法依赖的package包/类
/**
 * The IPropertyChangeListener method.
 * Re-reads the settings from preferences.
 */
public void propertyChange(PropertyChangeEvent event) {
    String prop = event.getProperty();
    if (prop.startsWith("spell")) {
        // encoding, program args or program path changed
        //BuilderRegistry.printToConsole("spelling property changed: " + prop);
        stopProgram();
        readSettings();
    }
}
 
开发者ID:eclipse,项目名称:texlipse,代码行数:14,代码来源:SpellChecker.java

示例14: configure

import org.eclipse.jface.util.PropertyChangeEvent; //导入方法依赖的package包/类
@Override
public void configure(SourceViewerConfiguration config) {
	super.configure(config);
	if (config instanceof Configuration) {
		configuration = (Configuration) config;
		configurePreferenceKeys();
		// Install a listener
		hyperlinkChangeListener = new IPropertyChangeListener() {
			@Override
			public void propertyChange(PropertyChangeEvent event) {
				String property = event.getProperty();
				if (preferenceKeysForEnablement.contains(property)) {
					resetHyperlinkDetectors();
					final Control control = getControl();
					if (control != null && !control.isDisposed()) {
						control.getDisplay().asyncExec(new Runnable() {
							@Override
							public void run() {
								if (!control.isDisposed()) {
									refresh();
								}
							}
						});
					}
				} else if (preferenceKeysForActivation.contains(property)) {
					resetHyperlinkDetectors();
				}
			}
		};
		EditorsUI.getPreferenceStore()
				.addPropertyChangeListener(hyperlinkChangeListener);
	} else {
		configuration = null;
		hyperlinkChangeListener = null;
	}
}
 
开发者ID:cchabanois,项目名称:mesfavoris,代码行数:37,代码来源:HyperlinkSourceViewer.java

示例15: propertyChange

import org.eclipse.jface.util.PropertyChangeEvent; //导入方法依赖的package包/类
@Override
public void propertyChange(PropertyChangeEvent event) {
	switch (event.getProperty()) {
		case EDITOR_CSS_CUSTOM:
		case EDITOR_CSS_DEFAULT:
			viewjob.update();
	}
}
 
开发者ID:grosenberg,项目名称:fluentmark,代码行数:9,代码来源:FluentMkPreview.java


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