biouml.model
Class AbstractFilter

java.lang.Object
  extended bycom.beanexplorer.beans.Option
      extended bybiouml.model.AbstractFilter
All Implemented Interfaces:
DiagramFilter
Direct Known Subclasses:
BiopolimerDiagramFilter

public abstract class AbstractFilter
extends com.beanexplorer.beans.Option
implements DiagramFilter

Utility class that provides support for basic diagram filter operations. Subclasses should define processNode(biouml.model.Node) method that should highlight or hide node view depending on filter settings.


Field Summary
 
Fields inherited from class com.beanexplorer.beans.Option
notificationEnabled, propagationEnabled
 
Constructor Summary
AbstractFilter()
           
 
Method Summary
 void apply(Compartment diagram)
          Hides or highlights diagram elements according to filter settings.
 boolean isEnabled()
          Indicates whether a filter should be used.
protected abstract  void processNode(Node node)
          Should high or highlight node depending on filter settings.
 void restoreView(Compartment diagram)
          Restores original diagram view.
protected  void restoreView(DiagramElement de)
           
 void setEnabled(boolean enabled)
           
 
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
 
Methods inherited from interface biouml.model.DiagramFilter
getOptionsControl
 

Constructor Detail

AbstractFilter

public AbstractFilter()
Method Detail

isEnabled

public boolean isEnabled()
Description copied from interface: DiagramFilter
Indicates whether a filter should be used.

Specified by:
isEnabled in interface DiagramFilter

setEnabled

public void setEnabled(boolean enabled)

apply

public void apply(Compartment diagram)
Hides or highlights diagram elements according to filter settings. Prerequisite: diagram view should be generated by DiagramViewBuilder.

Specified by:
apply in interface DiagramFilter

restoreView

public void restoreView(Compartment diagram)
Restores original diagram view. For this purpose it makes visible all views and removes nodes backgound view that is used for highlighting.

Specified by:
restoreView in interface DiagramFilter

processNode

protected abstract void processNode(Node node)
Should high or highlight node depending on filter settings.


restoreView

protected void restoreView(DiagramElement de)


Copyright © 2001-2003 Biosof.Ru. All Rights Reserved.