de.uni_paderborn.fujaba.views
Class FilterManager

java.lang.Object
  extended byde.uni_paderborn.fujaba.views.FilterManager
All Implemented Interfaces:
de.upb.tools.pcs.PropertyChangeClient, de.upb.tools.pcs.PropertyChangeInterface

public class FilterManager
extends java.lang.Object
implements de.upb.tools.pcs.PropertyChangeClient

The FilterManager is sort of a Factory for filters It holds all known Filters which can be accessed by their name. Additionally it has some comfort functions for loading/saving and models for the gui and a function to search for new filters.

Version:
$Revision: 1.20 $
Author:
$Author: trinet $

Nested Class Summary
static class FilterManager.FMListModel
          No comment provided by developer, please add a comment to improve documentation.
 
Field Summary
static java.lang.String SETTINGS_FILE_EXT
          No comment provided by developer, please add a comment to improve documentation.
 
Method Summary
 void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
          Access method for an one to n association.
 void addPropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
          Access method for an one to n association.
 boolean addToFilters(Filter value)
          Access method for an one to n association.
protected  boolean addToScannedFiles(java.lang.String value)
          Access method for an one to n association.
 boolean addToSettingsFiles(ConfigurableFilter key, java.io.File value)
          Access method for an one to n association.
 boolean addToSettingsFiles(java.util.Map.Entry entry)
          Access method for an one to n association.
static Filter createInstance(java.lang.Class filterClass)
          Instantiate the given filter class
static Filter createInstance(java.io.File classFile)
          Instantiate the class defined in the given file
static Filter createInstance(java.util.zip.ZipFile classFile, java.util.zip.ZipEntry entry)
          Instantiate the class defined in the given file
 java.util.Iterator entriesOfFilters()
          No comment provided by developer, please add a comment to improve documentation.
 java.util.Iterator entriesOfSettingsFiles()
          No comment provided by developer, please add a comment to improve documentation.
protected  void firePropertyChange(java.beans.PropertyChangeEvent e)
          No comment provided by developer, please add a comment to improve documentation.
protected  void firePropertyChange(java.lang.String name, boolean oldValue, boolean newValue)
          No comment provided by developer, please add a comment to improve documentation.
protected  void firePropertyChange(java.lang.String name, double oldValue, double newValue)
          No comment provided by developer, please add a comment to improve documentation.
protected  void firePropertyChange(java.lang.String name, int oldValue, int newValue)
          No comment provided by developer, please add a comment to improve documentation.
protected  void firePropertyChange(java.lang.String name, java.lang.Object oldValue, java.lang.Object newValue)
          No comment provided by developer, please add a comment to improve documentation.
static FilterManager get()
          No comment provided by developer, please add a comment to improve documentation.
 Filter getFilter(java.lang.String name)
          Get the filter attribute of the FilterManager object
 Filter getFromFilters(java.lang.String key)
          Get the fromFilters attribute of the FilterManager object
 java.io.File getFromSettingsFiles(ConfigurableFilter key)
          Get the fromSettingsFiles attribute of the FilterManager object
 java.lang.String getKeyFromFilters(Filter value)
          Get the keyFromFilters attribute of the FilterManager object
static javax.swing.ListCellRenderer getListCellRenderer()
          A Renderer for Filters
 javax.swing.ComboBoxModel getListModel(UMLDiagram diagram)
          Get the listModel attribute of the FilterManager object
 java.beans.PropertyChangeSupport getPropertyChangeSupport()
          Get the propertyChangeSupport attribute of the FilterManager object
 javax.swing.ComboBoxModel getPrototypeListModel(UMLDiagram diagram)
           
 boolean hasInFilters(Filter value)
          No comment provided by developer, please add a comment to improve documentation.
 boolean hasInFilters(java.lang.String key, Filter value)
          No comment provided by developer, please add a comment to improve documentation.
 boolean hasInScannedFiles(java.lang.String value)
          No comment provided by developer, please add a comment to improve documentation.
 boolean hasInSettingsFiles(ConfigurableFilter key, java.io.File value)
          No comment provided by developer, please add a comment to improve documentation.
 boolean hasInSettingsFiles(java.io.File value)
          No comment provided by developer, please add a comment to improve documentation.
 boolean hasKeyInFilters(java.lang.String key)
          No comment provided by developer, please add a comment to improve documentation.
 boolean hasKeyInSettingsFiles(ConfigurableFilter key)
          No comment provided by developer, please add a comment to improve documentation.
 java.util.Iterator iteratorOfFilters()
          No comment provided by developer, please add a comment to improve documentation.
 java.util.Iterator iteratorOfScannedFiles()
          No comment provided by developer, please add a comment to improve documentation.
 java.util.Iterator iteratorOfSettingsFiles()
          No comment provided by developer, please add a comment to improve documentation.
 java.util.Iterator keysOfFilters()
          No comment provided by developer, please add a comment to improve documentation.
 java.util.Iterator keysOfSettingsFiles()
          No comment provided by developer, please add a comment to improve documentation.
