|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfeud.testgame.gui.GUIComponent
feud.testgame.gui.Table
A simple table component with no borders, no resizing, no nothing...just data organized in rows and columns.
Field Summary |
Fields inherited from class feud.testgame.gui.GUIComponent |
visible |
Constructor Summary | |
Table(java.lang.String name,
int rows,
int cols,
int xs,
int ys,
int xe,
int ye)
Create a new table. |
Method Summary | |
void |
clear()
Clears the table. |
void |
draw(com.threed.jpct.FrameBuffer buffer)
Draws this component and all of its childs. |
boolean |
evaluateInput(MouseMapper mouse,
com.threed.jpct.util.KeyMapper keyMapper)
Processes key and mouse events in the context of this component. |
java.lang.Object |
getCell(int row,
int col)
Gets the content object of a cell. |
void |
insertCell(int row,
int col,
java.lang.Object content)
Inserts a cell by inserting a row at the given position. |
void |
setCell(int row,
int col,
java.lang.Object content)
Sets the content object of a cell. |
void |
setColumnSize(int col,
int size)
Sets the width of a column. |
void |
setListener(GUIListener bl)
Sets a listener that will be informed of clicks into a cell. |
void |
setRowSize(int row,
int size)
Sets the height of a row. |
Methods inherited from class feud.testgame.gui.GUIComponent |
add, getParent, getParentX, getParentY, getX, getY, isVisible, setVisible, setX, setY |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Table(java.lang.String name, int rows, int cols, int xs, int ys, int xe, int ye)
name
- the name of the table (not displayed)rows
- the number of rowscols
- the number of columnsxs
- x-value of the upper left cornerys
- y-value of the upper left cornerxe
- x-value of the lower right cornerye
- y-value of the lower right cornerMethod Detail |
public void setCell(int row, int col, java.lang.Object content)
row
- the row of the cellcol
- the column of the cellcontent
- the cell's contentpublic java.lang.Object getCell(int row, int col)
row
- the row of the cellcol
- the column of the cell
public void insertCell(int row, int col, java.lang.Object content)
row
- the row of the cellcol
- the column of the cellcontent
- the new cell's contentpublic void setRowSize(int row, int size)
row
- the rowsize
- the new heightpublic void setColumnSize(int col, int size)
col
- the columnsize
- the new widthpublic void clear()
public void setListener(GUIListener bl)
bl
- the GUIListenerpublic boolean evaluateInput(MouseMapper mouse, com.threed.jpct.util.KeyMapper keyMapper)
GUIComponent
evaluateInput
in class GUIComponent
mouse
- the MouseMapper used to process mouse eventskeyMapper
- the KeyMapper used to process key events
public void draw(com.threed.jpct.FrameBuffer buffer)
GUIComponent
draw
in class GUIComponent
buffer
- the FrameBuffer on which to draw to
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |