All Packages  This Package  Class Hierarchy  Class Search  Index

Class bmsi.edx.fs.DBTable
java.lang.Object
   |
   +----bmsi.edx.fs.FSComp
           |
           +----bmsi.edx.fs.FSGrid
                   |
                   +----bmsi.edx.fs.DBTable

  Summary

public class  DBTable
     extends bmsi.edx.fs.FSGrid
     implements bmsi.db.DataListener, 
                bmsi.db.BufferListener
{
          // Constructors 1
     public DBTable(FSPanel, DataScroller, int, int, int);

          // Methods 13
     public void activeChanged(DataScroller);
     public void datasetScrolled(DataScroller, int);
     public void editingChanged(DataScroller);
     public final int getRecordCount();
     public String getText(int, int);
     public void processPfkey(PFKeyEvent);
     public void rdline() throws IOException;
     public void recordChanged(DataScroller, Field);
     public void removeBuffers(int, int);
     public void setFlds(Field[]);
     public void setText(int, int, String);
     public void updateData(DataScroller);
     public void zeroBuf();
}

A database table control for EDX. This was a major function of the FCB statement in the BMS EDL library. The location of the table on the screen is specified with a beginning and ending field and a number of lines. The beginning and ending field define the first line, which is copied to give the full line count.

Author:
Stuart D. Gathman Copyright (C) 1999 Business Management Systems, Inc.




  Constructors

· DBTable

Summary  |  Top

   public DBTable(FSPanel pan, 
                  DataScroller ds, 
                  int beg, 
                  int end, 
                  int cnt) 

Create a DBTable. The first row between the first and last fields will be duplicated to create additional lines.

Parameter Description
pan the panel containing the fields for this DBTable
ds the Dataset with the records displayed/edited by this table
beg the first field index of the first row of the table
end the last field index of the first row of the table
cnt the total number of screen lines for the table



  Methods

· setFlds

Summary  |  Top
   public void setFlds(Field[] f) 

Set the data fields displayed in the columns controlled by this DBTable. By default, the first n fields of the DataScroller are displayed - where n is the number of columns in the table.



· getText

Summary  |  Top
   public String getText(int row, 
                         int col) 

Return data for a FSGrid cell as a String from the corresponding database field.

Parameter Description
row the grid row
col the grid col

Returns:
the current field value as a String, or null if no value available
Overrides:
getText in class FSGrid


· setText

Summary  |  Top
   public void setText(int row, 
                       int col, 
                       String s) 

Set the value of the database field corresponding to a FSGrid cell as a String.

Parameter Description
row the grid row
col the grid col
s the value to set as a String



· datasetScrolled

Summary  |  Top
   public void datasetScrolled(DataScroller ds, 
                               int distance) 

Called by the DataScoller with the dataset cursor has been moved.

Implements:
datasetScrolled in interface DataListener


· removeBuffers

Summary  |  Top
   public void removeBuffers(int idx, 
                             int cnt) 

Called by the DataScoller to delete lines from the display.

Implements:
removeBuffers in interface BufferListener


· getRecordCount

Summary  |  Top
   public final int getRecordCount() 

Called by the DataScoller to discover the number of lines displayed.

Implements:
getRecordCount in interface BufferListener


· editingChanged

Summary  |  Top
   public void editingChanged(DataScroller ds) 

Called by the DataScoller when the editing mode changes.

Implements:
editingChanged in interface DataListener


· recordChanged

Summary  |  Top
   public void recordChanged(DataScroller d, 
                             Field f) 

Called by the DataScoller when a field in the record changes.

Parameter Description
d the DataScroller
f the field that changed, or null if all or unknown

Implements:
recordChanged in interface DataListener


· updateData

Summary  |  Top
   public void updateData(DataScroller ds) 

Called by the DataScoller to update the record from screen data.

Implements:
updateData in interface DataListener


· zeroBuf

Summary  |  Top
   public void zeroBuf() 

Mark the selected line as deleted.



· activeChanged

Summary  |  Top
   public void activeChanged(DataScroller ds) 

Called by the DataScoller when the Dataset is opened or closed.

Implements:
activeChanged in interface DataListener


· rdline

Summary  |  Top
   public void rdline()  throws IOException

Position the DataScroller to the selected line. Do not update the screen - the screen data is what we want to do something with in this case.



· processPfkey

Summary  |  Top
   public void processPfkey(PFKeyEvent e) 

Handle standard PFKEYs pressed when the cursor is in this table.

Overrides:
processPfkey in class FSComp


All Packages  This Package  Class Hierarchy  Class Search  Index
Freshly brewed Java API Documentation automatically generated with polardoc Version 1.0.7