nl.tudelft.simulation.dsol.eventlists
Class TableModelEventList

java.lang.Object
  extended bynl.tudelft.simulation.dsol.eventlists.RedBlackTree
      extended bynl.tudelft.simulation.dsol.eventlists.TableModelEventList
All Implemented Interfaces:
EventListInterface, java.io.Serializable

public class TableModelEventList
extends RedBlackTree

A TableModel implementation of an eventlist is an extionsion of the eventlist which upholds its own TableModel. This implementation is used to graphically display the events in the tree.

(c) copyright 2003 Delft University of Technology , the Netherlands.
See for project information www.simulation.tudelft.nl
License of use: General Public License (GPL) , no warranty

Since:
1.0
Version:
1.5 2004-03-28
Author:
Peter Jacobs
See Also:
Serialized Form

Field Summary
static nl.tudelft.simulation.event.EventType EVENTLIST_CHANCED_EVENT
          The EVENTLIST_CHANGED_EVENT
static java.lang.String[] HEADER
          The tableHeader
 
Fields inherited from class nl.tudelft.simulation.dsol.eventlists.RedBlackTree
BLACK, modCount, RED, root, size
 
Constructor Summary
TableModelEventList(EventListInterface origin)
          constructs a new TableModelEventList
 
Method Summary
 boolean add(SimEventInterface value)
          adds an event to the eventlist
 boolean addAll(java.util.Collection collection)
          adds a collection of events to the tree
 void clear()
          clears the eventlist by removing all its scheduled events.
 EventListInterface getOrigin()
          returns the TreeMapEventList
 javax.swing.table.TableModel getTableModel()
          returns the tableModel
 boolean remove(SimEventInterface value)
          removes the event from this tree
 boolean removeAll(java.util.Collection collection)
          removes a collection of events from this tree
 SimEventInterface removeFirst()
          removes the first event from the eventlist.
 SimEventInterface removeLast()
          removes the last event from the eventlist.
 void setShowPackage(boolean showPackage)
          sets the showPackage
 
Methods inherited from class nl.tudelft.simulation.dsol.eventlists.RedBlackTree
contains, containsAll, deleteEntry, first, firstEntry, isEmpty, iterator, last, size, successor, toArray
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EVENTLIST_CHANCED_EVENT

public static final nl.tudelft.simulation.event.EventType EVENTLIST_CHANCED_EVENT
The EVENTLIST_CHANGED_EVENT


HEADER

public static final java.lang.String[] HEADER
The tableHeader

Constructor Detail

TableModelEventList

public TableModelEventList(EventListInterface origin)
constructs a new TableModelEventList

Parameters:
origin - the origin
Method Detail

getOrigin

public EventListInterface getOrigin()
returns the TreeMapEventList

Returns:
EventListenerInterface

getTableModel

public javax.swing.table.TableModel getTableModel()
returns the tableModel

Returns:
TableModel resutl

setShowPackage

public void setShowPackage(boolean showPackage)
sets the showPackage

Parameters:
showPackage - The showPackage to set.

add

public boolean add(SimEventInterface value)
Description copied from interface: EventListInterface
adds an event to the eventlist

Specified by:
add in interface EventListInterface
Overrides:
add in class RedBlackTree
See Also:
#add(nl.tudelft.simulation.dsol.formalisms.devs.SimEventInterface)

addAll

public boolean addAll(java.util.Collection collection)
Description copied from interface: EventListInterface
adds a collection of events to the tree

Specified by:
addAll in interface EventListInterface
Overrides:
addAll in class RedBlackTree
See Also:
#addAll(java.util.Collection)

clear

public void clear()
Description copied from interface: EventListInterface
clears the eventlist by removing all its scheduled events.

Specified by:
clear in interface EventListInterface
Overrides:
clear in class RedBlackTree
See Also:
#clear()

remove

public boolean remove(SimEventInterface value)
Description copied from interface: EventListInterface
removes the event from this tree

Specified by:
remove in interface EventListInterface
Overrides:
remove in class RedBlackTree
See Also:
#remove(nl.tudelft.simulation.dsol.formalisms.devs.SimEventInterface)

removeAll

public boolean removeAll(java.util.Collection collection)
Description copied from interface: EventListInterface
removes a collection of events from this tree

Specified by:
removeAll in interface EventListInterface
Overrides:
removeAll in class RedBlackTree
See Also:
#removeAll(java.util.Collection)

removeFirst

public SimEventInterface removeFirst()
Description copied from interface: EventListInterface
removes the first event from the eventlist.

Specified by:
removeFirst in interface EventListInterface
Overrides:
removeFirst in class RedBlackTree
See Also:
EventListInterface.removeFirst()

removeLast

public SimEventInterface removeLast()
Description copied from interface: EventListInterface
removes the last event from the eventlist.

Specified by:
removeLast in interface EventListInterface
Overrides:
removeLast in class RedBlackTree
See Also:
EventListInterface.removeLast()


Copyright © 2002-2004 Delft University of Technology, the Netherlands. All Rights Reserved.