fr.ifremer.isisfish.simulator.launcher
Class SimulationServiceTableModel

java.lang.Object
  extended by javax.swing.table.AbstractTableModel
      extended by fr.ifremer.isisfish.simulator.launcher.SimulationServiceTableModel
All Implemented Interfaces:
Serializable, TableModel

public class SimulationServiceTableModel
extends AbstractTableModel

Model de table pour suivre l'evolution des differentes simulations en cours.

ATTENTION Cette classe doit supporter les acces concurrents car plusieurs threads peuvent etre simultanement en train de faire des simulations

Version:
$Revision: 3124 $ Last update : $Date: 2010-11-29 19:14:09 +0100 (lun., 29 nov. 2010) $ By : $Author: chatellier $
Author:
poussin
See Also:
Serialized Form

Nested Class Summary
protected static interface SimulationServiceTableModel.AbstractJobListener
           
protected  class SimulationServiceTableModel.ControlListener
           
 
Field Summary
protected  Class<?>[] columnClass
          Columns types.
protected static String[] columnHeader
          Columns names.
protected  SimulationServiceTableModel.ControlListener controlListener
           
protected  Map<String,SimulationJob> jobIds
           
protected  SimulationServiceTableModel.AbstractJobListener jobListener
           
protected  ArrayList<SimulationJob> jobs
           
protected  Map<SimulationJob,JProgressBar> progress
          progress bar (one for each row)
protected  SimulationService simulationService
           
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
SimulationServiceTableModel(SimulationService simulationService, boolean forDoToJobs)
           
 
Method Summary
 void addJob(SimulationJob job)
           
 void clearJob()
           
 boolean contains(SimulationJob job)
           
 Class<?> getColumnClass(int columnIndex)
           
 int getColumnCount()
           
 String getColumnName(int column)
           
 SimulationJob getJob(int row)
           
 ArrayList<SimulationJob> getJobs()
           
protected  JProgressBar getProgressBar(SimulationJob job)
           
 int getRowCount()
           
 Object getValueAt(int rowIndex, int columnIndex)
           
 void removeJob(SimulationJob job)
           
 void setJobs(ArrayList<SimulationJob> jobs)
           
 
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, isCellEditable, removeTableModelListener, setValueAt
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

columnHeader

protected static final String[] columnHeader
Columns names.


columnClass

protected Class<?>[] columnClass
Columns types.


simulationService

protected SimulationService simulationService

jobs

protected ArrayList<SimulationJob> jobs

jobIds

protected Map<String,SimulationJob> jobIds

progress

protected Map<SimulationJob,JProgressBar> progress
progress bar (one for each row)


jobListener

protected SimulationServiceTableModel.AbstractJobListener jobListener

controlListener

protected SimulationServiceTableModel.ControlListener controlListener
Constructor Detail

SimulationServiceTableModel

public SimulationServiceTableModel(SimulationService simulationService,
                                   boolean forDoToJobs)
Method Detail

addJob

public void addJob(SimulationJob job)

removeJob

public void removeJob(SimulationJob job)

clearJob

public void clearJob()

getJobs

public ArrayList<SimulationJob> getJobs()

setJobs

public void setJobs(ArrayList<SimulationJob> jobs)

contains

public boolean contains(SimulationJob job)

getProgressBar

protected JProgressBar getProgressBar(SimulationJob job)

getJob

public SimulationJob getJob(int row)

getRowCount

public int getRowCount()

getColumnCount

public int getColumnCount()

getColumnClass

public Class<?> getColumnClass(int columnIndex)
Specified by:
getColumnClass in interface TableModel
Overrides:
getColumnClass in class AbstractTableModel

getColumnName

public String getColumnName(int column)
Specified by:
getColumnName in interface TableModel
Overrides:
getColumnName in class AbstractTableModel

getValueAt

public Object getValueAt(int rowIndex,
                         int columnIndex)


Copyright © 1999-2011 CodeLutin. All Rights Reserved.