be.ac.ulg.montefiore.run.totem.visualtopo.guiComponents.domainTables
Class DomainTableModel

java.lang.Object
  extended by javax.swing.table.AbstractTableModel
      extended by be.ac.ulg.montefiore.run.totem.visualtopo.guiComponents.domainTables.DomainTableModel
All Implemented Interfaces:
DomainChangeListener, java.io.Serializable, javax.swing.table.TableModel
Direct Known Subclasses:
DomainElementTableModel, LinksWITableModel

public abstract class DomainTableModel
extends javax.swing.table.AbstractTableModel
implements DomainChangeListener

Abstract model for tables that are specific to a domain. The model listens for change in the domain. Override the DomainChangeListener methods to react to the changes.

Author:
Ga�l Monfort (monfort@run.montefiore.ulg.ac.be)
See Also:
DomainTable, Serialized Form

Field Summary
protected  java.lang.String[] columnNames
           
protected  Domain domain
           
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
DomainTableModel()
           
 
Method Summary
 void addLinkEvent(Link link)
          Notify a add link event
 void addLspEvent(Lsp lsp)
          Notify a add LSP event
 void addNodeEvent(Node node)
          Notify a add node event
protected abstract  void fillData()
           
 int getColumnCount()
          Returns the number of columns in the model
 java.lang.String getColumnName(int column)
          Returns the name of the column which number is given as parameter
 Domain getDomain()
           
 boolean isCellEditable(int rowIndex, int columnIndex)
          Avoid column edition
 boolean isColumnDefaultVisible(int column)
          Returns true if the column should be visible by default
 void linkBandwidthChangeEvent(Link link)
          Notify a link bandwidth change event
 void linkDelayChangeEvent(Link link)
          Notify a link delay change event
 void linkMetricChangeEvent(Link link)
          Notify a link metric change event
 void linkReservedBandwidthChangeEvent(Link link)
          Notify a link reserved bandwidth change event
 void linkStatusChangeEvent(Link link)
          Notify a link status change event
 void linkTeMetricChangeEvent(Link link)
          Notify a link TE metric change event
 void lspReservationChangeEvent(Lsp lsp)
          Notify a LSP reservation change event
 void lspWorkingPathChangeEvent(Lsp lsp)
          Notify a change in the working path of the lsp.
 void nodeLocationChangeEvent(Node node)
          Notify a node location change event
 void nodeStatusChangeEvent(Node node)
          Notify a node status change event
 void removeLinkEvent(Link link)
          Notify a remove link event
 void removeLspEvent(Lsp lsp)
          Notify a remove LSP event
 void removeNodeEvent(Node node)
          Notify a remove node event
 void rerouteLspEvent(Lsp lsp)
          Notify the fact that a LSP must be rerouted.
 void setDomain(Domain domain)
           
abstract  void sortByColumn(int column)
           
 
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getListeners, getTableModelListeners, removeTableModelListener, setValueAt
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.swing.table.TableModel
getRowCount, getValueAt
 

Field Detail

columnNames

protected java.lang.String[] columnNames

domain

protected Domain domain
Constructor Detail

DomainTableModel

public DomainTableModel()
Method Detail

setDomain

public void setDomain(Domain domain)

sortByColumn

public abstract void sortByColumn(int column)

isColumnDefaultVisible

public boolean isColumnDefaultVisible(int column)
Returns true if the column should be visible by default

Parameters:
column -
Returns:

fillData

protected abstract void fillData()

getDomain

public Domain getDomain()

getColumnName

public java.lang.String getColumnName(int column)
Returns the name of the column which number is given as parameter

Specified by:
getColumnName in interface javax.swing.table.TableModel
Overrides:
getColumnName in class javax.swing.table.AbstractTableModel
Parameters:
column - contain a column number
Returns:
returns the name of the column

getColumnCount

public int getColumnCount()
Returns the number of columns in the model

Specified by:
getColumnCount in interface javax.swing.table.TableModel
Returns:
Returns the number of columns in the model

isCellEditable

public boolean isCellEditable(int rowIndex,
                              int columnIndex)
Avoid column edition

Specified by:
isCellEditable in interface javax.swing.table.TableModel
Overrides:
isCellEditable in class javax.swing.table.AbstractTableModel
Returns:
returns false

addNodeEvent

public void addNodeEvent(Node node)
Description copied from interface: DomainChangeListener
Notify a add node event

Specified by:
addNodeEvent in interface DomainChangeListener

removeNodeEvent

public void removeNodeEvent(Node node)
Description copied from interface: DomainChangeListener
Notify a remove node event

Specified by:
removeNodeEvent in interface DomainChangeListener

nodeStatusChangeEvent

public void nodeStatusChangeEvent(Node node)
Description copied from interface: DomainChangeListener
Notify a node status change event

Specified by:
nodeStatusChangeEvent in interface DomainChangeListener

nodeLocationChangeEvent

public void nodeLocationChangeEvent(Node node)
Description copied from interface: DomainChangeListener
Notify a node location change event

Specified by:
nodeLocationChangeEvent in interface DomainChangeListener

addLinkEvent

public void addLinkEvent(Link link)
Description copied from interface: DomainChangeListener
Notify a add link event

Specified by:
addLinkEvent in interface DomainChangeListener

removeLinkEvent

public void removeLinkEvent(Link link)
Description copied from interface: DomainChangeListener
Notify a remove link event

Specified by:
removeLinkEvent in interface DomainChangeListener

linkStatusChangeEvent

public void linkStatusChangeEvent(Link link)
Description copied from interface: DomainChangeListener
Notify a link status change event

Specified by:
linkStatusChangeEvent in interface DomainChangeListener

linkMetricChangeEvent

public void linkMetricChangeEvent(Link link)
Description copied from interface: DomainChangeListener
Notify a link metric change event

Specified by:
linkMetricChangeEvent in interface DomainChangeListener

linkTeMetricChangeEvent

public void linkTeMetricChangeEvent(Link link)
Description copied from interface: DomainChangeListener
Notify a link TE metric change event

Specified by:
linkTeMetricChangeEvent in interface DomainChangeListener

linkBandwidthChangeEvent

public void linkBandwidthChangeEvent(Link link)
Description copied from interface: DomainChangeListener
Notify a link bandwidth change event

Specified by:
linkBandwidthChangeEvent in interface DomainChangeListener

linkReservedBandwidthChangeEvent

public void linkReservedBandwidthChangeEvent(Link link)
Description copied from interface: DomainChangeListener
Notify a link reserved bandwidth change event

Specified by:
linkReservedBandwidthChangeEvent in interface DomainChangeListener

linkDelayChangeEvent

public void linkDelayChangeEvent(Link link)
Description copied from interface: DomainChangeListener
Notify a link delay change event

Specified by:
linkDelayChangeEvent in interface DomainChangeListener

addLspEvent

public void addLspEvent(Lsp lsp)
Description copied from interface: DomainChangeListener
Notify a add LSP event

Specified by:
addLspEvent in interface DomainChangeListener

removeLspEvent

public void removeLspEvent(Lsp lsp)
Description copied from interface: DomainChangeListener
Notify a remove LSP event

Specified by:
removeLspEvent in interface DomainChangeListener

rerouteLspEvent

public void rerouteLspEvent(Lsp lsp)
Description copied from interface: DomainChangeListener
Notify the fact that a LSP must be rerouted.

Specified by:
rerouteLspEvent in interface DomainChangeListener
Parameters:
lsp - The LSP to reroute.

lspReservationChangeEvent

public void lspReservationChangeEvent(Lsp lsp)
Description copied from interface: DomainChangeListener
Notify a LSP reservation change event

Specified by:
lspReservationChangeEvent in interface DomainChangeListener

lspWorkingPathChangeEvent

public void lspWorkingPathChangeEvent(Lsp lsp)
Description copied from interface: DomainChangeListener
Notify a change in the working path of the lsp. The working path of a lsp is the path used for routing.

Specified by:
lspWorkingPathChangeEvent in interface DomainChangeListener


Copyright © 2004-2007 Research Unit in Networking, All Rights Reserved.