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


Java ILabelProviderListener类代码示例

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


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

示例1: N4JSProjectExplorerLabelProvider

import org.eclipse.jface.viewers.ILabelProviderListener; //导入依赖的package包/类
/**
 * Sole constructor.
 */
public N4JSProjectExplorerLabelProvider() {
	decorator = new N4JSProjectExplorerProblemsDecorator();
	workbenchLabelProvider = new WorkbenchLabelProvider();
	delegate = new DecoratingLabelProvider(workbenchLabelProvider, decorator);
	workingSetLabelProviderListener = new ILabelProviderListener() {

		@Override
		public void labelProviderChanged(final LabelProviderChangedEvent event) {
			final LabelProviderChangedEvent wrapperEvent = createWorkingSetWrapperEvent(event);
			if (null != wrapperEvent) {
				UIUtils.getDisplay().asyncExec(() -> fireLabelProviderChanged(wrapperEvent));
			}
		}

	};
	delegate.addListener(workingSetLabelProviderListener);
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:21,代码来源:N4JSProjectExplorerLabelProvider.java

示例2: SynchronizeLabelDecorator

import org.eclipse.jface.viewers.ILabelProviderListener; //导入依赖的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

示例3: addListener

import org.eclipse.jface.viewers.ILabelProviderListener; //导入依赖的package包/类
/**
 * @see org.eclipse.jface.viewers.IBaseLabelProvider#addListener(org.eclipse.jface.viewers.ILabelProviderListener)
 */
public void addListener(ILabelProviderListener listener) {
    UiCorePlugin.getDefault().getAdapterFactoryLabelProvider().addListener(listener);
    // RND:refresh()
    // if( ViewerRegistry.getViewer() != null ) {
    // ViewerRegistry.getViewer().addPostSelectionChangedListener(new
    // ISelectionChangedListener() {
    //
    // /**
    // * @see
    // org.eclipse.jface.viewers.ISelectionChangedListener#selectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent)
    // */
    // public void selectionChanged(SelectionChangedEvent event) {
    // IStructuredSelection selection = (IStructuredSelection)
    // event.getSelection();
    // Object obj = selection.getFirstElement();
    // if( obj instanceof ITreeNode) {
    // FocusRegistry.setFocused( ((ITreeNode) obj).getEObject() );
    // }
    // }
    //
    // });
    // }
}
 
开发者ID:SK-HOLDINGS-CC,项目名称:NEXCORE-UML-Modeler,代码行数:27,代码来源:UMLLabelProvider.java

示例4: addListener

import org.eclipse.jface.viewers.ILabelProviderListener; //导入依赖的package包/类
@Override
public void addListener(ILabelProviderListener listener) {
	if (labelDecorator != null) {
		labelDecorator.addListener(listener);
	}
	super.addListener(listener);
}
 
开发者ID:eclipse,项目名称:gemoc-studio-modeldebugging,代码行数:8,代码来源:DecoratingColumLabelProvider.java

示例5: removeListener

import org.eclipse.jface.viewers.ILabelProviderListener; //导入依赖的package包/类
@Override
public void removeListener(ILabelProviderListener listener) {
	if (labelDecorator != null) {
		labelDecorator.addListener(listener);
	}
	super.removeListener(listener);
}
 
开发者ID:eclipse,项目名称:gemoc-studio-modeldebugging,代码行数:8,代码来源:DecoratingColumLabelProvider.java

示例6: fireChangeEvent

import org.eclipse.jface.viewers.ILabelProviderListener; //导入依赖的package包/类
protected final void fireChangeEvent ( final Collection<?> changes )
{

    final LabelProviderChangedEvent event = new LabelProviderChangedEvent ( ViewerLabelProvider.this, changes.toArray () );
    final ILabelProviderListener[] listenerArray = ViewerLabelProvider.this.listeners.toArray ( new ILabelProviderListener[ViewerLabelProvider.this.listeners.size ()] );

    final Display display = getDisplay ();
    if ( !display.isDisposed () )
    {
        display.asyncExec ( new Runnable () {

            public void run ()
            {
                for ( final ILabelProviderListener listener : listenerArray )
                {
                    try
                    {
                        listener.labelProviderChanged ( event );
                    }
                    catch ( final Exception e )
                    {
                        Policy.getLog ().log ( new Status ( IStatus.ERROR, Policy.JFACE_DATABINDING, e.getLocalizedMessage (), e ) );
                    }
                }

            }
        } );

    }
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:31,代码来源:ViewerLabelProvider.java

示例7: setPreserveCase

import org.eclipse.jface.viewers.ILabelProviderListener; //导入依赖的package包/类
/**
 * Sets the preserve case attribute
 * 
 * @param preserveCase
 *            the preserve case attribute
 */
public void setPreserveCase(boolean preserveCase) {
  this.preserveCase = preserveCase;

  // Since this attribute affects how the labels are computed,
  // notify all the listeners of the change.
  LabelProviderChangedEvent event = new LabelProviderChangedEvent(this);
  for (int i = 0, n = listeners.size(); i < n; i++) {
    ILabelProviderListener ilpl = (ILabelProviderListener) listeners
        .get(i);
    ilpl.labelProviderChanged(event);
  }
}
 
开发者ID:Transkribus,项目名称:TranskribusSwtGui,代码行数:19,代码来源:CheckFileTree.java

示例8: removeListener

import org.eclipse.jface.viewers.ILabelProviderListener; //导入依赖的package包/类
public void removeListener(ILabelProviderListener listener)
{
	if (fListeners != null)
	{
		fListeners.remove(listener);
		if (fListeners.isEmpty() && fProblemChangedListener != null)
		{
			EditorEplPlugin.getDefault().getProblemMarkerManager().removeListener(fProblemChangedListener);
			fProblemChangedListener = null;
		}
	}
}
 
开发者ID:apicloudcom,项目名称:APICloud-Studio,代码行数:13,代码来源:ProblemsLabelDecorator.java

示例9: removeListener

import org.eclipse.jface.viewers.ILabelProviderListener; //导入依赖的package包/类
@Override
public void removeListener(ILabelProviderListener listener) {
	if (fListeners == null)
		return;

	fListeners.remove(listener);

	if (fListeners.isEmpty() && fChangeListener != null) {
		TypeScriptCorePlugin.getDefault().removeTypeScriptElementChangedListener(fChangeListener);
		fChangeListener = null;
	}
}
 
开发者ID:angelozerr,项目名称:typescript.java,代码行数:13,代码来源:BuildpathIndicatorLabelDecorator.java

示例10: fireChange

import org.eclipse.jface.viewers.ILabelProviderListener; //导入依赖的package包/类
private void fireChange(IResource[] elements) {
	if (fListeners != null && !fListeners.isEmpty()) {
		LabelProviderChangedEvent event = new LabelProviderChangedEvent(this, elements);
		Object[] listeners = fListeners.getListeners();
		for (int i = 0; i < listeners.length; i++) {
			((ILabelProviderListener) listeners[i]).labelProviderChanged(event);
		}
	}
}
 
开发者ID:angelozerr,项目名称:typescript.java,代码行数:10,代码来源:BuildpathIndicatorLabelDecorator.java

示例11: DelegatingLabelProviderWithTooltip

import org.eclipse.jface.viewers.ILabelProviderListener; //导入依赖的package包/类
/**
 * 
 * @param wrappedLabelProvider
 * @param decorator
 */
DelegatingLabelProviderWithTooltip(ILabelProvider wrappedLabelProvider, ILabelDecorator decorator) {
	this.wrappedLabelProvider = wrappedLabelProvider;
	this.decorator = decorator;
	wrappedLabelProvider.addListener(new ILabelProviderListener() {
		
		@Override
		public void labelProviderChanged(LabelProviderChangedEvent event) {
			fireLabelProviderChanged(event);
		}
	});
}
 
开发者ID:cplutte,项目名称:bts,代码行数:17,代码来源:DelegatingLabelProviderWithTooltip.java

示例12: addListener

import org.eclipse.jface.viewers.ILabelProviderListener; //导入依赖的package包/类
@Override
public void addListener(ILabelProviderListener listener) {
	n4Labelprovider.addListener(listener);
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:5,代码来源:ImportProvidedElementLabelprovider.java

示例13: removeListener

import org.eclipse.jface.viewers.ILabelProviderListener; //导入依赖的package包/类
@Override
public void removeListener(ILabelProviderListener listener) {
	n4Labelprovider.removeListener(listener);
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:5,代码来源:ImportProvidedElementLabelprovider.java

示例14: addListener

import org.eclipse.jface.viewers.ILabelProviderListener; //导入依赖的package包/类
@Override
public void addListener(final ILabelProviderListener listener) {
	// no listeners are supported
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:5,代码来源:ProjectTypeLabelDecorator.java

示例15: removeListener

import org.eclipse.jface.viewers.ILabelProviderListener; //导入依赖的package包/类
@Override
public void removeListener(final ILabelProviderListener listener) {
	// no listeners are supported
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:5,代码来源:ProjectTypeLabelDecorator.java


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