com.melloware.jukes.file
Class Disclist

java.lang.Object
  extended by com.jgoodies.binding.beans.Model
      extended by com.melloware.jukes.file.Disclist
All Implemented Interfaces:
com.jgoodies.binding.beans.Observable, PropertyChangeListener, Serializable, EventListener

public final class Disclist
extends com.jgoodies.binding.beans.Model
implements PropertyChangeListener

The disclist of the application. The list can also be saved as file.

Copyright (c) 2006 Melloware, Inc.

Version:
4.0 AZ Development 2009
Author:
Emil A. Lefkof III
See Also:
Serialized Form

Field Summary
static String PROPERTYNAME_DISC_LIST
           
 
Constructor Summary
Disclist()
          Default constructor constructs a list of 100 items.
 
Method Summary
 void add(Object o)
          Adds an element to the disclist.
 Disc getCurrentDisc()
          Gets the currentDisc.
 List getDiscList()
          Gets the discList.
 Object getNext()
          Returns the next element
 Iterator getNextIterator()
          Returns an Iterator for the available next elements.
 Object getPrevious()
          Returns the previous element
 boolean hasNext()
          Checks and answer if there's a next element.
 boolean hasPrevious()
          Checks and answer if there's a next element.
 void moveDown(int index)
          Move an item down on the list.
 void moveUp(int index)
          Move an item up on the list.
 void propertyChange(PropertyChangeEvent evt)
          The Catalog has changed.
 void remove(int index)
          Removes an item from the list.
 Disc removeCurrentDisc()
          Delete the currentDisc.
 void save(File aFile)
          Saves a disclist to a file.
 Disc setCurrentDisc(Disc aDisc)
          Sets the currentDisc.
 int size()
          Returns the size of the correct list.
 String toString()
           
 void updateState()
          Updates the state
 
Methods inherited from class com.jgoodies.binding.beans.Model
addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, addVetoableChangeListener, equals, fireIndexedPropertyChange, fireIndexedPropertyChange, fireIndexedPropertyChange, fireMultiplePropertiesChanged, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, getPropertyChangeListeners, getPropertyChangeListeners, getVetoableChangeListeners, getVetoableChangeListeners, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, removeVetoableChangeListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PROPERTYNAME_DISC_LIST

public static final String PROPERTYNAME_DISC_LIST
See Also:
Constant Field Values
Constructor Detail

Disclist

public Disclist()
Default constructor constructs a list of 100 items.

Method Detail

getDiscList

public List getDiscList()
Gets the discList.

Returns:
Returns the discList.

getCurrentDisc

public Disc getCurrentDisc()
Gets the currentDisc.

Returns:
Returns the currentDisc.

setCurrentDisc

public Disc setCurrentDisc(Disc aDisc)
Sets the currentDisc.

Returns:
Returns the currentDisc.

removeCurrentDisc

public Disc removeCurrentDisc()
Delete the currentDisc.

Returns:
Returns null for the currentDisc.

hasNext

public boolean hasNext()
Checks and answer if there's a next element.

Returns:
true if there's a next element

hasPrevious

public boolean hasPrevious()
Checks and answer if there's a next element.

Returns:
true if there's a next element

getNext

public Object getNext()
Returns the next element

Returns:
the next element

getPrevious

public Object getPrevious()
Returns the previous element

Returns:
the previous element

getNextIterator

public Iterator getNextIterator()
Returns an Iterator for the available next elements.

Returns:
an iterator that iterates over the available next elements

moveDown

public void moveDown(int index)
Move an item down on the list.

Parameters:
index - the index to move

moveUp

public void moveUp(int index)
Move an item up on the list.

Parameters:
index - the index to move

propertyChange

public void propertyChange(PropertyChangeEvent evt)
The Catalog has changed.

Specified by:
propertyChange in interface PropertyChangeListener
Parameters:
evt - describes the property change

remove

public void remove(int index)
Removes an item from the list.

Parameters:
index - the index to remove from the list

save

public void save(File aFile)
          throws Exception
Saves a disclist to a file.

Parameters:
aFile - the file to save.
Throws:
Exception - if any error occurs

size

public int size()
Returns the size of the correct list.

Returns:
the size of the correct list

toString

public String toString()
Overrides:
toString in class Object

updateState

public void updateState()
Updates the state


add

public void add(Object o)
Adds an element to the disclist.

Parameters:
o - the object to add


Copyright © 1999-2010 Melloware Inc. All Rights Reserved.