public abstract class WorkbenchAdapter extends Object implements IWorkbenchAdapter, IWorkbenchAdapter2, IWorkbenchAdapter3
Modifier and Type | Field and Description |
---|---|
protected static Object[] |
NO_CHILDREN
The empty list of children.
|
Constructor and Description |
---|
WorkbenchAdapter() |
Modifier and Type | Method and Description |
---|---|
RGB |
getBackground(Object element)
The default implementation of this
IWorkbenchAdapter2 method
returns null . |
Object[] |
getChildren(Object object)
The default implementation of this
IWorkbenchAdapter method
returns the empty list. |
FontData |
getFont(Object element)
The default implementation of this
IWorkbenchAdapter2 method
returns null . |
RGB |
getForeground(Object element)
The default implementation of this
IWorkbenchAdapter2 method
returns null . |
ImageDescriptor |
getImageDescriptor(Object object)
The default implementation of this
IWorkbenchAdapter method
returns null . |
String |
getLabel(Object object)
The default implementation of this
IWorkbenchAdapter method
returns the empty string if the object is null , and
the object's toString otherwise. |
Object |
getParent(Object object)
The default implementation of this
IWorkbenchAdapter method
returns null . |
StyledString |
getStyledText(Object object)
The default implementation of this
IWorkbenchAdapter3 method
returns the StyledString which wraps the label of the element. |
protected static final Object[] NO_CHILDREN
public Object[] getChildren(Object object)
IWorkbenchAdapter
method
returns the empty list. Subclasses may override.getChildren
in interface IWorkbenchAdapter
object
- The object to get the children for.public ImageDescriptor getImageDescriptor(Object object)
IWorkbenchAdapter
method
returns null
. Subclasses may override.getImageDescriptor
in interface IWorkbenchAdapter
object
- The object to get an image descriptor for.public String getLabel(Object object)
IWorkbenchAdapter
method
returns the empty string if the object is null
, and
the object's toString
otherwise. Subclasses may override.getLabel
in interface IWorkbenchAdapter
object
- The object to get a label for.public Object getParent(Object object)
IWorkbenchAdapter
method
returns null
. Subclasses may override.getParent
in interface IWorkbenchAdapter
object
- The object to get the parent for.public RGB getBackground(Object element)
IWorkbenchAdapter2
method
returns null
. Subclasses may override.getBackground
in interface IWorkbenchAdapter2
element
- the elementnull
to use the default background colorpublic RGB getForeground(Object element)
IWorkbenchAdapter2
method
returns null
. Subclasses may override.getForeground
in interface IWorkbenchAdapter2
element
- the elementnull
to use the default foreground colorpublic FontData getFont(Object element)
IWorkbenchAdapter2
method
returns null
. Subclasses may override.getFont
in interface IWorkbenchAdapter2
element
- the elementnull
to use the default fontpublic StyledString getStyledText(Object object)
IWorkbenchAdapter3
method
returns the StyledString
which wraps the label of the element.
Subclasses may override.getStyledText
in interface IWorkbenchAdapter3
object
- the element to evaluate the styled string for.StyledString
which wraps the label of the
element.
Copyright (c) 2000, 2014 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.