static ConfigurableFilter loadFilter(java.io.File file)
          read the settings from the file and create a new Filter with them
static ConfigurableFilter loadFilter(java.io.InputStream stream)
          read the settings from the stream and create a new Filter with them
 void removeAllFromFilters()
          No comment provided by developer, please add a comment to improve documentation.
protected  void removeAllFromScannedFiles()
          No comment provided by developer, please add a comment to improve documentation.
 void removeAllFromSettingsFiles()
          No comment provided by developer, please add a comment to improve documentation.
 boolean removeFromFilters(Filter value)
          No comment provided by developer, please add a comment to improve documentation.
protected  boolean removeFromScannedFiles(java.lang.String value)
          No comment provided by developer, please add a comment to improve documentation.
 boolean removeFromSettingsFiles(ConfigurableFilter key, java.io.File value)
          No comment provided by developer, please add a comment to improve documentation.
 boolean removeFromSettingsFiles(java.io.File value)
          No comment provided by developer, please add a comment to improve documentation.
 boolean removeKeyFromFilters(java.lang.String key)
          No comment provided by developer, please add a comment to improve documentation.
 boolean removeKeyFromSettingsFiles(ConfigurableFilter key)
          No comment provided by developer, please add a comment to improve documentation.
 void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
          No comment provided by developer, please add a comment to improve documentation.
 void removePropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
          No comment provided by developer, please add a comment to improve documentation.
 void rescanDir()
          rescan the filter dir defined in the Environment Options
static void saveFilter(ConfigurableFilter filter, java.io.File file)
          Save the Filter to the file
static void saveFilter(ConfigurableFilter filter, java.io.OutputStream stream)
          Save the Filter to the Output Stream
 int sizeOfFilters()
          No comment provided by developer, please add a comment to improve documentation.
 int sizeOfScannedFiles()
          No comment provided by developer, please add a comment to improve documentation.
 int sizeOfSettingsFiles()
          No comment provided by developer, please add a comment to improve documentation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SETTINGS_FILE_EXT

public static final transient java.lang.String SETTINGS_FILE_EXT
No comment provided by developer, please add a comment to improve documentation.

See Also:
Constant Field Values
Method Detail

get

public static FilterManager get()
No comment provided by developer, please add a comment to improve documentation.

Returns:
No description provided

getPropertyChangeSupport

public java.beans.PropertyChangeSupport getPropertyChangeSupport()
Get the propertyChangeSupport attribute of the FilterManager object

Specified by:
getPropertyChangeSupport in interface de.upb.tools.pcs.PropertyChangeInterface
Returns:
The propertyChangeSupport value

addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Access method for an one to n association.

Specified by:
addPropertyChangeListener in interface de.upb.tools.pcs.PropertyChangeClient
Parameters:
listener - The object added.

addPropertyChangeListener

public void addPropertyChangeListener(java.lang.String propertyName,
                                      java.beans.PropertyChangeListener listener)
Access method for an one to n association.

Specified by:
addPropertyChangeListener in interface de.upb.tools.pcs.PropertyChangeClient
Parameters:
propertyName - The object added.
listener - The object added.

removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
No comment provided by developer, please add a comment to improve documentation.

Specified by:
removePropertyChangeListener in interface de.upb.tools.pcs.PropertyChangeClient
Parameters:
listener - No description provided

removePropertyChangeListener

public void removePropertyChangeListener(java.lang.String propertyName,
                                         java.beans.PropertyChangeListener listener)
No comment provided by developer, please add a comment to improve documentation.

Specified by:
removePropertyChangeListener in interface de.upb.tools.pcs.PropertyChangeClient
Parameters:
propertyName - No description provided
listener - No description provided

firePropertyChange

protected void firePropertyChange(java.beans.PropertyChangeEvent e)
No comment provided by developer, please add a comment to improve documentation.

Parameters:
e - No description provided

firePropertyChange

protected void firePropertyChange(java.lang.String name,
                                  java.lang.Object oldValue,
                                  java.lang.Object newValue)
No comment provided by developer, please add a comment to improve documentation.

Parameters:
name - No description provided
oldValue - No description provided
newValue - No description provided

firePropertyChange

