Class VisualObjectFactory

java.lang.Object
noaa.coastwatch.gui.visual.VisualObjectFactory

public class VisualObjectFactory extends Object
The VisualObjectFactory class contains static methods that create new visual objects based on an object and a property name.
Since:
3.1.7
Author:
Peter Hollemans
  • Method Details

    • create

      public static VisualObject create(Object object, String property)
      Creates a new visual object. The specified object is searched for get/set methods based on the property name, and a new visual object is created that controls the property value.
      Parameters:
      object - the object to create the visual object from.
      property - the property name to use.
      Returns:
      the newly created visual object.
      Throws:
      IllegalArgumentException - if the property cannot be found, or the property type is not supported by any known visual object.
      RuntimeException - if an error occurred in the visual object constructor, or when retrieving the property value from the object.