Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.virtuosotechnologies.asaph.standardmodel
Class StdStandardSongBlock  view StdStandardSongBlock download StdStandardSongBlock.java

java.lang.Object
  extended bycom.virtuosotechnologies.lib.base.LinkedObject
      extended bycom.virtuosotechnologies.asaph.standardmodel.BaseSongMember
          extended bycom.virtuosotechnologies.asaph.standardmodel.BaseSongBlock
              extended bycom.virtuosotechnologies.asaph.standardmodel.StdStandardSongBlock
All Implemented Interfaces:
com.virtuosotechnologies.asaph.model.SongBlock, com.virtuosotechnologies.asaph.model.SongMember, com.virtuosotechnologies.asaph.model.StandardSongBlock

class StdStandardSongBlock
extends BaseSongBlock
implements com.virtuosotechnologies.asaph.model.StandardSongBlock

Standard implementation of StandardSongBlock


Nested Class Summary
(package private)  class BaseSongBlock.ParseHandler
           
 
Field Summary
private  java.util.Set omittingVariations_
           
 
Fields inherited from class com.virtuosotechnologies.lib.base.LinkedObject
 
Constructor Summary
(package private) StdStandardSongBlock(StdSong parent, com.virtuosotechnologies.lib.util.StringID id)
          Constructor
(package private) StdStandardSongBlock(StdSong parent, com.virtuosotechnologies.lib.util.StringID id, int indentLevel)
          Constructor
 
Method Summary
 int getIndentLevel()
          Get the indent level
 int getLineCount()
          Get the number of lines
 com.virtuosotechnologies.asaph.model.SongLine getNextLine(com.virtuosotechnologies.asaph.model.SongLine reference)
          Get the next line following reference.
 com.virtuosotechnologies.asaph.model.SongLine getNthLine(int n)
          Get the nth line
 java.util.Set getOmittingVariations()
          Get a set of Variations in which this block is omitted.
 com.virtuosotechnologies.asaph.model.SongLine getPreviousLine(com.virtuosotechnologies.asaph.model.SongLine reference)
          Get the previous line preceding reference.
 java.lang.String getSerializableID()
          Get a string ID that can be used to serialize references to this SongBlock.
 com.virtuosotechnologies.asaph.model.Song getSong()
          Returns the Song containing this SongMember.
(package private)  void handleChordSetDeleted(StdChordSet chordSet, javax.swing.event.UndoableEditListener undoListener)
           
 com.virtuosotechnologies.asaph.model.SongLine insertLineAfter(com.virtuosotechnologies.asaph.model.SongLine after, javax.swing.event.UndoableEditListener undoListener)
          Add a line at the given position.
 com.virtuosotechnologies.asaph.model.SongLine insertLineBefore(com.virtuosotechnologies.asaph.model.SongLine before, javax.swing.event.UndoableEditListener undoListener)
          Add a line at the given position.
(package private)  void internalClearDefunct()
           
(package private)  BaseSongMember internalGetParent()
           
(package private)  void internalReportUndoableEdit(javax.swing.event.UndoableEditListener undoListener, javax.swing.undo.UndoableEdit edit)
           
(package private)  void internalSetDefunct()
           
 boolean isDefunct()
          Returns true if this object is defunct-- that is, if it or any of its ancestors has been removed.
 void omitVariation(com.virtuosotechnologies.asaph.model.Variation variation, javax.swing.event.UndoableEditListener undoListener)
          Add a variation to the set of omitting variations.
 void removeLine(com.virtuosotechnologies.asaph.model.SongLine line, javax.swing.event.UndoableEditListener undoListener)
          Remove the given line.
 void setIndentLevel(int indent, javax.swing.event.UndoableEditListener undoListener)
          Set the indent level
 void unOmitVariation(com.virtuosotechnologies.asaph.model.Variation variation, javax.swing.event.UndoableEditListener undoListener)
          Remove a variation from the set of omitting variations.
(package private)  void unparse(com.virtuosotechnologies.lib.xml.XMLUnparser unparser)
           
(package private)  void unparseVariationAttribute(com.virtuosotechnologies.lib.xml.XMLUnparser unparser)
           
 
Methods inherited from class com.virtuosotechnologies.lib.base.LinkedObject
getNext, getPrevious, linkThisAfter, linkThisBefore, unlinkThis
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.virtuosotechnologies.asaph.model.SongBlock
getIndentLevel, getLineCount, getNextLine, getNthLine, getPreviousLine, getSerializableID, insertLineAfter, insertLineBefore, removeLine, setIndentLevel
 
Methods inherited from interface com.virtuosotechnologies.asaph.model.SongMember
getSong, isDefunct
 

Field Detail

omittingVariations_

private java.util.Set omittingVariations_
Constructor Detail

StdStandardSongBlock

StdStandardSongBlock(StdSong parent,
                     com.virtuosotechnologies.lib.util.StringID id)
Constructor


StdStandardSongBlock

StdStandardSongBlock(StdSong parent,
                     com.virtuosotechnologies.lib.util.StringID id,
                     int indentLevel)
Constructor

Method Detail

unparseVariationAttribute

