net.charlesames.music.musicxml
Class SystemLayout

java.lang.Object
  extended by net.charlesames.utility.common.Disposable
      extended by net.charlesames.music.musicxml.MusicXmlEntity
          extended by net.charlesames.music.musicxml.SystemLayout

public class SystemLayout
extends MusicXmlEntity

The SystemLayout class implements the MusicXML <system-layout> element.

Author:
Charles Ames

Method Summary
 void dispose()
          Release resources engaged by this object, thus rendering it amenable to garbage collection.
 boolean equals(MusicXmlEntity other)
          Test if this MusicXML entity has the same content as another object.
static SystemLayout fromXmlNode(org.w3c.dom.Element element, MusicXmlEntity container)
          Create a new SystemLayout instance and fill it with loaded data.
static SystemLayout getInstance(MusicXmlEntity container)
          Create a new SystemLayout instance.
 int getSystemDistance()
          Getter for the SystemDistance property
 SystemMargins getSystemMargins()
          Getter for the SystemMargins property
 int getTopSystemDistance()
          Getter for the TopSystemDistance property
 void putXmlData(org.w3c.dom.Element element)
           
 void setSystemDistance(int systemDistance)
          Setter for the SystemDistance property
 void setSystemMargins(SystemMargins systemMargins)
          Setter for the SystemMargins property
 void setTopSystemDistance(int topSystemDistance)
          Setter for the TopSystemDistance property
 org.w3c.dom.Node toXmlNode(org.w3c.dom.Node parent)
          Serialize the content of a MusicXML entity into an XML element.
 
Methods inherited from class net.charlesames.music.musicxml.MusicXmlEntity
getContainer, makeDirty
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

dispose

public void dispose()
Description copied from class: Disposable
Release resources engaged by this object, thus rendering it amenable to garbage collection.

Specified by:
dispose in class Disposable

getInstance

public static SystemLayout getInstance(MusicXmlEntity container)
Create a new SystemLayout instance.

Parameters:
container - The MusicXmlEntity which will contain the new SystemLayout instance.
Returns:
The newly created SystemLayout instance.

getSystemDistance

public int getSystemDistance()
Getter for the SystemDistance property

Returns:
The current SystemDistance value.

setSystemDistance

public void setSystemDistance(int systemDistance)
Setter for the SystemDistance property

Parameters:
systemDistance - The intended SystemDistance value.

getTopSystemDistance

public int getTopSystemDistance()
Getter for the TopSystemDistance property

Returns:
The current TopSystemDistance value.

setTopSystemDistance

public void setTopSystemDistance(int topSystemDistance)
Setter for the TopSystemDistance property

Parameters:
topSystemDistance - The intended TopSystemDistance value.

getSystemMargins

public SystemMargins getSystemMargins()
Getter for the SystemMargins property

Returns:
The current SystemMargins value.

setSystemMargins

public void setSystemMargins(SystemMargins systemMargins)
Setter for the SystemMargins property

Parameters:
systemMargins - The intended SystemMargins value.

fromXmlNode

public static SystemLayout fromXmlNode(org.w3c.dom.Element element,
                                       MusicXmlEntity container)
Create a new SystemLayout instance and fill it with loaded data.

Parameters:
element - The XML element that provides the SystemLayout data
container - The MusicXmlEntity which will contain the new SystemLayout instance.
Returns:
The newly created SystemLayout instance.

toXmlNode

public org.w3c.dom.Node toXmlNode(org.w3c.dom.Node parent)
Description copied from class: MusicXmlEntity
Serialize the content of a MusicXML entity into an XML element.

Specified by:
toXmlNode in class MusicXmlEntity
Parameters:
parent - The XML element which is to receive the data.
Returns:
The newly created XML element.

putXmlData

public void putXmlData(org.w3c.dom.Element element)

equals

public boolean equals(MusicXmlEntity other)
Description copied from class: MusicXmlEntity
Test if this MusicXML entity has the same content as another object.

Overrides:
equals in class MusicXmlEntity
Parameters:
other - The other object.
Returns:
True if both objects have the same content; false otherwise.