com.michaelbaranov.microba
Class Microba

java.lang.Object
  extended by com.michaelbaranov.microba.Microba

public class Microba
extends java.lang.Object

This class is used to initialize Microba library.

Author:
Michael Baranov

Constructor Summary
Microba()
           
 
Method Summary
static java.awt.Color getOverridenColor(java.lang.String colorConstant, MicrobaComponent component)
          Returns overriden color for given component in current Look&Feel.
static java.awt.Color getOverridenColor(java.lang.String colorConstant, MicrobaComponent component, java.awt.Color defaultColor)
          Returns overriden color for given component in current Look&Feel or a default value.
static void init()
          Initializes the library: installs L&F properties, sets up a L&F change listener.
static void setColorOverrideMap(java.lang.String lookAndFeel, java.util.Map overrides)
          Sets per-Lokk&Feel map of color overrides.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Microba

public Microba()
Method Detail

init

public static void init()
Initializes the library: installs L&F properties, sets up a L&F change listener.

No need to call this method explicitly for desktop applications. You should only call it in Applet.init(). This will handle browser refresh button correctly.


setColorOverrideMap

public static void setColorOverrideMap(java.lang.String lookAndFeel,
                                       java.util.Map overrides)
Sets per-Lokk&Feel map of color overrides.

Parameters:
lookAndFeel - look&feel ID
overrides - keys in the map are String constants, valuse are of type Color or of type String (in this case, Color values are obtained via UIManager.getColor(Object)). May be null.

getOverridenColor

public static java.awt.Color getOverridenColor(java.lang.String colorConstant,
                                               MicrobaComponent component)
Returns overriden color for given component in current Look&Feel. The algorithms is: This method is actually intended to be used by UI delegates of the library.

Parameters:
colorConstant - color constant
component - component of the library
Returns:
overriden color or null if not overriden

getOverridenColor

public static java.awt.Color getOverridenColor(java.lang.String colorConstant,
                                               MicrobaComponent component,
                                               java.awt.Color defaultColor)
Returns overriden color for given component in current Look&Feel or a default value. The algorithms is: This method is actually intended to be used by UI delegates of the library.

Parameters:
colorConstant - color constant
component - component of the library
defaultColor -
Returns:
overriden color or defaultColor if not overriden