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
Answertopia.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.themes
Interface IThemeManager


public interface IThemeManager

A theme manager is an object that contains references to usable ITheme objects and maintains a reference to the currently active theme. This theme will be used by the workbench to decorate tab folders and other controls where possible. The workbench implementation of this interface will push the values of the current theme into the underlying jface registries ( ColorRegistry and FontRegistry whenever the current theme changes. Clients who do not need access to specific themes may instead attach listeners to these registries directly.

This interface is not intended to be implemented or extended by clients.

Since:
3.0
See Also:
IWorkbench.getThemeManager()
Restriction:
This interface is not intended to be implemented by clients.

Field Summary
static  String CHANGE_CURRENT_THEME
          Indicates that the current theme has changed to a new theme.
static  String DEFAULT_THEME
          The default theme id.
 
Method Summary
 void addPropertyChangeListener ( IPropertyChangeListener listener)
          Adds a property listener to the manager.
  ITheme getCurrentTheme ()
          Get the currently active theme.
  ITheme getTheme ( String id)
          Get a theme.
 void removePropertyChangeListener ( IPropertyChangeListener listener)
          Removes a property listener from the workbench.
 void setCurrentTheme ( String id)
          Set the currently active theme.
 

Field Detail

CHANGE_CURRENT_THEME

static final 
String CHANGE_CURRENT_THEME
Indicates that the current theme has changed to a new theme.

See Also:
Constant Field Values

DEFAULT_THEME

static final 
String DEFAULT_THEME
The default theme id.

See Also:
Constant Field Values
Method Detail

addPropertyChangeListener

void addPropertyChangeListener(
IPropertyChangeListener listener)
Adds a property listener to the manager. Any events fired by the underlying registries of the current theme will cause an event to be fired. This event is the same event that was fired by the registry. As such, the "source" attribute of the event will not be this manager, but rather the color or font registry. Additionally, an event is fired when the current theme changes to a new theme. The "property" attribute of such an event will have the value CHANGE_CURRENT_THEME.

Parameters:
listener - the listener to add

getCurrentTheme


ITheme getCurrentTheme()
Get the currently active theme.

Returns:
the current theme. This will never be null.

getTheme


ITheme getTheme(
String id)
Get a theme.

Parameters:
id - the theme to find.
Returns:
the ITheme or null if it cannot be found.

removePropertyChangeListener

void removePropertyChangeListener(
IPropertyChangeListener listener)
Removes a property listener from the workbench.

Parameters:
listener - the listener to remove

setCurrentTheme

void setCurrentTheme(
String id)
Set the currently active theme.

Parameters:
id - the id of the new active theme

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