本文整理汇总了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;
}
}
示例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);
}
}
示例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);
}
}
示例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()));
}
}
}
示例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);
}
示例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();
}
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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());
}
}
示例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();
}
}
}
示例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();
}
}
示例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;
}
}
示例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();
}
}