org.xnap.commons.gui.table
Class TableLayout
java.lang.Object
org.xnap.commons.gui.table.TableLayout
public class TableLayout
- extends Object
TODO update documentation
TODO squig don't make TableSorter a requirement, maybe have a general
table layout and a more specific SortableTableLayout subclass?
TableHeaderHandler class handles the mouse events invoked by clicking on the
header portion of the JTable.
TODO setter for maintain sort order
TODO call stopCellEditing() whenever neccessary
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TableLayout
public TableLayout(JTable table)
TableLayout
public TableLayout(JTable table,
TableSorter sorter)
addTableLayoutListener
public void addTableLayoutListener(TableLayoutListener l)
getColumnAt
public TableColumn getColumnAt(int index)
getColumnCount
public int getColumnCount()
getColumnIndex
public int getColumnIndex(String identifier)
getColumns
public Iterator<TableColumn> getColumns()
getMaintainSortOrder
public boolean getMaintainSortOrder()
getSortedColumn
public int getSortedColumn()
getTable
public JTable getTable()
getHeaderPopupMenu
public JPopupMenu getHeaderPopupMenu()
getVisibleColumnsCount
public int getVisibleColumnsCount()
isColumnVisible
public boolean isColumnVisible(int index)
getSortOrder
public SortableModel.Order getSortOrder()
removeTableLayoutListener
public void removeTableLayoutListener(TableLayoutListener l)
restoreSelections
public void restoreSelections()
setAllColumnsVisible
public void setAllColumnsVisible(boolean visible)
setColumnNames
public void setColumnNames(String[] columnNames)
setColumnName
public void setColumnName(int index,
String name)
setColumnProperties
public void setColumnProperties(int index,
String key)
setColumnProperties
public void setColumnProperties(int index,
String key,
int width)
setColumnVisible
public void setColumnVisible(int index,
boolean visible)
setColumnsVisible
public void setColumnsVisible(String[] columns)
setMaintainSortOrder
public void setMaintainSortOrder(boolean maintainSortOrder)
setTree
public void setTree(JTree jt)
showPopupMenu
public void showPopupMenu(MouseEvent e)
- Displays the popup menu.
sortByColumn
public void sortByColumn(int modelIndex,
SortableModel.Order sortOrder,
boolean revert)
storeSelections
public void storeSelections()
stopCellEditing
public void stopCellEditing()
Copyright © 2004-2007 XNap Commons Team. All Rights Reserved.