當前位置: 首頁>>代碼示例>>Java>>正文


Java PropertyChangeEvent.getSource方法代碼示例

本文整理匯總了Java中org.eclipse.jface.util.PropertyChangeEvent.getSource方法的典型用法代碼示例。如果您正苦於以下問題:Java PropertyChangeEvent.getSource方法的具體用法?Java PropertyChangeEvent.getSource怎麽用?Java PropertyChangeEvent.getSource使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.eclipse.jface.util.PropertyChangeEvent的用法示例。


在下文中一共展示了PropertyChangeEvent.getSource方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: propertyChange

import org.eclipse.jface.util.PropertyChangeEvent; //導入方法依賴的package包/類
/**
 * This overrides the method in {@link FieldEditorPreferencePage}.
 * It disables the parse spec on spec module modify if the parse
 * module on modify option is de-selected and enables it when parse
 * module on modify is selected.
 */
public void propertyChange(PropertyChangeEvent event)
{
    if (event.getSource() instanceof BooleanFieldEditor)
    {
        BooleanFieldEditor parseModuleOnModifyField = (BooleanFieldEditor) event.getSource();
        if (parseModuleOnModifyField.getPreferenceName().equals(IPreferenceConstants.I_PARSE_MODULE_ON_MODIFY))
        {
            boolean parseModuleOnModify = parseModuleOnModifyField.getBooleanValue();
            if (parseModuleOnModify)
            {
                parseSpecField.setEnabled(true, getFieldEditorParent());
            } else
            {
                parseSpecField.setEnabled(false, getFieldEditorParent());
            }
        }
    }
    super.propertyChange(event);
}
 
開發者ID:tlaplus,項目名稱:tlaplus,代碼行數:26,代碼來源:ParserPreferencePage.java

示例2: propertyChange

import org.eclipse.jface.util.PropertyChangeEvent; //導入方法依賴的package包/類
@Override
public void propertyChange(PropertyChangeEvent event) {
    super.propertyChange(event);

    if (event.getProperty().equals(FieldEditor.VALUE)) {

        if (event.getSource() == getCacheHashCodeField()) {
            getHashCodeCachingField().setEnabled(getCacheHashCodeField().getBooleanValue(), getFieldEditorParent());

        } else if (event.getSource() == getCacheToStringField()) {
            getToStringCachingField().setEnabled(getCacheToStringField().getBooleanValue(), getFieldEditorParent());

        } else
            if (event.getSource() == getHashCodeCachingField() || event.getSource() == getToStringCachingField()) {
            checkState();
        }
    }
}
 
開發者ID:maximeAudrain,項目名稱:jenerate,代碼行數:19,代碼來源:JenerateBasePreferencePage.java

示例3: propertyChange

import org.eclipse.jface.util.PropertyChangeEvent; //導入方法依賴的package包/類
@Override
public final void propertyChange(final PropertyChangeEvent event)
{
  final Object eventSource = event.getSource();
  if (eventSource instanceof BooleanFieldEditor)
  {
    final BooleanFieldEditor featureEnabledEditor = (BooleanFieldEditor) eventSource;
    if (this.controlMapping.keySet().contains(featureEnabledEditor))
    {
      final boolean featureEnabled = featureEnabledEditor.getBooleanValue();
      for (FieldEditor fieldEditor : this.controlMapping.get(featureEnabledEditor))
      {
        fieldEditor.setEnabled(featureEnabled, getFieldEditorParent());
      }
    }
  }

  // Updated the apply button in every case because the property change
  // can be caused by a changed string or path value
  this.updateApplyButton();
}
 
開發者ID:ContextQuickie,項目名稱:ContextQuickie,代碼行數:22,代碼來源:ContextQuickie.java

示例4: propertyChange

