org.palo.api.subsets.filter.settings
Class PicklistFilterSetting

java.lang.Object
  extended by org.palo.api.subsets.filter.settings.AbstractFilterSettings
      extended by org.palo.api.subsets.filter.settings.PicklistFilterSetting
All Implemented Interfaces:
FilterSetting

public class PicklistFilterSetting
extends AbstractFilterSettings

PicklistFilterSetting

Manages the settings for the PicklistFilter.

Version:
$Id: PicklistFilterSetting.html,v 1.5 2009/07/09 11:01:46 ArndHouben Exp $

Field Summary
static int INSERT_MODE_BACK
           
static int INSERT_MODE_FRONT
           
static int INSERT_MODE_MERGE
           
static int INSERT_MODE_SUB
           
 
Constructor Summary
PicklistFilterSetting()
           
 
Method Summary
 void adapt(FilterSetting from)
          Adapt the filter setting from the given filter setting.
 void addElement(java.lang.String id)
          Adds the given element id to the picked element list
 void bind(Subset2 subset)
          Binds this filter settings instance to the given Subset2 NOTE: PLEASE DON'T USE!
 IntegerParameter getInsertMode()
          Returns the insert mode to use
 ObjectParameter getSelection()
          Returns the selection parameter of picked elements.
 void removeAllElements()
          Removes all picked elements.
 void removeElement(java.lang.String id)
          Removes the given element id from the picked element list
 void reset()
          Resets the filter setting to its defaults.
 void setInsertMode(int insertMode)
          Sets the insert mode.
 void setInsertMode(IntegerParameter insertMode)
          Sets the insert mode, i.e. the parameter value should be one of the predefined insert mode constants.
 void setSelection(ObjectParameter selection)
          Sets the selection parameter.
 void unbind()
          Releases this filter settings instance from a previously binded Subset2 NOTE: PLEASE DON'T USE!
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INSERT_MODE_SUB

public static final int INSERT_MODE_SUB
See Also:
Constant Field Values

INSERT_MODE_BACK

public static final int INSERT_MODE_BACK
See Also:
Constant Field Values

INSERT_MODE_FRONT

public static final int INSERT_MODE_FRONT
See Also:
Constant Field Values

INSERT_MODE_MERGE

public static final int INSERT_MODE_MERGE
See Also:
Constant Field Values
Constructor Detail

PicklistFilterSetting

public PicklistFilterSetting()
Method Detail

addElement

public final void addElement(java.lang.String id)
Adds the given element id to the picked element list

Parameters:
id - a valid element id

removeElement

public final void removeElement(java.lang.String id)
Removes the given element id from the picked element list

Parameters:
id - a valid element id

removeAllElements

public final void removeAllElements()
Removes all picked elements.


getSelection

public final ObjectParameter getSelection()
Returns the selection parameter of picked elements.

Returns:
the selection parameter

setSelection

public final void setSelection(ObjectParameter selection)
Sets the selection parameter. Note that in order to take effect the parameter value should be of type LinkedHashSet (to keep adding order). The HashSet should contain the Element ids of the picked elements.

Parameters:
selection -

getInsertMode

public IntegerParameter getInsertMode()
Returns the insert mode to use

Returns:
the insert mode, i.e. one of the predefined insert mode constants

setInsertMode

public final void setInsertMode(int insertMode)
Sets the insert mode. One of the predefined insert mode constants should be used.

Parameters:
insertMode - the new insert mode.

setInsertMode

public final void setInsertMode(IntegerParameter insertMode)
Sets the insert mode, i.e. the parameter value should be one of the predefined insert mode constants.

Parameters:
insertMode - the new IntegerParameter to use for the insert mode

reset

public final void reset()
Description copied from interface: FilterSetting
Resets the filter setting to its defaults.


bind

public final void bind(Subset2 subset)
Description copied from interface: FilterSetting

Binds this filter settings instance to the given Subset2

NOTE: PLEASE DON'T USE! INTERNAL METHOD

Specified by:
bind in interface FilterSetting
Overrides:
bind in class AbstractFilterSettings

unbind

public final void unbind()
Description copied from interface: FilterSetting

Releases this filter settings instance from a previously binded Subset2

NOTE: PLEASE DON'T USE! INTERNAL METHOD

Specified by:
unbind in interface FilterSetting
Overrides:
unbind in class AbstractFilterSettings

adapt

public final void adapt(FilterSetting from)
Description copied from interface: FilterSetting
Adapt the filter setting from the given filter setting. After that both settings are the same.

Parameters:
from - the filter setting to adapt from