void unparseVariationAttribute(com.virtuosotechnologies.lib.xml.XMLUnparser unparser)
                         throws java.io.IOException
Specified by:
unparseVariationAttribute in class BaseSongBlock

getOmittingVariations

public java.util.Set getOmittingVariations()
Get a set of Variations in which this block is omitted.

Specified by:
getOmittingVariations in interface com.virtuosotechnologies.asaph.model.StandardSongBlock

omitVariation

public void omitVariation(com.virtuosotechnologies.asaph.model.Variation variation,
                          javax.swing.event.UndoableEditListener undoListener)
Add a variation to the set of omitting variations.

Specified by:
omitVariation in interface com.virtuosotechnologies.asaph.model.StandardSongBlock

unOmitVariation

public void unOmitVariation(com.virtuosotechnologies.asaph.model.Variation variation,
                            javax.swing.event.UndoableEditListener undoListener)
Remove a variation from the set of omitting variations.

Specified by:
unOmitVariation in interface com.virtuosotechnologies.asaph.model.StandardSongBlock

handleChordSetDeleted

void handleChordSetDeleted(StdChordSet chordSet,
                           javax.swing.event.UndoableEditListener undoListener)

unparse

void unparse(com.virtuosotechnologies.lib.xml.XMLUnparser unparser)
       throws java.io.IOException

getIndentLevel

public int getIndentLevel()
Get the indent level

Specified by:
getIndentLevel in interface com.virtuosotechnologies.asaph.model.SongBlock

getLineCount

public int getLineCount()
Get the number of lines

Specified by:
getLineCount in interface com.virtuosotechnologies.asaph.model.SongBlock

getNthLine

public com.virtuosotechnologies.asaph.model.SongLine getNthLine(int n)
Get the nth line

Specified by:
getNthLine in interface com.virtuosotechnologies.asaph.model.SongBlock

getNextLine

public com.virtuosotechnologies.asaph.model.SongLine getNextLine(com.virtuosotechnologies.asaph.model.SongLine reference)
Get the next line following reference. If reference is null, returns the first line. If reference is the last line, returns null;

Specified by:
getNextLine in interface com.virtuosotechnologies.asaph.model.SongBlock

getPreviousLine

public com.virtuosotechnologies.asaph.model.SongLine getPreviousLine(com.virtuosotechnologies.asaph.model.SongLine reference)
Get the previous line preceding reference. If reference is null, returns the last line. If reference is the first line, returns null;

Specified by:
getPreviousLine in interface com.virtuosotechnologies.asaph.model.SongBlock

getSerializableID

public java.lang.String getSerializableID()
Get a string ID that can be used to serialize references to this SongBlock. The ID is guaranteed to be unique among SongBlocks within the owning Song, and will remain the same for the same SongBlock across different executions of the tool. However, two SongBlocks from different Songs may have the same string ID, and the same string ID may be shared between SongBlocks, Variations and ChordSets within the same Song.

Specified by:
getSerializableID in interface com.virtuosotechnologies.asaph.model.SongBlock

setIndentLevel

public void setIndentLevel(int indent,
                           javax.swing.event.UndoableEditListener undoListener)
Set the indent level

Specified by:
setIndentLevel in interface com.virtuosotechnologies.asaph.model.SongBlock

insertLineBefore

public com.virtuosotechnologies.asaph.model.SongLine insertLineBefore(com.virtuosotechnologies.asaph.model.SongLine before,
                                                                      javax.swing.event.UndoableEditListener undoListener)
Add a line at the given position.

Specified by:
insertLineBefore in interface com.virtuosotechnologies.asaph.model.SongBlock

insertLineAfter

public com.virtuosotechnologies.asaph.model.SongLine insertLineAfter(com.virtuosotechnologies.asaph.model.SongLine after,
                                                                     javax.swing.event.UndoableEditListener undoListener)
Add a line at the given position.

Specified by:
insertLineAfter in interface com.virtuosotechnologies.asaph.model.SongBlock

removeLine

public void removeLine(com.virtuosotechnologies.asaph.model.SongLine line,
                       javax.swing.event.UndoableEditListener undoListener)
Remove the given line.

Specified by:
removeLine in interface com.virtuosotechnologies.asaph.model.SongBlock

internalSetDefunct

void internalSetDefunct()

internalClearDefunct

void internalClearDefunct()

internalReportUndoableEdit

void internalReportUndoableEdit(javax.swing.event.UndoableEditListener undoListener,
                                javax.swing.undo.UndoableEdit edit)

internalGetParent

BaseSongMember internalGetParent()

isDefunct

public boolean isDefunct()
Returns true if this object is defunct-- that is, if it or any of its ancestors has been removed. If this returns true, the behavior of any other methods on this object is undefined.

Specified by:
isDefunct in interface com.virtuosotechnologies.asaph.model.SongMember

getSong

public com.virtuosotechnologies.asaph.model.Song getSong()
Returns the Song containing this SongMember. If this member is defunct, this will return the song that contained this member before the member was defuncted.

Specified by:
getSong in interface com.virtuosotechnologies.asaph.model.SongMember