import org.eclipse.jface.util.PropertyChangeEvent; //導入方法依賴的package包/類
@Override
public void propertyChange(PropertyChangeEvent event) {
    if (!key.equals(event.getProperty())) {
        return;
    }

    Object oldValuePlain = event.getOldValue();
    Object newValuePlain = event.getNewValue();
    if (!isValid(oldValuePlain) || !isValid(newValuePlain)) {
        return;
    }

    Object source = event.getSource();
    if (!(source instanceof IWorkbenchPart)) {
        return;
    }

    handleChange((IWorkbenchPart) source, (String) oldValuePlain, (String) newValuePlain);
}
 
開發者ID:Cooperate-Project,項目名稱:CooperateModelingEnvironment,代碼行數:20,代碼來源:PropertyChangeHandlerBase.java

示例5: propertyChange

import org.eclipse.jface.util.PropertyChangeEvent; //導入方法依賴的package包/類
@Override
public void propertyChange(final PropertyChangeEvent event) {
	super.propertyChange(event);
	if (event.getSource() instanceof BooleanFieldEditor) {
		final BooleanFieldEditor changedBooleanFieldEditor = (BooleanFieldEditor) event.getSource();
		final Boolean parentEnabled = (Boolean) event.getNewValue();
		for (final Entry<IPreference, FieldEditorWrapper> entry : fieldEditorMap.entrySet()) {
			if (entry.getValue().getFieldEditor().equals(changedBooleanFieldEditor)) {
				// Found!
				for (final IPreference childPreference : entry.getKey().getChildren()) {
					updateChildrenStatus(childPreference, parentEnabled);
				}
				break; // Done!
			}
		}
	}
}
 
開發者ID:Albertus82,項目名稱:JFaceUtils,代碼行數:18,代碼來源:BasePreferencePage.java

示例6: propertyChange

import org.eclipse.jface.util.PropertyChangeEvent; //導入方法依賴的package包/類
@Override
public void propertyChange(PropertyChangeEvent event)
{
	if (event.getSource() == enableFolding) // $codepro.audit.disable useEquals
	{
		Object newValue = event.getNewValue();
		if (Boolean.TRUE == newValue) // $codepro.audit.disable useEquals
		{
			foldComments.setEnabled(true, foldingGroup);
			foldFunctions.setEnabled(true, foldingGroup);
			foldObjects.setEnabled(true, foldingGroup);
			foldArrays.setEnabled(true, foldingGroup);
		}
		else
		{
			foldComments.setEnabled(false, foldingGroup);
			foldFunctions.setEnabled(false, foldingGroup);
			foldObjects.setEnabled(false, foldingGroup);
			foldArrays.setEnabled(false, foldingGroup);
		}
	}
	super.propertyChange(event);
}
 
開發者ID:apicloudcom,項目名稱:APICloud-Studio,代碼行數:24,代碼來源:JSPreferencePage.java

示例7: propertyChange

import org.eclipse.jface.util.PropertyChangeEvent; //導入方法依賴的package包/類
@Override
public void propertyChange(PropertyChangeEvent event)
{
	if (event.getSource() == enableFolding)
	{
		Object newValue = event.getNewValue();
		if (Boolean.TRUE == newValue)
		{
			foldComments.setEnabled(true, foldingGroup);
			foldRules.setEnabled(true, foldingGroup);
		}
		else
		{
			foldComments.setEnabled(false, foldingGroup);
			foldRules.setEnabled(false, foldingGroup);
		}
	}
	super.propertyChange(event);
}
 
開發者ID:apicloudcom,項目名稱:APICloud-Studio,代碼行數:20,代碼來源:CSSPreferencePage.java

示例8: propertyChange

import org.eclipse.jface.util.PropertyChangeEvent; //導入方法依賴的package包/類
/**
 * Enable or disable the reserved word section deprnds on the user input.
 * if the user input is "NOCHANGE" in the reserved case section, the reserved word section is disabled,
 * otherwise the option is enabled.
 *
 * @param PropertyChangeEvent event
 */
