net.sourceforge.nite.gui.actions
Class Mutation

java.lang.Object
  extended by net.sourceforge.nite.gui.actions.Mutation

public class Mutation
extends java.lang.Object

Author:
judyr Mutation represent the changes which can be made to the xml object model when the user interacts with the interface. You can either add or delete an element. If adding and element, you can add an attribute or some new content. A new attribute can have a name and a value associated with it. To modify an attribute in an existing element, add an attribute with the same name with the new value and it will replace the old attribute. When adding content, you can either add a new textual value for the element, or give it a new child by specifying the id of the new child This design is taken from Jonathan Kilgour's document "Actions within the NITE GUI specification" written on 26/03/02

Field Summary
static java.lang.String add_attribute
           
static java.lang.String add_content
           
static java.lang.String add_element
           
static java.lang.String delete_element
           
 
Constructor Summary
Mutation(java.lang.String t)
           
 
Method Summary
 net.sourceforge.nite.gui.actions.Mutation.Attribute getAttribute()
          Returns the attribute.
 net.sourceforge.nite.gui.actions.Mutation.Content getContent()
          Returns the content.
 void setAttribute(net.sourceforge.nite.gui.actions.Mutation.Attribute attribute)
          Sets the attribute.
 void setAttribute(java.lang.String name, java.lang.String value)
           
 void setContent(net.sourceforge.nite.gui.actions.Mutation.Content content)
          Sets the content.
 void setContent(java.lang.String textcontent, java.lang.String child)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

add_element

public static final java.lang.String add_element
See Also:
Constant Field Values

add_attribute

public static final java.lang.String add_attribute
See Also:
Constant Field Values

add_content

public static final java.lang.String add_content
See Also:
Constant Field Values

delete_element

public static final java.lang.String delete_element
See Also:
Constant Field Values
Constructor Detail

Mutation

public Mutation(java.lang.String t)
Method Detail

setContent

public void setContent(java.lang.String textcontent,
                       java.lang.String child)

setAttribute

public void setAttribute(java.lang.String name,
                         java.lang.String value)

getAttribute

public net.sourceforge.nite.gui.actions.Mutation.Attribute getAttribute()
Returns the attribute.

Returns:
Attribute

getContent

public net.sourceforge.nite.gui.actions.Mutation.Content getContent()
Returns the content.

Returns:
Content

setAttribute

public void setAttribute(net.sourceforge.nite.gui.actions.Mutation.Attribute attribute)
Sets the attribute.

Parameters:
attribute - The attribute to set

setContent

public void setContent(net.sourceforge.nite.gui.actions.Mutation.Content content)
Sets the content.

Parameters:
content - The content to set