protected void firePropertyChange(java.lang.String name,
                                  boolean oldValue,
                                  boolean newValue)
No comment provided by developer, please add a comment to improve documentation.

Parameters:
name - No description provided
oldValue - No description provided
newValue - No description provided

firePropertyChange

protected void firePropertyChange(java.lang.String name,
                                  int oldValue,
                                  int newValue)
No comment provided by developer, please add a comment to improve documentation.

Parameters:
name - No description provided
oldValue - No description provided
newValue - No description provided

firePropertyChange

protected void firePropertyChange(java.lang.String name,
                                  double oldValue,
                                  double newValue)
No comment provided by developer, please add a comment to improve documentation.

Parameters:
name - No description provided
oldValue - No description provided
newValue - No description provided

createInstance

public static Filter createInstance(java.lang.Class filterClass)
Instantiate the given filter class

Parameters:
filterClass - No description provided
Returns:
an instance of the class

createInstance

public static Filter createInstance(java.io.File classFile)
Instantiate the class defined in the given file

Parameters:
classFile - No description provided
Returns:
an instance of the class

createInstance

public static Filter createInstance(java.util.zip.ZipFile classFile,
                                    java.util.zip.ZipEntry entry)
Instantiate the class defined in the given file

Parameters:
classFile - No description provided
entry - No description provided
Returns:
an instance of the class

saveFilter

public static void saveFilter(ConfigurableFilter filter,
                              java.io.OutputStream stream)
Save the Filter to the Output Stream

Parameters:
filter - No description provided
stream - No description provided

saveFilter

public static void saveFilter(ConfigurableFilter filter,
                              java.io.File file)
                       throws java.io.IOException
Save the Filter to the file

Parameters:
filter - No description provided
file - No description provided
Throws:
java.io.IOException - Exception description not provided

loadFilter

public static ConfigurableFilter loadFilter(java.io.InputStream stream)
read the settings from the stream and create a new Filter with them

Parameters:
stream - No description provided
Returns:
No description provided

loadFilter

public static ConfigurableFilter loadFilter(java.io.File file)
                                     throws java.io.IOException
read the settings from the file and create a new Filter with them

Parameters:
file - No description provided
Returns:
No description provided
Throws:
java.io.IOException - Exception description not provided

rescanDir

public void rescanDir()
rescan the filter dir defined in the Environment Options

See Also:
#rescanDir(java.io.File)

addToScannedFiles

protected boolean addToScannedFiles(java.lang.String value)
Access method for an one to n association.

Parameters:
value - The object added.
Returns:
No description provided

hasInScannedFiles

public boolean hasInScannedFiles(java.lang.String value)
No comment provided by developer, please add a comment to improve documentation.

Parameters:
value - No description provided
Returns:
No description provided

iteratorOfScannedFiles

public java.util.Iterator iteratorOfScannedFiles()
No comment provided by developer, please add a comment to improve documentation.

Returns:
No description provided

sizeOfScannedFiles

public int sizeOfScannedFiles()
No comment provided by developer, please add a comment to improve documentation.

Returns:
No description provided

removeFromScannedFiles

protected boolean removeFromScannedFiles(java.lang.String value)
No comment provided by developer, please add a comment to improve documentation.

Parameters:
value - No description provided
Returns:
No description provided

removeAllFromScannedFiles

protected void removeAllFromScannedFiles()
No comment provided by developer, please add a comment to improve documentation.


hasInFilters

public boolean hasInFilters(Filter value)
No comment provided by developer, please add a comment to improve documentation.

Parameters:
value - No description provided
Returns:
No description provided

hasInFilters

public boolean hasInFilters(java.lang.String key,
                            Filter value)
No comment provided by developer, please add a comment to improve documentation.

Parameters:
key - No description provided
value - No description provided
Returns:
No description provided

hasKeyInFilters

public boolean hasKeyInFilters(java.lang.String key)
No comment provided by developer, please add a comment to improve documentation.

Parameters:
key - No description provided
Returns:
No description provided

iteratorOfFilters

public java.util.Iterator iteratorOfFilters()
No comment provided by developer, please add a comment to improve documentation.

Returns:
No description provided

keysOfFilters

public java.util.Iterator keysOfFilters()
No comment provided by developer, please add a comment to improve documentation.

Returns:
No description provided

entriesOfFilters

public java.util.Iterator entriesOfFilters()
No comment provided by developer, please add a comment to improve documentation.

Returns:
No description provided

sizeOfFilters

public int sizeOfFilters()
No comment provided by developer, please add a comment to improve documentation.

Returns:
No description provided

getFromFilters

public Filter getFromFilters(java.lang.String key)
Get the fromFilters attribute of the FilterManager object

