biouml.standard.filter
Class ValueActionFilter
java.lang.Object
com.beanexplorer.beans.Option
biouml.standard.filter.ValueActionFilter
- All Implemented Interfaces:
- ActionFilter
- Direct Known Subclasses:
- BiopolimerDiagramFilter.CellTypeFilter, BiopolimerDiagramFilter.InducerFilter, BiopolimerDiagramFilter.SpeciesFilter
- public abstract class ValueActionFilter
- extends com.beanexplorer.beans.Option
- implements ActionFilter
Filter condition is specified as a set of ActionValuess.
Virtual method getValue returns some string value for dataElement that is kernel
of corresponding diagram element. The filter looks to what valueActions corresponds
this value and returns some action that is composition of satisfying valueActions.
The actions composition is defined as following:
- empty set - null is returned
- one action - this action will be returned
- if set contains one or more
Hide actions, then Hide.instance
will be returned
- otherwise
ComplexHighlightAction will be generated and returned.
Special empty value action is defined to process empty values.
| Fields inherited from class com.beanexplorer.beans.Option |
notificationEnabled, propagationEnabled |
|
Constructor Summary |
ValueActionFilter(com.beanexplorer.beans.Option parent,
java.lang.String[] values,
boolean useEmptyValue)
Creates ValueActionFilter instance. |
| Methods inherited from class com.beanexplorer.beans.Option |
addPropertyChangeListener, copyListenersTo, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getParent, isNotificationEnabled, isPropagationEnabled, removePropertyChangeListener, setNotificationEnabled, setParent, setPropagationEnabled |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EMPTY_VALUE
public static java.lang.String EMPTY_VALUE
ValueActionFilter
public ValueActionFilter(com.beanexplorer.beans.Option parent,
java.lang.String[] values,
boolean useEmptyValue)
- Creates ValueActionFilter instance.
- Parameters:
parent - - usually DiagramFilter instancevalues - - list of values for which corresponding value actions will be generateduseEmptyValue - - indicates whethe empty value should be used.
If true - empty value action will be inserted first in list of value actions.
isUseEmptyValue
public boolean isUseEmptyValue()
getValue
public abstract java.lang.String getValue(DataElement de)
isEnabled
public boolean isEnabled()
- Description copied from interface:
ActionFilter
- Indicates whether a filter should be used.
- Specified by:
isEnabled in interface ActionFilter
setEnabled
public void setEnabled(boolean enabled)
getValueAction
public ValueAction[] getValueAction()
getValueAction
public ValueAction getValueAction(int i)
setValueAction
public void setValueAction(ValueAction[] valueActions)
setValueAction
public void setValueAction(int i,
ValueAction valueAction)
getItemDisplayName
public java.lang.String getItemDisplayName(java.lang.Integer index,
java.lang.Object obj)
- used to calculate display name for child filters.
getAction
public Action getAction(DiagramElement de)
- Description copied from interface:
ActionFilter
- Returns action, that should be applied to the specified diagram element,
if it satisfies to the filter condition or null otherwise.
- Specified by:
getAction in interface ActionFilter
Copyright © 2001-2003 Biosof.Ru. All Rights Reserved.