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.
Constructor and Description |
---|
ComponentHandlerImpl() |
Modifier and Type | Method and Description |
---|---|
Object |
getComponent()
Returns the underlying component.
|
Object |
getData()
Returns data of this handler.
|
Object |
getOuterComponent()
Returns the outer component of this handler.
|
Class<?> |
getType()
Returns the data type of this handler.
|
boolean |
isEnabled()
Returns the enabled flag.
|
void |
setComponent(Object c)
Sets the underlying component.
|
void |
setData(Object data)
Sets data of this handler.
|
void |
setEnabled(boolean f)
Sets the enabled flag.
|
void |
setType(Class<?> type)
Allows to set this handler's data type.
|
public Object getComponent()
getComponent
in interface ComponentHandler<Object>
public void setComponent(Object c)
c
- the componentpublic Object getData()
getData
in interface ComponentHandler<Object>
public void setData(Object data)
setData
in interface ComponentHandler<Object>
data
- the data objectpublic Class<?> getType()
getType
in interface ComponentHandler<Object>
public void setType(Class<?> type)
getType()
method. It should always
be initialized first.type
- the type of this handlerpublic Object getOuterComponent()
getOuterComponent
in interface ComponentHandler<Object>
public boolean isEnabled()
isEnabled
in interface ComponentHandler<Object>
public void setEnabled(boolean f)
setEnabled
in interface ComponentHandler<Object>
f
- the flag valueCopyright © 2016 The JGUIraffe Team. All rights reserved.