Parameters:
key - No description provided
Returns:
The fromFilters value

getKeyFromFilters

public java.lang.String getKeyFromFilters(Filter value)
Get the keyFromFilters attribute of the FilterManager object

Parameters:
value - No description provided
Returns:
The keyFromFilters value

addToFilters

public boolean addToFilters(Filter value)
Access method for an one to n association.

Parameters:
value - The object added.
Returns:
No description provided

removeFromFilters

public boolean removeFromFilters(Filter value)
No comment provided by developer, please add a comment to improve documentation.

Parameters:
value - No description provided
Returns:
No description provided

removeKeyFromFilters

public boolean removeKeyFromFilters(java.lang.String key)
No comment provided by developer, please add a comment to improve documentation.

Parameters:
key - No description provided
Returns:
No description provided

removeAllFromFilters

public void removeAllFromFilters()
No comment provided by developer, please add a comment to improve documentation.


getFilter

public Filter getFilter(java.lang.String name)
Get the filter attribute of the FilterManager object

Parameters:
name - No description provided
Returns:
The filter value

hasInSettingsFiles

public boolean hasInSettingsFiles(java.io.File value)
No comment provided by developer, please add a comment to improve documentation.

Parameters:
value - No description provided
Returns:
No description provided

hasInSettingsFiles

public boolean hasInSettingsFiles(ConfigurableFilter key,
                                  java.io.File value)
No comment provided by developer, please add a comment to improve documentation.

Parameters:
key - No description provided
value - No description provided
Returns:
No description provided

hasKeyInSettingsFiles

public boolean hasKeyInSettingsFiles(ConfigurableFilter key)
No comment provided by developer, please add a comment to improve documentation.

Parameters:
key - No description provided
Returns:
No description provided

iteratorOfSettingsFiles

public java.util.Iterator iteratorOfSettingsFiles()
No comment provided by developer, please add a comment to improve documentation.

Returns:
No description provided

keysOfSettingsFiles

public java.util.Iterator keysOfSettingsFiles()
No comment provided by developer, please add a comment to improve documentation.

Returns:
No description provided

entriesOfSettingsFiles

public java.util.Iterator entriesOfSettingsFiles()
No comment provided by developer, please add a comment to improve documentation.

Returns:
No description provided

sizeOfSettingsFiles

public int sizeOfSettingsFiles()
No comment provided by developer, please add a comment to improve documentation.

Returns:
No description provided

getFromSettingsFiles

public java.io.File getFromSettingsFiles(ConfigurableFilter key)
Get the fromSettingsFiles attribute of the FilterManager object

Parameters:
key - No description provided
Returns:
The fromSettingsFiles value

addToSettingsFiles

public boolean addToSettingsFiles(ConfigurableFilter key,
                                  java.io.File value)
Access method for an one to n association.

Parameters:
key - The object added.
value - The object added.
Returns:
No description provided

addToSettingsFiles

public boolean addToSettingsFiles(java.util.Map.Entry entry)
Access method for an one to n association.

Parameters:
entry - The object added.
Returns:
No description provided

removeFromSettingsFiles

public boolean removeFromSettingsFiles(java.io.File value)
No comment provided by developer, please add a comment to improve documentation.

Parameters:
value - No description provided
Returns:
No description provided

removeFromSettingsFiles

public boolean removeFromSettingsFiles(ConfigurableFilter key,
                                       java.io.File value)
No comment provided by developer, please add a comment to improve documentation.

Parameters:
key - No description provided
value - No description provided
Returns:
No description provided

removeKeyFromSettingsFiles

public boolean removeKeyFromSettingsFiles(ConfigurableFilter key)
No comment provided by developer, please add a comment to improve documentation.

Parameters:
key - No description provided
Returns:
No description provided

removeAllFromSettingsFiles

public void removeAllFromSettingsFiles()
No comment provided by developer, please add a comment to improve documentation.


getListModel

public javax.swing.ComboBoxModel getListModel(UMLDiagram diagram)
Get the listModel attribute of the FilterManager object

Parameters:
diagram - No description provided
Returns:
The listModel value

getPrototypeListModel

public javax.swing.ComboBoxModel getPrototypeListModel(UMLDiagram diagram)
Parameters:
diagram - No description provided
Returns:
a ComboBoxModel that contains all the known filters that are valid for the diagram
See Also:
Filter.isForDiagram(de.uni_paderborn.fujaba.uml.UMLDiagram)

getListCellRenderer

public static javax.swing.ListCellRenderer getListCellRenderer()
A Renderer for Filters

Returns:
The listCellRenderer value