org.openbp.guiclient.model.item.itemfilter
Interface ItemFilter

All Superinterfaces:
java.lang.Comparable, DescriptionObject, Displayable, DisplayObject, java.io.Serializable
All Known Implementing Classes:
AbstractItemFilter, ItemTextFilter, ItemTypeFilter

public interface ItemFilter
extends DisplayObject

An item filter can be used in conjunction with the item filter manager (ItemFilterMgr) to filter sets of items. The filter extends the DisplayObject interface. Its name will be used to manage the filter and can be any arbitrary name. The display name (getDisplayName method) will appear as button or menu item text. The description (getDescription) will be used as button or menu tool tip.
A filter may also provide a configuration component, which can be used to customize the filter.

Author:
Heiko Erhardt

Method Summary
 boolean acceptsItem(Item item)
          Determines if an item is accepted by this filter.
 javax.swing.JComponent getConfigurationComponent()
          Gets the user interface component that can be used to configure this filter.
 ItemFilterHolder getFilterManager()
          Gets the item filter holder this filter belongs to.
 MultiIcon getIcon()
          Gets the icon representing this filter.
 Plugin getPlugin()
          Gets the plugin this filter belongs to.
 boolean isActive()
          Checks if the filter is active.
 void setActive(boolean active)
          Activates or deactivates the filter.
 void setFilterHolder(ItemFilterHolder filterHolder)
          Sets the item filter holder this filter belongs to.
 void setPlugin(Plugin plugin)
          Sets the plugin this filter belongs to.
 
Methods inherited from interface org.openbp.common.generic.description.DisplayObject
getDisplayName, setDisplayName
 
Methods inherited from interface org.openbp.common.generic.description.DescriptionObject
clone, getDescription, getDescriptionText, getDisplayText, getName, setDescription, setName
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Method Detail

getIcon

MultiIcon getIcon()
Gets the icon representing this filter.


getConfigurationComponent

javax.swing.JComponent getConfigurationComponent()
Gets the user interface component that can be used to configure this filter.

Returns:
The component or null if the filter cannot be configured

isActive

boolean isActive()
Checks if the filter is active.


setActive

void setActive(boolean active)
Activates or deactivates the filter.


getPlugin

Plugin getPlugin()
Gets the plugin this filter belongs to.


setPlugin

void setPlugin(Plugin plugin)
Sets the plugin this filter belongs to.


getFilterManager

ItemFilterHolder getFilterManager()
Gets the item filter holder this filter belongs to.


setFilterHolder

void setFilterHolder(ItemFilterHolder filterHolder)
Sets the item filter holder this filter belongs to.


acceptsItem

boolean acceptsItem(Item item)
Determines if an item is accepted by this filter.

Parameters:
item - Item to check
Returns:
true The item is accepted by the filter
false The filter rejects this item


Copyright © 2011. All Rights Reserved.