zeus.agentviewer.plansch
Class PlanSchModel

java.lang.Object
  extended byjavax.swing.table.AbstractTableModel
      extended byjavax.swing.table.DefaultTableModel
          extended byzeus.agentviewer.plansch.PlanSchModel
All Implemented Interfaces:
ClockMonitor, PlanStepMonitor, java.io.Serializable, javax.swing.table.TableModel

public class PlanSchModel
extends javax.swing.table.DefaultTableModel
implements PlanStepMonitor, ClockMonitor

See Also:
Serialized Form

Field Summary
protected  javax.swing.event.EventListenerList changeListeners
           
private  PlanRecord[][] data
           
(package private) static int DEFAULT_SIZE
           
private  ExecutionMonitor em
           
private  int from
           
private  int length
           
private  PlanRecord[][] newData
           
private  int now
           
private  Planner planner
           
private  javax.swing.JTable table
           
private  int width
           
 
Fields inherited from class javax.swing.table.DefaultTableModel
columnIdentifiers, dataVector
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
PlanSchModel(AgentContext context)
           
 
Method Summary
 void addChangeListener(javax.swing.event.ChangeListener x)
           
 void clockTicked(int now)
          this is changed for 1.3 to get rid of the annoying swing synchronisation exception.
 void clockTickEvent(ClockEvent event)
           
 void createPlanRecord(PlanRecord pr)
           
protected  void fireChanged()
           
 int getColumnCount()
           
 java.lang.String getColumnName(int col)
          this is altered to return column names that make sense when the table structure is not changing
 int getFrom()
           
 java.lang.Object[] getListeners()
           
 int getProcessors()
           
 int getRowCount()
           
 java.lang.Object getValueAt(int row, int col)
           
 void planStepCreatedEvent(PlanStepEvent event)
           
 void planStepDisposedEvent(PlanStepEvent event)
           
 void planStepStateChangedEvent(PlanStepEvent event)
           
 void removeChangeListener(javax.swing.event.ChangeListener x)
           
 void removePlanRecord(PlanRecord pr)
           
 void removeZeusEventMonitors()
           
 void reSetFrom()
           
 void setFrom(int from)
           
protected  void setTable(javax.swing.JTable table)
           
 void stateChangedPlanRecord(PlanRecord rec)
           
 
Methods inherited from class javax.swing.table.DefaultTableModel
addColumn, addColumn, addColumn, addRow, addRow, convertToVector, convertToVector, getDataVector, insertRow, insertRow, isCellEditable, moveRow, newDataAvailable, newRowsAdded, removeRow, rowsRemoved, setColumnCount, setColumnIdentifiers, setColumnIdentifiers, setDataVector, setDataVector, setNumRows, setRowCount, setValueAt
 
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getListeners, getTableModelListeners, removeTableModelListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_SIZE

static final int DEFAULT_SIZE
See Also:
Constant Field Values

data

private PlanRecord[][] data

newData

private PlanRecord[][] newData

length

private int length

width

private int width

from

private int from

now

private int now

em

private ExecutionMonitor em

planner

private Planner planner

changeListeners

protected javax.swing.event.EventListenerList changeListeners

table

private javax.swing.JTable table
Constructor Detail

PlanSchModel

public PlanSchModel(AgentContext context)
Method Detail

getRowCount

public int getRowCount()
Specified by:
getRowCount in interface javax.swing.table.TableModel

getColumnCount

public int getColumnCount()
Specified by:
getColumnCount in interface javax.swing.table.TableModel

getValueAt

public java.lang.Object getValueAt(int row,
                                   int col)
Specified by:
getValueAt in interface javax.swing.table.TableModel

getColumnName

public java.lang.String getColumnName(int col)
this is altered to return column names that make sense when the table structure is not changing

Specified by:
getColumnName in interface javax.swing.table.TableModel

createPlanRecord

public void createPlanRecord(PlanRecord pr)

stateChangedPlanRecord

public void stateChangedPlanRecord(PlanRecord rec)

setTable

protected void setTable(javax.swing.JTable table)

removePlanRecord

public void removePlanRecord(PlanRecord pr)

clockTicked

public void clockTicked(int now)
this is changed for 1.3 to get rid of the annoying swing synchronisation exception. This was caused by the swing threads attempting to access the table data structures while redrawing. To retunr to the old version fire a tableStructureChanged event


setFrom

public void setFrom(int from)

getFrom

public int getFrom()

reSetFrom

public void reSetFrom()

getListeners

public java.lang.Object[] getListeners()

clockTickEvent

public void clockTickEvent(ClockEvent event)
Specified by:
clockTickEvent in interface ClockMonitor

planStepCreatedEvent

public void planStepCreatedEvent(PlanStepEvent event)
Specified by:
planStepCreatedEvent in interface PlanStepMonitor

planStepDisposedEvent

public void planStepDisposedEvent(PlanStepEvent event)
Specified by:
planStepDisposedEvent in interface PlanStepMonitor

planStepStateChangedEvent

public void planStepStateChangedEvent(PlanStepEvent event)
Specified by:
planStepStateChangedEvent in interface PlanStepMonitor

addChangeListener

public void addChangeListener(javax.swing.event.ChangeListener x)

removeChangeListener

public void removeChangeListener(javax.swing.event.ChangeListener x)

fireChanged

protected void fireChanged()

removeZeusEventMonitors

public void removeZeusEventMonitors()

getProcessors

public int getProcessors()


Copyright © 2000-2003 BT Exact Technologies. All Rights Reserved.