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
-
lastData
- Store the last visible data when layout() was executed.
-
lastPaintData
- Store the last visible data when paint() was executed.
-
lastPaintView
- Store the last view when paint() was executed.
-
lastView
- Store the last view when layout() was executed.
-
SparseTableContent()
-
-
findRow(Event)
- Find the display index of the row in which
the event took place.
-
flush()
- Flush the cache which stores the last data and view,
and remove all widgets from the content.
-
getData(int[], Vector[], int[])
- Get data based for the specified old view, old data and new view.
-
getView()
- Get the current view: the currently visible rows and columns.
-
layout()
- Layout the sparse table content, the widgets in the
content are being reshaped and added to show them
correctly.
-
paint(Graphics)
- Paint the sparse table content.
-
scroll(int, int)
- When scrolling the sparse table content, also do a
sparse layout.
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
lastData
protected Vector lastData[]
- Store the last visible data when layout() was executed.
- See Also:
- lastView
lastPaintView
protected int lastPaintView[]
- Store the last view when paint() was executed.
- See Also:
- lastPaintData
lastPaintData
protected Vector lastPaintData[]
- Store the last visible data when paint() was executed.
- See Also:
- lastPaintView
SparseTableContent
public SparseTableContent()
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
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.
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.
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
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.
paint
public void paint(Graphics g)
- Paint the sparse table content.
- Overrides:
- paint in class TableContent
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