|
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JTable
org.ximtec.igesture.tool.view.devicemanager.BasicTable<T>
T - kind of object the table containspublic class BasicTable<T>
This class represents a table containing objects of type T.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.JTable |
|---|
JTable.AccessibleJTable, JTable.DropLocation, JTable.PrintMode |
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
JComponent.AccessibleJComponent |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary |
|---|
| Fields inherited from class javax.swing.JComponent |
|---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
| Fields inherited from class java.awt.Component |
|---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
BasicTable(String[] headers)
Constructor |
|
| Method Summary | |
|---|---|
void |
addItem(T item)
Add an item to the table |
void |
addItems(Set<T> items)
Add multiple items to the table. |
void |
addListSelectionListener(ListSelectionListener l)
Add a selection listener to the table. |
Collection<T> |
getItems()
Get all items in the table. |
T |
getSelectedItem()
Get the currently selected item. |
void |
removeAllItems()
Remove all items from the table. |
T |
removeItem()
Remove the currently selected item. |
void |
updateItem(Object value,
int col,
T item)
Update item in table. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public BasicTable(String[] headers)
headers - The column names, they should match with the field names of T.| Method Detail |
|---|
public void addItem(T item)
item - The item to add.public T getSelectedItem()
public T removeItem()
public void updateItem(Object value,
int col,
T item)
value - The new value.col - The column index in the table.item - The item to update, null if you do not want to update an item itself, only the table.public void removeAllItems()
public void addItems(Set<T> items)
items - The items to add.public Collection<T> getItems()
public void addListSelectionListener(ListSelectionListener l)
l - The listener.
|
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||