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

Quick Search    Search Deep

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

java.lang.Object
  extended bycom.virtuosotechnologies.lib.base.LinkedObject
      extended bycom.virtuosotechnologies.asaph.standardmodel.BaseSongMember
          extended bycom.virtuosotechnologies.asaph.standardmodel.BaseStringList
              extended bycom.virtuosotechnologies.asaph.standardmodel.StdStringListField
All Implemented Interfaces:
com.virtuosotechnologies.asaph.model.Field, com.virtuosotechnologies.asaph.model.SongMember, com.virtuosotechnologies.asaph.model.StringList, com.virtuosotechnologies.asaph.model.StringListField

class StdStringListField
extends BaseStringList
implements com.virtuosotechnologies.asaph.model.StringListField

Standard implementation of StringListField


Nested Class Summary
(package private)  class BaseStringList.ParseHandler
           
 
Field Summary
private  java.lang.String name_
           
 
Fields inherited from class com.virtuosotechnologies.lib.base.LinkedObject
 
Constructor Summary
(package private) StdStringListField(StdSong parent, java.lang.String name)
           
 
Method Summary
 void clear(javax.swing.event.UndoableEditListener undoListener)
          Clear the string list
 java.lang.String getFieldName()
          Get the name of the field.
 com.virtuosotechnologies.asaph.model.SimpleString getNextString(com.virtuosotechnologies.asaph.model.SimpleString reference)
          Get the next string following reference.
 com.virtuosotechnologies.asaph.model.SimpleString getNthString(int n)
          Get the nth string
 com.virtuosotechnologies.asaph.model.SimpleString getPreviousString(com.virtuosotechnologies.asaph.model.SimpleString reference)
          Get the previous string preceding reference.
 com.virtuosotechnologies.asaph.model.Song getSong()
          Returns the Song containing this SongMember.
 int getStringCount()
          Get the number of strings in the list
 com.virtuosotechnologies.asaph.model.SimpleString insertStringAfter(com.virtuosotechnologies.asaph.model.SimpleString after, java.lang.String str, javax.swing.event.UndoableEditListener undoListener)
          Add a string to the list at the given position
 com.virtuosotechnologies.asaph.model.SimpleString insertStringBefore(com.virtuosotechnologies.asaph.model.SimpleString before, java.lang.String str, javax.swing.event.UndoableEditListener undoListener)
          Add a string to the list 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 removeString(com.virtuosotechnologies.asaph.model.SimpleString str, javax.swing.event.UndoableEditListener undoListener)
          Remove a SimpleString from the list.
(package private)  void unparse(com.virtuosotechnologies.lib.xml.XMLUnparser unparser, java.lang.String element)
           
(package private)  void unparseAttributes(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
 
Methods inherited from interface com.virtuosotechnologies.asaph.model.StringList
clear, getNextString, getNthString, getPreviousString, getStringCount, insertStringAfter, insertStringBefore, removeString
 

Field Detail

name_

private java.lang.String name_
Constructor Detail

StdStringListField

StdStringListField(StdSong parent,
                   java.lang.String name)
Method Detail

unparseAttributes

void unparseAttributes(com.virtuosotechnologies.lib.xml.XMLUnparser unparser)
                 throws java.io.IOException
Overrides:
unparseAttributes in class BaseStringList

getFieldName

public java.lang.String getFieldName()
Get the name of the field.

Specified by:
getFieldName in interface com.virtuosotechnologies.asaph.model.Field

unparse

void unparse(com.virtuosotechnologies.lib.xml.XMLUnparser unparser,
             java.lang.String element)
       throws java.io.IOException

getStringCount

public int getStringCount()
Get the number of strings in the list

Specified by:
getStringCount in interface com.virtuosotechnologies.asaph.model.StringList

getNthString

public com.virtuosotechnologies.asaph.model.SimpleString getNthString(int n)
Get the nth string

Specified by:
getNthString in interface com.virtuosotechnologies.asaph.model.StringList

getNextString

public com.virtuosotechnologies.asaph.model.SimpleString getNextString(com.virtuosotechnologies.asaph.model.SimpleString reference)
Get the next string following reference. If reference is null, returns the first string. If reference is the last string, returns null;

Specified by:
getNextString in interface com.virtuosotechnologies.asaph.model.StringList

getPreviousString

public com.virtuosotechnologies.asaph.model.SimpleString getPreviousString(com.virtuosotechnologies.asaph.model.SimpleString reference)
Get the previous string preceding reference. If reference is null, returns the last string. If reference is the first string, returns null;

Specified by:
getPreviousString in interface com.virtuosotechnologies.asaph.model.StringList

insertStringBefore

public com.virtuosotechnologies.asaph.model.SimpleString insertStringBefore(com.virtuosotechnologies.asaph.model.SimpleString before,
                                                                            java.lang.String str,
                                                                            javax.swing.event.UndoableEditListener undoListener)
Add a string to the list at the given position

Specified by:
insertStringBefore in interface com.virtuosotechnologies.asaph.model.StringList

insertStringAfter

public com.virtuosotechnologies.asaph.model.SimpleString insertStringAfter(com.virtuosotechnologies.asaph.model.SimpleString after,
                                                                           java.lang.String str,
                                                                           javax.swing.event.UndoableEditListener undoListener)
Add a string to the list at the given position

Specified by:
insertStringAfter in interface com.virtuosotechnologies.asaph.model.StringList

removeString

public void removeString(com.virtuosotechnologies.asaph.model.SimpleString str,
                         javax.swing.event.UndoableEditListener undoListener)
Remove a SimpleString from the list.

Specified by:
removeString in interface com.virtuosotechnologies.asaph.model.StringList

clear

public void clear(javax.swing.event.UndoableEditListener undoListener)
Clear the string list

Specified by:
clear in interface com.virtuosotechnologies.asaph.model.StringList

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