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

Quick Search    Search Deep

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

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

abstract class BaseSongBlock
extends BaseSongMember
implements com.virtuosotechnologies.asaph.model.SongBlock

Base class for SongBlock implementations


Nested Class Summary
(package private)  class BaseSongBlock.ParseHandler
           
 
Field Summary
private  com.virtuosotechnologies.lib.util.StringID id_
           
private  int indentLevel_
           
private  ListHelper lineList_
           
 
Fields inherited from class com.virtuosotechnologies.lib.base.LinkedObject
 
Constructor Summary
(package private) BaseSongBlock(StdSong parent, com.virtuosotechnologies.lib.util.StringID id, int indentLevel)
           
 
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
 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 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
(package private)  void unparse(com.virtuosotechnologies.lib.xml.XMLUnparser unparser)
           
(package private) abstract  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.SongMember
getSong, isDefunct
 

Field Detail

indentLevel_

private int indentLevel_

lineList_

private ListHelper lineList_

id_

private com.virtuosotechnologies.lib.util.StringID id_
Constructor Detail

BaseSongBlock

BaseSongBlock(StdSong parent,
              com.virtuosotechnologies.lib.util.StringID id,
              int indentLevel)
Method Detail

handleChordSetDeleted

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

unparse

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

unparseVariationAttribute

abstract void unparseVariationAttribute(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