@Override
public void propertyChange(PropertyChangeEvent event) {
	if(event.getSource() instanceof RadioGroupFieldEditor){
		RadioGroupFieldEditor editor = (RadioGroupFieldEditor) event.getSource();
		if(editor.getPreferenceName().equals(UroborosqlFormatterPreferenceInitializer.RESERVED_CASE)) {
			if (CaseType.NOCHANGE.name().equals(event.getNewValue().toString())) {
				this.reservedWordsEditor.setEnabled(false, getFieldEditorParent());
			}else {
				this.reservedWordsEditor.setEnabled(true, getFieldEditorParent());
			}
		}
	}
}
 
開發者ID:future-architect,項目名稱:eclipse-uroborosql-formatter,代碼行數:21,代碼來源:UroborosqlFormatterPreferencePage.java

示例9: propertyChange

import org.eclipse.jface.util.PropertyChangeEvent; //導入方法依賴的package包/類
/**
 * {@inheritDoc}
 */
@Override
public void propertyChange(final PropertyChangeEvent event) {
	// not allowing blank fields on Preference page
	if (PreferencePage.Validation.EVENT_FIELD_EDITOR_VALUE.equals(event.getProperty())) {
		if (event.getSource() instanceof StringFieldEditor) {
			if (checkIfEmpty() && validateTimeout() && validateUrl()) {
				super.performApply();
				super.propertyChange(event);
				setValid(true);
			}
		}
	}
}
 
開發者ID:SAP,項目名稱:hybris-commerce-eclipse-plugin,代碼行數:17,代碼來源:HACPreferencePage.java

示例10: propertyChange

import org.eclipse.jface.util.PropertyChangeEvent; //導入方法依賴的package包/類
@Override
public final void propertyChange(PropertyChangeEvent event) {
	if (event.getSource() instanceof FieldEditor) {
		FieldEditor fe = (FieldEditor) event.getSource();
		internalStore.setValue(fe.getPreferenceName(), fe.getPreferenceStore().getDefaultString(fe.getPreferenceName()));
		fe.setPreferenceStore(internalStore);
		fe.store();
	}
	super.propertyChange(event);
}
 
開發者ID:cplutte,項目名稱:bts,代碼行數:11,代碼來源:AbstractDetailsPart.java

示例11: propertyChange

import org.eclipse.jface.util.PropertyChangeEvent; //導入方法依賴的package包/類
@Override
public void propertyChange(PropertyChangeEvent event) {
	super.propertyChange(event);
	Object source = event.getSource();
	if (event.getProperty().equals(FieldEditor.VALUE)) {
		this.updateFieldEditors();
	}
	if (getFields().contains(source)) {
		this.compilerPreferencesModified = true;
	}
}
 
開發者ID:cincheo,項目名稱:jsweet-eclipse-plugin,代碼行數:12,代碼來源:JSweetPreferencePage.java

示例12: propertyChange

import org.eclipse.jface.util.PropertyChangeEvent; //導入方法依賴的package包/類
@Override
public void propertyChange(PropertyChangeEvent event) {
	super.propertyChange(event);
	if (event.getProperty().equals("field_editor_value")) { //$NON-NLS-1$
		if (event.getSource() == bfeUSE)
			enableVirtualizers((Boolean) event.getNewValue());
		else if (event.getSource() == cfeType) {
			isSwap = event.getNewValue().equals(JRSwapFileVirtualizer.class.getName());
			enableSwapVirtualizer(isSwap);
		} else if (event.getSource() == mnumrec)
			enableLimitRecords((Integer) event.getNewValue() >= 0);
		else if (event.getSource() == bLimRec)
			enableLimitRecords((Boolean) event.getNewValue());
	}
}
 
開發者ID:OpenSoftwareSolutions,項目名稱:PDFReporter-Studio,代碼行數:16,代碼來源:ReportExecutionPreferencePage.java

示例13: propertyChange

