Klasse ComponentHandlerImpl

java.lang.Object
net.sf.jguiraffe.gui.forms.ComponentHandlerImpl
Alle implementierten Schnittstellen:
ComponentHandler<Object>

public class ComponentHandlerImpl extends Object implements ComponentHandler<Object>

A simple default implementation of the ComponentHandler interface.

This class implements all methods required by the ComponentHandler interface without being backed by a really GUI component. All get and set methods operate on internal properties. The class can be used for testing or for components that need a faked component handler.

Version:
$Id: ComponentHandlerImpl.java 205 2012-01-29 18:29:57Z oheger $
Autor:
Oliver Heger
  • Konstruktordetails

    • ComponentHandlerImpl

      public ComponentHandlerImpl()
  • Methodendetails

    • getComponent

      public Object getComponent()
      Returns the underlying component.
      Angegeben von:
      getComponent in Schnittstelle ComponentHandler<Object>
      Gibt zurück:
      the component
    • setComponent

      public void setComponent(Object c)
      Sets the underlying component. The passed in object is simply stored in an internal property.
      Parameter:
      c - the component
    • getData

      public Object getData()
      Returns data of this handler. This data is simply stored in an internal property.
      Angegeben von:
      getData in Schnittstelle ComponentHandler<Object>
      Gibt zurück:
      the component's data
    • setData

      public void setData(Object data)
      Sets data of this handler. The passed in data object is stored in an internal property.
      Angegeben von:
      setData in Schnittstelle ComponentHandler<Object>
      Parameter:
      data - the data object
    • getType

      public Class<?> getType()
      Returns the data type of this handler.
      Angegeben von:
      getType in Schnittstelle ComponentHandler<Object>
      Gibt zurück:
      the data type
    • setType

      public void setType(Class<?> type)
      Allows to set this handler's data type. The type set with this method will be returned by the getType() method. It should always be initialized first.
      Parameter:
      type - the type of this handler
    • getOuterComponent

      public Object getOuterComponent()
      Returns the outer component of this handler. This is the same as the normal component.
      Angegeben von:
      getOuterComponent in Schnittstelle ComponentHandler<Object>
      Gibt zurück:
      the handler's outer component
    • isEnabled

      public boolean isEnabled()
      Returns the enabled flag.
      Angegeben von:
      isEnabled in Schnittstelle ComponentHandler<Object>
      Gibt zurück:
      the enabled flag
    • setEnabled

      public void setEnabled(boolean f)
      Sets the enabled flag. This flag is simply realized by an internal member variable.
      Angegeben von:
      setEnabled in Schnittstelle ComponentHandler<Object>
      Parameter:
      f - the flag value