org.grinvin.params

Interface ParameterComponent

public interface ParameterComponent

Interface that should be implemented by a component that allows editing of parameter values of a certain type. As with ParameterEditor, each parameter component is implicitely associated with a single type.

In practice every component implementing this interface should also be an extension of class java.awt.Component or preferably of javax.swing.JComponent.

Method Summary

void
addFocusListener(FocusListener l)
Object
getParameterValue()
Return the parameter value currently stored in the component.
void
removeFocusListener(FocusListener l)
void
setParameterValue(Object value)
Store the given parameter value into the component.

Method Details

addFocusListener

public void addFocusListener(FocusListener l)

getParameterValue

public Object getParameterValue()
Return the parameter value currently stored in the component. The resulting value object is of the type implicitely associated with this component.

removeFocusListener

public void removeFocusListener(FocusListener l)

setParameterValue

public void setParameterValue(Object value)
Store the given parameter value into the component. May throw an exception when the given value does not belong to the type which is implicitely associated with this component.