|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.net4j.util.ui.StructuredContentProvider<INPUT>
org.eclipse.net4j.util.ui.views.ItemProvider<INPUT>
public abstract class ItemProvider<INPUT>
Field Summary | |
---|---|
static Object[] |
NO_ELEMENTS
|
Constructor Summary | |
---|---|
ItemProvider()
|
Method Summary | |
---|---|
void |
addListener(ILabelProviderListener listener)
Adds a listener to this label provider. |
protected void |
fillContextMenu(IMenuManager manager,
ITreeSelection selection)
|
protected void |
fireLabelProviderChanged()
|
protected void |
fireLabelProviderChanged(Object element)
|
protected void |
fireLabelProviderChanged(Object[] elements)
|
Color |
getBackground(Object element)
Provides a background color for the given element. |
Object[] |
getElements(Object parent)
Returns the elements to display in the viewer when its input is set to the given element. |
Font |
getFont(Object element)
Provides a font for the given element. |
Color |
getForeground(Object element)
Provides a foreground color for the given element. |
Image |
getImage(Object obj)
Returns the image for the label of the given element. |
ILabelProviderListener[] |
getListeners()
|
String |
getText(Object obj)
Returns the text for the label of the given element. |
boolean |
hasChildren(Object parent)
Returns whether the given element has children. |
boolean |
isLabelProperty(Object element,
String property)
Returns whether the label would be affected by a change to the given property of the given element. |
void |
removeListener(ILabelProviderListener listener)
Removes a listener to this label provider. |
Methods inherited from class org.eclipse.net4j.util.ui.StructuredContentProvider |
---|
connectInput, disconnectInput, dispose, getDisplay, getInput, getItalicFont, getViewer, inputChanged, notifyEvent, refreshElement, refreshSynced, refreshViewer, revealElement, selectElement, updateLabels |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.eclipse.jface.viewers.ITreeContentProvider |
---|
getChildren, getParent |
Methods inherited from interface org.eclipse.jface.viewers.IContentProvider |
---|
dispose, inputChanged |
Methods inherited from interface org.eclipse.jface.viewers.IBaseLabelProvider |
---|
dispose |
Field Detail |
---|
public static final Object[] NO_ELEMENTS
Constructor Detail |
---|
public ItemProvider()
Method Detail |
---|
public final Object[] getElements(Object parent)
org.eclipse.jface.viewers.ITreeContentProvider
NOTE: The returned array must not contain the given
inputElement
, since this leads to recursion issues in
AbstractTreeViewer
(see
bug 9262).
getElements
in interface IStructuredContentProvider
getElements
in interface ITreeContentProvider
parent
- the input element
public boolean hasChildren(Object parent)
org.eclipse.jface.viewers.ITreeContentProvider
Intended as an optimization for when the viewer does not
need the actual children. Clients may be able to implement
this more efficiently than getChildren
.
hasChildren
in interface ITreeContentProvider
parent
- the element
true
if the given element has children,
and false
if it has no childrenpublic String getText(Object obj)
org.eclipse.jface.viewers.ILabelProvider
getText
in interface ILabelProvider
obj
- the element for which to provide the label text
null
if there is no text label for the given objectpublic Image getImage(Object obj)
org.eclipse.jface.viewers.ILabelProvider
getImage
in interface ILabelProvider
obj
- the element for which to provide the label image
null
if there is no image for the given objectpublic Color getBackground(Object element)
org.eclipse.jface.viewers.IColorProvider
getBackground
in interface IColorProvider
element
- the element
null
to use the default background colorpublic Color getForeground(Object element)
org.eclipse.jface.viewers.IColorProvider
getForeground
in interface IColorProvider
element
- the element
null
to use the default foreground colorpublic Font getFont(Object element)
org.eclipse.jface.viewers.IFontProvider
getFont
in interface IFontProvider
element
- the element
null
to use the default fontpublic boolean isLabelProperty(Object element, String property)
org.eclipse.jface.viewers.IBaseLabelProvider
isLabelProperty
in interface IBaseLabelProvider
element
- the elementproperty
- the property
true
if the label would be affected,
and false
if it would be unaffectedpublic ILabelProviderListener[] getListeners()
public void addListener(ILabelProviderListener listener)
org.eclipse.jface.viewers.IBaseLabelProvider
Label provider listeners are informed about state changes that affect the rendering of the viewer that uses this label provider.
addListener
in interface IBaseLabelProvider
listener
- a label provider listenerpublic void removeListener(ILabelProviderListener listener)
org.eclipse.jface.viewers.IBaseLabelProvider
removeListener
in interface IBaseLabelProvider
listener
- a label provider listenerprotected void fillContextMenu(IMenuManager manager, ITreeSelection selection)
protected void fireLabelProviderChanged()
protected void fireLabelProviderChanged(Object element)
protected void fireLabelProviderChanged(Object[] elements)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |