Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Eclipse Platform
Release 3.5

org.eclipse.ui.model
Class WorkbenchAdapter

java.lang.Object
  extended by 
org.eclipse.ui.model.WorkbenchAdapter
All Implemented Interfaces:
IWorkbenchAdapter, IWorkbenchAdapter2
Direct Known Subclasses:
AdaptableList

public abstract class WorkbenchAdapter
extends Object
implements IWorkbenchAdapter, IWorkbenchAdapter2

Abstract base class with basic implementations of the IWorkbenchAdapter interface. Intended to be subclassed.

Since:
3.0

Field Summary
protected static  Object[] NO_CHILDREN
          The empty list of children.
 
Constructor Summary
WorkbenchAdapter ()
           
 
Method Summary
  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.
 
Methods inherited from class java.lang. Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NO_CHILDREN

protected static final 
Object[] NO_CHILDREN
The empty list of children.

Constructor Detail

WorkbenchAdapter

public WorkbenchAdapter()
Method Detail

getChildren

public 
Object[] getChildren(
Object object)
The default implementation of this IWorkbenchAdapter method returns the empty list. Subclasses may override.

Specified by:
getChildren in interface IWorkbenchAdapter
Parameters:
object - The object to get the children for.
Returns:
Object[]

getImageDescriptor

public 
ImageDescriptor getImageDescriptor(
Object object)
The default implementation of this IWorkbenchAdapter method returns null. Subclasses may override.

Specified by:
getImageDescriptor in interface IWorkbenchAdapter
Parameters:
object - The object to get an image descriptor for.
Returns:
ImageDescriptor

getLabel

public 
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. Subclasses may override.

Specified by:
getLabel in interface IWorkbenchAdapter
Parameters:
object - The object to get a label for.
Returns:
String

getParent

public 
Object getParent(
Object object)
The default implementation of this IWorkbenchAdapter method returns null. Subclasses may override.

Specified by:
getParent in interface IWorkbenchAdapter
Parameters:
object - The object to get the parent for.
Returns:
Object

getBackground

public 
RGB getBackground(
Object element)
The default implementation of this IWorkbenchAdapter2 method returns null. Subclasses may override.

Specified by:
getBackground in interface IWorkbenchAdapter2
Parameters:
element - the element
Returns:
the background color for the element, or null to use the default background color

getForeground

public 
RGB getForeground(
Object element)
The default implementation of this IWorkbenchAdapter2 method returns null. Subclasses may override.

Specified by:
getForeground in interface IWorkbenchAdapter2
Parameters:
element - the element
Returns:
the foreground color for the element, or null to use the default foreground color

getFont

public 
FontData getFont(
Object element)
The default implementation of this IWorkbenchAdapter2 method returns null. Subclasses may override.

Specified by:
getFont in interface IWorkbenchAdapter2
Parameters:
element - the element
Returns:
the font for the element, or null to use the default font

Eclipse Platform
Release 3.5

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire