|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.ac.ic.doc.automed.p2p.gui.graph.GShape
uk.ac.ic.doc.automed.p2p.gui.graph.GraphComponent
uk.ac.ic.doc.automed.p2p.gui.graph.TableComponent
public class TableComponent
Field Summary | |
---|---|
private java.lang.String |
caption
|
private java.util.Vector |
columns
|
private GTable.Header |
header
|
private java.util.Vector |
rows
|
Fields inherited from class uk.ac.ic.doc.automed.p2p.gui.graph.GraphComponent |
---|
atShape, grouped, prevPoint |
Fields inherited from class uk.ac.ic.doc.automed.p2p.gui.graph.GShape |
---|
altDrawer, altDrawing, AUTO_COUNT, bound, brPoint, centrePoint, changed, color, cshape, data, defBound, displayScript, displayShape, enabled, handler, highlighted, hshape, icon, id, label, lblPoint, movable, name, onClick, PREFIX_CTRL, PREFIX_HIL, props, refresh, selectable, tlPoint, type, visible, visibleOnHighlighted, ZEROX |
Constructor Summary | |
---|---|
TableComponent(java.lang.String label,
java.lang.String caption,
java.awt.Point atPoint,
java.awt.Dimension bound,
java.util.Vector headers,
java.util.Vector columnNodes,
java.util.Properties props)
|
Method Summary | |
---|---|
protected void |
addRow(java.util.Vector row,
java.awt.Graphics g)
Add a new row to the table |
void |
clear()
|
protected void |
doDraw(java.awt.Graphics g,
boolean drawOrRedraw)
Actually draw (redraw) table shapes and properly align them into their respective rows and columns |
protected void |
drawBefore(java.awt.Graphics g)
Drawings that are performed before the main drawing |
private void |
drawBorder(java.awt.Graphics g)
Draw the table border |
protected void |
drawMain(java.awt.Graphics g)
The main body of the drawing method |
GShape |
get(int rowIndex,
int colIndex)
|
GTable.Column |
getColumn(int i)
|
int |
getColumnCount()
|
GShape |
getColumnHeader(int colIndex)
|
java.util.Vector |
getColumnObjects(int i)
|
double |
getHeight()
|
GTable.Row |
getRow(int i)
|
int |
getRowCount()
|
java.util.Vector |
getRows()
|
java.util.Collection |
getShapes()
|
protected java.util.Collection |
getShapesForUpdate()
|
double |
getWidth()
|
protected boolean |
isEmpty()
|
boolean |
isWrapped()
Returns true if the table is to wrap its cells' texts |
void |
preDraw(java.awt.Graphics g)
Prepare nodes and edges for drawing, no actual drawings are performd at this stage. This method is to be invoked before this shape is drawn either for the first time or after it has been changed. |
void |
preDraw(java.awt.Graphics g,
boolean updateOnly)
When updateOnly is set to true, this method is only to make structural changes (e.g. |
protected void |
redrawBefore(java.awt.Graphics g)
|
protected void |
redrawMain(java.awt.Graphics g)
The main body of redraw |
protected void |
setData(java.util.Vector headers,
java.util.Vector columns,
java.awt.Graphics g)
Remove existing headers and columns and redraw table content this method is to be called only from within GraphViz package |
private double |
updateColumn(int ci,
double nwidth,
double dX,
double dY)
Update a column of the table when changes are applied to this column |
private double |
updateRow(GTable.Row row,
double rheight,
double dx,
double dY)
Update the height of a changed row and (optional) the delta-X, Y of the changes in the display coordinates of the shapes in that row |
Methods inherited from class uk.ac.ic.doc.automed.p2p.gui.graph.GraphComponent |
---|
addEdge, addNode, addNodes, contains, drawAfter, drawAt, drawBound, drawOverlay, drawTo, equals, getBaseCenterPoint, getBasePoint, getBooleanProperty, getBound, getEdges, getEdges, getEdgesArray, getIsGrouped, getNodes, getNodesArray, getNumericProperty, getProperty, getShapesArray, init, redraw, removeShape, setEdges, setEdgesArray, setIsChanged, setIsGrouped, setIsVisible, setNodes, setNodesArray, setUp, update, updateBound, updateControl, updateHighlighted |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private GTable.Header header
private java.util.Vector columns
private java.util.Vector rows
private java.lang.String caption
Constructor Detail |
---|
public TableComponent(java.lang.String label, java.lang.String caption, java.awt.Point atPoint, java.awt.Dimension bound, java.util.Vector headers, java.util.Vector columnNodes, java.util.Properties props)
Method Detail |
---|
public java.util.Collection getShapes()
getShapes
in class GraphComponent
protected java.util.Collection getShapesForUpdate()
getShapesForUpdate
in class GraphComponent
protected boolean isEmpty()
protected void drawMain(java.awt.Graphics g)
GraphComponent
drawMain
in class GraphComponent
protected void redrawMain(java.awt.Graphics g)
GraphComponent
redrawMain
in class GraphComponent
protected void doDraw(java.awt.Graphics g, boolean drawOrRedraw)
public boolean isWrapped()
public int getColumnCount()
public int getRowCount()
public GShape getColumnHeader(int colIndex)
public java.util.Vector getColumnObjects(int i)
public java.util.Vector getRows()
public GTable.Row getRow(int i)
public GTable.Column getColumn(int i)
public GShape get(int rowIndex, int colIndex)
protected void addRow(java.util.Vector row, java.awt.Graphics g)
row
- private double updateColumn(int ci, double nwidth, double dX, double dY)
ci
- private double updateRow(GTable.Row row, double rheight, double dx, double dY)
ri
- public double getHeight()
public double getWidth()
protected void setData(java.util.Vector headers, java.util.Vector columns, java.awt.Graphics g)
public void preDraw(java.awt.Graphics g)
GShape
preDraw
in class GShape
public void preDraw(java.awt.Graphics g, boolean updateOnly)
GShape
preDraw
in class GShape
protected void redrawBefore(java.awt.Graphics g)
redrawBefore
in class GShape
protected void drawBefore(java.awt.Graphics g)
GraphComponent
drawBefore
in class GraphComponent
private void drawBorder(java.awt.Graphics g)
g
- public void clear()
clear
in class GShape
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |