corny.addressbook.searching.ValueModifier
Class ValueModifierImpl

java.lang.Object
  extended by corny.addressbook.searching.ValueModifier.ValueModifierImpl
All Implemented Interfaces:
ValueModifier

public abstract class ValueModifierImpl
extends java.lang.Object
implements ValueModifier

Implements some of the Methods of ValueModifier.

Author:
Corny

Nested Class Summary
 
Nested classes/interfaces inherited from interface corny.addressbook.searching.ValueModifier.ValueModifier
ValueModifier.Modifier
 
Constructor Summary
ValueModifierImpl()
           
 
Method Summary
 void finished()
          Tells the ValueModifier it is finished
 javax.swing.JComponent getEditorForParameter(int index, java.lang.Class<?> cl, ContactProperty prop, java.awt.event.KeyListener l)
          Returns the editing component for the given parameter index.
 boolean getEditorIncludesDescription(int index, java.lang.Class<?> cl)
          Specifies whether the editing component includes its description text or not.
 java.lang.Object getObjectForComponent(int parameterIndex, javax.swing.JComponent comp, java.lang.Class<?> cl)
          Returns the Object matching the class returned by ValueModifier.getParameterClass(int, Class), containing the values entered in the editor returned by the ValueModifier.getEditorForParameter(int, Class, ContactProperty, KeyListener).
 boolean isFinished()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface corny.addressbook.searching.ValueModifier.ValueModifier
appliesToProperty, getDescriptionForParameter, getModifiedValue, getModifierName, getParameterClass, getParameterCount, setParameter
 

Constructor Detail

ValueModifierImpl

public ValueModifierImpl()
Method Detail

getEditorForParameter

public javax.swing.JComponent getEditorForParameter(int index,
                                                    java.lang.Class<?> cl,
                                                    ContactProperty prop,
                                                    java.awt.event.KeyListener l)
Description copied from interface: ValueModifier
Returns the editing component for the given parameter index. The same instance will be passed when the ValueModifier.getObjectForComponent(int, JComponent, Class) method is called.

Specified by:
getEditorForParameter in interface ValueModifier
Parameters:
index - Parameter index
cl - Class of the value to modify
prop - Contact property to modify
l - KeyListener to be added to the editor
Returns:
Editing component

getObjectForComponent

public java.lang.Object getObjectForComponent(int parameterIndex,
                                              javax.swing.JComponent comp,
                                              java.lang.Class<?> cl)
Description copied from interface: ValueModifier
Returns the Object matching the class returned by ValueModifier.getParameterClass(int, Class), containing the values entered in the editor returned by the ValueModifier.getEditorForParameter(int, Class, ContactProperty, KeyListener).

Specified by:
getObjectForComponent in interface ValueModifier
Parameters:
parameterIndex - Parameter index
comp - Editing component
cl - Class of the value to modify
Returns:
Entered value

getEditorIncludesDescription

public boolean getEditorIncludesDescription(int index,
                                            java.lang.Class<?> cl)
Description copied from interface: ValueModifier
Specifies whether the editing component includes its description text or not.

Specified by:
getEditorIncludesDescription in interface ValueModifier
Parameters:
index - Parameter index
cl - Class of the value to modify
Returns:
false if an additional description label should be added

isFinished

public boolean isFinished()
Returns:
True, if the ValueModifier has been finished (all parameters have been set)

finished

public void finished()
Tells the ValueModifier it is finished