com.michaelbaranov.microba.common

Class MicrobaComponent


public class MicrobaComponent
extends JComponent

Superclass for all Microba GUI components.
Author:
Michael Baranov

Field Summary

static String
PROPERTY_NAME_COLOR_OVERRIDE_MAP

Method Summary

Map
getColorOverrideMap()
Returns per-instance (only for this instance) map of color overrides.
ComponentUI
getUI()
void
setColorOverrideMap(Map colorOverrideMap)
Sets per-instance (only for this instance) map of color overrides.
void
updateUI()
Sets the UI delegate of this component to the corresponding UI delegate taken from UIManager.

Field Details

PROPERTY_NAME_COLOR_OVERRIDE_MAP

public static final String PROPERTY_NAME_COLOR_OVERRIDE_MAP

Method Details

getColorOverrideMap

public Map getColorOverrideMap()
Returns:
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))

getUI

public ComponentUI getUI()

setColorOverrideMap

public void setColorOverrideMap(Map colorOverrideMap)
Sets per-instance (only for this instance) map of color overrides.
Parameters:
colorOverrideMap - 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.

updateUI

public void updateUI()
Sets the UI delegate of this component to the corresponding UI delegate taken from UIManager.

This implementation has a workarount to fix the problem with non-standard class-loaders.