|
||||||||||
| 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.jurvis.swing.table.JvTable
org.jurvis.swing.table.JvObjectTable
public class JvObjectTable
A JTable in which each row corresponds to a single object. The
attributes are mapped to table columns and vice-versa via JvObjectTableRow. This table control allows objects to be dragged and
dropped within the table and between other components.
| Nested Class Summary | |
|---|---|
protected class |
JvObjectTable.LocalMouseListener
Class used to listen to mouse events within the JTable. |
| Nested classes/interfaces inherited from class javax.swing.JTable |
|---|
JTable.AccessibleJTable, 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.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary | |
|---|---|
protected boolean |
adjustingSelection
|
| 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 | |
|---|---|
JvObjectTable(JvObjectTableModel dataModel,
TableColumnModel columnModel)
Construct a JvObjectTable with the specified data and column
models. |
|
| Method Summary | |
|---|---|
void |
add(Object data,
DropTargetDropEvent e,
DataFlavor flavor)
Method called when an object is dropped on the table. |
protected void |
checkPopupTrigger(MouseEvent e)
Method called when a mousePressed or
mouseReleased event occurs. |
void |
columnMoved(TableColumnModelEvent e)
Method from the TablecolumnModelListener interface. |
MouseListener |
createMouseListener()
Create a MouseListener for listening to mouse events within
the JvObjectTable. |
ListSelectionListener |
createSelectionListener()
Create a ListSelectionListener for listening to selection
events within the JvObjectTable. |
MouseListener |
createTableHeaderListener()
Create a MouseListener for listening to mouse events within
the JTableHeader. |
void |
editRow(int row)
Edit the specified row. |
Object |
getActiveObject()
Return the active explorer object. |
Object |
getObjectAt(int row)
Return the domain object associated with the specified row. |
void |
setActiveObject(Object activeObject)
Set the active object in this details component. |
| Methods inherited from class org.jurvis.swing.table.JvTable |
|---|
addItem, copyItem, createDefaultColumnsFromModel, deleteItem, editItem, getComponent, getTable, isAddItemEnabled, isCopyItemEnabled, isDeleteItemEnabled, isEditItemEnabled, isPasteItemEnabled, pasteItem, processKeyBinding |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.jurvis.beans.JvJavaBean |
|---|
addPropertyChangeListener, removePropertyChangeListener |
| Field Detail |
|---|
protected boolean adjustingSelection
| Constructor Detail |
|---|
public JvObjectTable(JvObjectTableModel dataModel,
TableColumnModel columnModel)
JvObjectTable with the specified data and column
models.
dataModel - the JvObjectTableModel containing the table datacolumnModel - the TableColumnModeldescribing the columns| Method Detail |
|---|
public Object getObjectAt(int row)
row - the index of the desired row
public void add(Object data,
DropTargetDropEvent e,
DataFlavor flavor)
data - the data droppede - the drop eventflavor - the chosen flavor of the dropped dataprotected void checkPopupTrigger(MouseEvent e)
mousePressed or
mouseReleased event occurs. Currently a no-op, subclasses
should override this to provide popup menus.
e - the MouseEventpublic void editRow(int row)
row - the index of the row to editpublic MouseListener createMouseListener()
MouseListener for listening to mouse events within
the JvObjectTable.
MouseListenerpublic ListSelectionListener createSelectionListener()
ListSelectionListener for listening to selection
events within the JvObjectTable.
ListSelectionListenerpublic MouseListener createTableHeaderListener()
MouseListener for listening to mouse events within
the JTableHeader.
JvTableHeaderListenerpublic void setActiveObject(Object activeObject)
JvExplorer.
activeObject - the new active objectpublic final Object getActiveObject()
public void columnMoved(TableColumnModelEvent e)
This functionality was previously implemented in the
JvTableHeaderListener class. There were a few bugs related
with that implementation (like sort indicator changing without sorting
etc. That code was listening in on mouse press/release events and then
keeping track of the indicator when the columns moved.
columnMoved in interface TableColumnModelListenercolumnMoved in class JTablee - a TableColumnModelEvent reference.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||