frysk.gui.srcwin.tags
Class Tagset

java.lang.Object
  extended by frysk.gui.monitor.GuiObject
      extended by frysk.gui.srcwin.tags.Tagset
All Implemented Interfaces:
SaveableXXX

public class Tagset
extends GuiObject
implements SaveableXXX

A Tagset contains a collection of tags that are applicable to a process. TODO: Tags not implemented yet


Field Summary
 
Fields inherited from class frysk.gui.monitor.GuiObject
propertiesChanged
 
Constructor Summary
Tagset()
           
Tagset(String name, String desc, String command, String version)
          Creates a new tagset
 
Method Summary
 void addTag(Tag newTag)
          Adds the given tag to this tagset.
 boolean containsTag(Tag tag)
          Check for the presence of the provided tag in the tagset
 boolean equals(Object obj)
          Two tagsets are equal if they are the same size and contain the same tags.
 String getCommand()
           
 String getDesc()
           
 String getName()
           
 Iterator getTags()
           
 String getVersion()
           
 void load(Element node)
          Loads the tagset from a given element.
 void save(Element node)
          Saves the tagset to a given element.
 
Methods inherited from class frysk.gui.monitor.GuiObject
dontSaveObject, doSaveObject, getSummary, getToolTip, setName, setSummay, setToolTip, shouldSaveObject, toString
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface frysk.gui.monitor.SaveableXXX
dontSaveObject, doSaveObject, shouldSaveObject
 

Constructor Detail

Tagset

public Tagset(String name,
              String desc,
              String command,
              String version)
Creates a new tagset

Parameters:
name - The name of the tagset
desc - A brief description of the tagset

Tagset

public Tagset()
Method Detail

save

public void save(Element node)
Saves the tagset to a given element.

Specified by:
save in interface SaveableXXX
Overrides:
save in class GuiObject
Parameters:
Element - XML node from manager

load

public void load(Element node)
Loads the tagset from a given element.

Specified by:
load in interface SaveableXXX
Overrides:
load in class GuiObject
Parameters:
Element - XML node from manager

getDesc

public String getDesc()
Returns:
The description of this tagset

getName

public String getName()
Overrides:
getName in class GuiObject
Returns:
The name of this tagset

getCommand

public String getCommand()
Returns:
The command that this tagset associates with

getVersion

public String getVersion()
Returns:
The version of the command that this tagset is designed to be used with

addTag

public void addTag(Tag newTag)
Adds the given tag to this tagset. If this tag is already in this Tagset an IllegalArgumentException is raised.

Parameters:
newTag - The tag to add

getTags

public Iterator getTags()
Returns:
An iterator to all the tags in this tagset

containsTag

public boolean containsTag(Tag tag)
Check for the presence of the provided tag in the tagset

Parameters:
tag - The tag to look for
Returns:
true iff the tag was found

equals

public boolean equals(Object obj)
Two tagsets are equal if they are the same size and contain the same tags. Order is irrelevant

Overrides:
equals in class Object