Class LayoutFactory.BasicPropertyAdaptSupport

java.lang.Object
info.monitorenter.gui.chart.controls.LayoutFactory.BasicPropertyAdaptSupport
All Implemented Interfaces:
PropertyChangeListener, EventListener
Enclosing class:
LayoutFactory

public static class LayoutFactory.BasicPropertyAdaptSupport extends Object implements PropertyChangeListener
Implementation for a PropertyChangeListener that adapts a wrapped JComponent to the following properties.

  • background color ("background")
  • foreground color (text color:"foreground")
  • font ("font")

An instance will add itself as a PropertyChangeListener via Component.addPropertyChangeListener(PropertyChangeListener) on the component to adapt to.

However components should also be able to send property changes that make instances of this class garbage - collectable by removing them as a property change listener from them. The constructor given values mark those property changes that will cause instances of this class to remove themselves as a property change listener from the component listened to. These properties may be configured in glue code (as components are generic and should not be hard coded for tasks that are hooked to them).

Author:
Achim Westermann