import org.eclipse.jface.util.PropertyChangeEvent; //導入方法依賴的package包/類
public void propertyChange(PropertyChangeEvent event)
{
	Object value = event.getNewValue();
	if (value == null)
	{
		return;
	}

	RGB newColor = (RGB) value;
	Theme theme = getTheme();
	Object source = event.getSource();
	if (source == fgSelector)
	{
		theme.updateFG(newColor);
	}
	else if (source == selectionSelector)
	{
		theme.updateSelection(newColor);
	}
	else if (source == bgSelector)
	{
		theme.updateBG(newColor);
	}
	else if (source == lineHighlightSelector)
	{
		theme.updateLineHighlight(newColor);
	}
	else if (source == caretSelector)
	{
		theme.updateCaret(newColor);
	}
	setTheme(fSelectedTheme);
}
 
開發者ID:apicloudcom,項目名稱:APICloud-Studio,代碼行數:34,代碼來源:ThemePreferencePage.java

示例14: propertyChange

import org.eclipse.jface.util.PropertyChangeEvent; //導入方法依賴的package包/類
@Override
public void propertyChange(final PropertyChangeEvent event) {

	final String eventProperty = event.getProperty();

	if (eventProperty.equals(FieldEditor.VALUE)) {

		_isModified = true;

		if (event.getSource() == _editorTourPaintMethod) {

			// display info for the selected paint method
			final String newValue = (String) event.getNewValue();
			final String oldValue = (String) event.getOldValue();

			if (oldValue.equals(TOUR_PAINT_METHOD_SIMPLE)
					&& newValue.equals(TOUR_PAINT_METHOD_COMPLEX)
					&& net.tourbook.common.UI.IS_OSX) {

				MessageDialog.openWarning(
						getShell(),
						Messages.Pref_MapLayout_Dialog_OSX_Warning_Title,
						Messages.Pref_MapLayout_Dialog_OSX_Warning_Message);
			}

			setUIPaintMethodInfo(newValue);
		}

		enableControls();
	}

	super.propertyChange(event);

	if (_chkLiveUpdate.getSelection()) {
		performApply();
	}
}
 
開發者ID:wolfgang-ch,項目名稱:mytourbook,代碼行數:38,代碼來源:PrefPageMap2Appearance.java

示例15: propertyChange

import org.eclipse.jface.util.PropertyChangeEvent; //導入方法依賴的package包/類
@Override
	public void propertyChange(final PropertyChangeEvent event) {

//		final String property = event.getProperty();

		final Object source = event.getSource();
		if (source instanceof FieldEditor) {

			final String prefName = ((FieldEditor) source).getPreferenceName();

			if (prefName.equals(IPhotoPreferences.PHOTO_VIEWER_COLOR_FOREGROUND)
					|| prefName.equals(IPhotoPreferences.PHOTO_VIEWER_COLOR_BACKGROUND)
					|| prefName.equals(IPhotoPreferences.PHOTO_VIEWER_COLOR_SELECTION_FOREGROUND)
					|| prefName.equals(IPhotoPreferences.PHOTO_VIEWER_IS_SHOW_FILE_FOLDER)
					|| prefName.equals(IPhotoPreferences.PHOTO_VIEWER_COLOR_FOLDER)
					|| prefName.equals(IPhotoPreferences.PHOTO_VIEWER_COLOR_FILE)
					|| prefName.equals(IPhotoPreferences.PHOTO_VIEWER_FONT)
			//
			) {

				_isImageViewerUIModified = true;
			}
		}

/////// show selected font as text
//		System.out.println(event.getNewValue());
//		// TODO remove SYSTEM.OUT.PRINTLN

		super.propertyChange(event);
	}
 
開發者ID:wolfgang-ch,項目名稱:mytourbook,代碼行數:31,代碼來源:PrefPagePhotoDirectory.java


注:本文中的org.eclipse.jface.util.PropertyChangeEvent.getSource方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。