當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。