Class marimba.gui.SparseTableContent
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class marimba.gui.SparseTableContent

java.lang.Object
   |
   +----marimba.gui.Widget
           |
           +----marimba.gui.ContainerWidget
                   |
                   +----marimba.gui.GroupWidget
                           |
                           +----marimba.gui.TableContent
                                   |
                                   +----marimba.gui.SparseTableContent

public class SparseTableContent
extends TableContent
Class displaying the content of a sparse TableWidget.
Version:
1.20, 01/12/97
Author:
Klaas Waslander
See Also:
SparseTableWidget

Variable Index

 o lastData
Store the last visible data when layout() was executed.
 o lastPaintData
Store the last visible data when paint() was executed.
 o lastPaintView
Store the last view when paint() was executed.
 o lastView
Store the last view when layout() was executed.

Constructor Index

 o SparseTableContent()

Method Index

 o findRow(Event)
Find the display index of the row in which the event took place.
 o flush()
Flush the cache which stores the last data and view, and remove all widgets from the content.
 o getData(int[], Vector[], int[])
Get data based for the specified old view, old data and new view.
 o getView()
Get the current view: the currently visible rows and columns.
 o layout()
Layout the sparse table content, the widgets in the content are being reshaped and added to show them correctly.
 o paint(Graphics)
Paint the sparse table content.
 o scroll(int, int)
When scrolling the sparse table content, also do a sparse layout.

Variables

 o lastView
  protected int lastView[]
Store the last view when layout() was executed. In this way layout() can be smart when it is called again: it only does a layout of the differences.
See Also:
lastData
 o lastData
  protected Vector lastData[]
Store the last visible data when layout() was executed.
See Also:
lastView
 o lastPaintView
  protected int lastPaintView[]
Store the last view when paint() was executed.
See Also:
lastPaintData
 o lastPaintData
  protected Vector lastPaintData[]
Store the last visible data when paint() was executed.
See Also:
lastPaintView

Constructors

 o SparseTableContent
  public SparseTableContent()

Methods

 o scroll
  public void scroll(int tx,
                     int ty)
When scrolling the sparse table content, also do a sparse layout.
Overrides:
scroll in class Widget
See Also:
lastView
 o flush
  public synchronized void flush()
Flush the cache which stores the last data and view, and remove all widgets from the content. After this the content is back in its initial state; it contains nothing.
 o getData
  protected Vector[] getData(int oldView[],
                             Vector oldData[],
                             int newView[])
Get data based for the specified old view, old data and new view. It calls getData of the sparse table widget with an area as small as possible and merges that with the old data.
 o layout
  public void layout()
Layout the sparse table content, the widgets in the content are being reshaped and added to show them correctly.
Overrides:
layout in class TableContent
 o getView
  public int[] getView()
Get the current view: the currently visible rows and columns. The integers returned represent the display index of each row and column. It returns -1 for lastCol or lastRow when no columns or rows are visible.
Returns:
an array with four integers: firstrow, lastrow, firstcol, lastcol.
 o paint
  public void paint(Graphics g)
Paint the sparse table content.
Overrides:
paint in class TableContent
 o findRow
  protected int findRow(Event evt)
Find the display index of the row in which the event took place. Returns -1 if no row is found.
Overrides:
findRow in class TableContent

All Packages  Class Hierarchy  This Package  Previous  Next  Index