Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.6.0)

E13403-07

oracle.javatools.ui.themes
Class Themes

java.lang.Object
  extended by oracle.javatools.ui.themes.Themes

public final class Themes
extends java.lang.Object

The Themes API provides access to information about visual themes.

Since:
11.0

Method Summary
static void addThemeListener(ThemeListener tl)
          Adds a listener that will be notified when theme related events occur.
static Theme getActiveTheme()
          Returns the currently active theme.
static boolean isThemed()
          Returns true if themes are switched on.
static void paintBackground(java.awt.Graphics g, java.lang.String part, java.lang.String state, java.awt.Rectangle rect)
          Utility to paint the background using a theme Painter.
static void removeThemeListener(ThemeListener tl)
          Removes a listener that was previously added using addThemeListener(ThemeListener).
static void setActiveTheme(Theme t)
          Sets the currently active theme.
static void setDefaultTheme(Theme t)
          Sets the default theme.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

addThemeListener

public static void addThemeListener(ThemeListener tl)
Adds a listener that will be notified when theme related events occur.

Parameters:
tl - a listener for theme related events. Must not be null.

removeThemeListener

public static void removeThemeListener(ThemeListener tl)
Removes a listener that was previously added using addThemeListener(ThemeListener).

Parameters:
tl - a listener to remove.

isThemed

public static boolean isThemed()
Returns true if themes are switched on.

Returns:
true if themes are switched on.

getActiveTheme

public static Theme getActiveTheme()
Returns the currently active theme.

Returns:
the currently active theme. If the product is currently not themed, this method will return a default Theme implementation with definitions that should be used for look and feels that are not themed.

setActiveTheme

public static void setActiveTheme(Theme t)
Sets the currently active theme.

Parameters:
t - the new theme. May be null.

setDefaultTheme

public static void setDefaultTheme(Theme t)
Sets the default theme. This theme is returned from getActiveTheme() if no theme is active.

Parameters:
t - a default theme.
Since:
11.1.1.0.1

paintBackground

public static void paintBackground(java.awt.Graphics g,
                                   java.lang.String part,
                                   java.lang.String state,
                                   java.awt.Rectangle rect)
Utility to paint the background using a theme Painter.

Parameters:
g -
part -
state -
rect -

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.6.0)

E13403-07

Copyright © 1997, 2011, Oracle. All rights reserved.