de.matthiasmann.twl
Class FileTable

java.lang.Object
  extended by de.matthiasmann.twl.Widget
      extended by de.matthiasmann.twl.TableBase
          extended by de.matthiasmann.twl.Table
              extended by de.matthiasmann.twl.FileTable
All Implemented Interfaces:
ScrollPane.AutoScrollable, ScrollPane.CustomPageSize, ScrollPane.Scrollable

public class FileTable
extends Table

A table showing the content of a folder. Uses FileSystemModel. Supports sorting and filtering.


Nested Class Summary
static interface FileTable.Callback
           
static class FileTable.Entry
           
static class FileTable.SortColumn
           
 
Nested classes/interfaces inherited from class de.matthiasmann.twl.TableBase
TableBase.CellRenderer, TableBase.CellWidgetCreator, TableBase.ColumnHeader, TableBase.ColumnSizeSequence, TableBase.DragListener, TableBase.KeyboardSearchHandler, TableBase.StringCellRenderer
 
Nested classes/interfaces inherited from class de.matthiasmann.twl.Widget
Widget.OffscreenMouseAdjustments, Widget.RenderOffscreen
 
Field Summary
 
Fields inherited from class de.matthiasmann.twl.TableBase
autoSizeAllRows, callbacks, cellRenderers, columnDefaultCellRenderer, columnDividerDragableDistance, columnHeaderHeight, columnHeaderModel, columnHeaders, columnModel, columnResizeCursor, defaultColumnWidth, DRAG_COLUMN_HEADER, DRAG_IGNORE, DRAG_INACTIVE, DRAG_USER, dragActive, dragColumn, dragCursor, dragListener, dragNotPossibleCursor, dragStartColWidth, dragStartSumWidth, dragStartX, dropMarkerBeforeRow, dropMarkerRow, ensureColumnHeaderMinWidth, firstRowPartialVisible, firstVisibleColumn, firstVisibleRow, hasCellWidgetCreators, imageColumnDivider, imageRowBackground, imageRowDropMarker, imageRowOverlay, keyboardSearchHandler, LAST_MOUSE_Y_OUTSIDE, lastMouseColumn, lastMouseRow, lastMouseY, lastRowPartialVisible, lastVisibleColumn, lastVisibleRow, normalCursor, numColumns, numRows, rowHeight, rowModel, scrollPosX, scrollPosY, selectionManager, STATE_FIRST_COLUMNHEADER, STATE_LAST_COLUMNHEADER, STATE_LEAD_ROW, STATE_ROW_DROPTARGET, STATE_ROW_HOVER, STATE_ROW_ODD, STATE_ROW_SELECTED, STATE_SELECTED, STATE_SORT_ASCENDING, STATE_SORT_DESCENDING, tableBaseThemeInfo, updateAllCellWidgets, updateAllColumnWidth, widgetGrid
 
Fields inherited from class de.matthiasmann.twl.Widget
STATE_DISABLED, STATE_HAS_FOCUSED_CHILD, STATE_HAS_OPEN_POPUPS, STATE_KEYBOARD_FOCUS
 
Constructor Summary
FileTable()
           
 
Method Summary
 void addCallback(FileTable.Callback callback)
           
 void clearSelection()
           
protected  void columnHeaderClicked(int column)
           
 boolean getAllowMultiSelection()
           
 java.lang.Object getCurrentFolder()
           
 FileSystemModel.FileFilter getFileFilter()
           
 FileSystemModel getFileSystemModel()
           
 FileTable.Entry[] getSelection()
           
 boolean getShowFolders()
           
 boolean getShowHidden()
           
 boolean isRoot()
           
 void refreshFileTable()
           
 void removeCallback(FileTable.Callback callback)
           
protected  void selectionChanged()
           
 void setAllowMultiSelection(boolean allowMultiSelection)
           
 void setCurrentFolder(FileSystemModel fsm, java.lang.Object folder)
           
 void setFileFilter(FileSystemModel.FileFilter filter)
           
 void setSelection(java.lang.Object... files)
           
 boolean setSelection(java.lang.Object file)
           
 void setShowFolders(boolean showFolders)
           
 void setShowHidden(boolean showHidden)
           
protected  void setSortArrows()
           
 void setSortColumn(FileTable.SortColumn column)
           
 void setSortOrder(SortOrder order)
           
protected  void sortingChanged()
           
protected  void updateColumnHeaderNumbers()
           
 
Methods inherited from class de.matthiasmann.twl.Table
getCellData, getModel, getNodeFromRow, getTooltipContentFromRow, setModel
 
Methods inherited from class de.matthiasmann.twl.TableBase
addCallback, adjustScrollPosition, applyCellRendererTheme, applyTheme, applyThemeMouseCursor, applyThemeTableBase, autoSizeAllRows, autoSizeRow, cancelDragging, checkColumnIndex, checkColumnRange, checkRowIndex, checkRowRange, childAdded, childRemoved, clampColumnWidth, clearDropMarker, computePreferredColumnWidth, computeRowHeight, createColumnHeader, getAutoScrollDirection, getCellRenderer, getCellRenderer, getCellRendererNoDefault, getColumnDefaultCellRenderer, getColumnEndPosition, getColumnFromPosition, getColumnHeaderAnimationState, getColumnMPM, getColumnSeparatorUnderMouse, getColumnStartPosition, getColumnUnderMouse, getColumnWidth, getDefaultCellRenderer, getDragListener, getDropMarkerRow, getKeyboardSearchHandler, getMinHeight, getMouseCursor, getNumColumns, getNumRows, getNumVisibleRows, getOffsetX, getOffsetY, getPageSizeX, getPageSizeY, getPreferredInnerHeight, getPreferredInnerWidth, getRowEndPosition, getRowFromPosition, getRowHeight, getRowStartPosition, getRowUnderMouse, getSelectionManager, getTooltipContentAt, handleDragEvent, handleEvent, handleKeyStrokeAction, handleMouseEvent, insertCellRenderer, isCellSelected, isDropMarkerBeforeRow, isFixedWidthMode, isMouseInColumnHeader, isRowSelected, isVariableRowHeight, layout, modelAllChanged, modelCellChanged, modelColumnHeaderChanged, modelColumnsDeleted, modelColumnsInserted, modelRowChanged, modelRowsChanged, modelRowsDeleted, modelRowsInserted, paintWidget, positionChanged, registerCellRenderer, removeAllCellWidgets, removeAllChildren, removeCallback, removeCellWidget, scrollToRow, setColumnDefaultCellRenderer, setColumnSortOrderAnimationState, setColumnWidth, setDefaultSelectionManager, setDragListener, setDropMarker, setDropMarker, setKeyboardSearchHandler, setScrollPosition, setSelectionManager, setVaribleRowHeight, sizeChanged, updateAll, updateAllCellWidgets, updateAllColumnWidth, updateCellWidget, updateColumnHeader
 
Methods inherited from class de.matthiasmann.twl.Widget
add, addActionMapping, addPropertyChangeListener, addPropertyChangeListener, adjustSize, afterAddToGUI, allChildrenRemoved, applyThemeBackground, applyThemeBorder, applyThemeInputMap, applyThemeMaxSize, applyThemeMinSize, applyThemeOffscreenExtra, applyThemeOverlay, applyThemeTooltip, beforeRemoveFromGUI, borderChanged, canAcceptKeyboardFocus, childInvalidateLayout, childVisibilityChanged, computeSize, destroy, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, focusFirstChild, focusLastChild, focusNextChild, focusPrevChild, getActionMap, getAnimationState, getBackground, getBorderBottom, getBorderHorizontal, getBorderLeft, getBorderRight, getBorderTop, getBorderVertical, getBottom, getChild, getChildAt, getChildIndex, getGUI, getHeight, getInnerBottom, getInnerHeight, getInnerRight, getInnerWidth, getInnerX, getInnerY, getInputMap, getKeyboardFocusOrder, getMaxHeight, getMaxWidth, getMinWidth, getMouseCursor, getNumChildren, getOffscreenExtraBottom, getOffscreenExtraLeft, getOffscreenExtraRight, getOffscreenExtraTop, getOrCreateActionMap, getOverlay, getParent, getPreferredHeight, getPreferredWidth, getRenderOffscreen, getRight, getRootWidget, getTheme, getThemePath, getThemeTooltipContent, getTintAnimator, getTooltipContent, getWidgetAt, getWidth, getX, getY, giveupKeyboardFocus, hasKeyboardFocus, hasOpenPopups, hasSharedAnimationState, insertChild, invalidateLayout, invalidateLayoutLocally, isAbsoluteTheme, isClip, isDepthFocusTraversal, isEnabled, isFocusKeyEnabled, isInside, isLocallyEnabled, isMouseInside, isVisible, keyboardFocusChildChanged, keyboardFocusGained, keyboardFocusGained, keyboardFocusLost, layoutChildFullInnerArea, layoutChildrenFullInnerArea, moveChild, paint, paintBackground, paintChild, paintChildren, paintDragOverlay, paintOverlay, reapplyTheme, removeChild, removeChild, removePropertyChangeListener, removePropertyChangeListener, requestKeyboardFocus, requestKeyboardFocus, resetTooltip, setActionMap, setBackground, setBorderSize, setBorderSize, setBorderSize, setBorderSize, setCanAcceptKeyboardFocus, setClip, setDepthFocusTraversal, setEnabled, setFocusKeyEnabled, setInnerSize, setInputMap, setMaxSize, setMinSize, setMouseCursor, setOffscreenExtra, setOffscreenExtra, setOverlay, setPosition, setRenderOffscreen, setSize, setTheme, setTintAnimator, setTooltipContent, setVisible, updateTintAnimation, updateTooltip, validateLayout, widgetDisabled
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileTable

public FileTable()
Method Detail

addCallback

public void addCallback(FileTable.Callback callback)

removeCallback

public void removeCallback(FileTable.Callback callback)

getShowFolders

public boolean getShowFolders()

setShowFolders

public void setShowFolders(boolean showFolders)

getShowHidden

public boolean getShowHidden()

setShowHidden

public void setShowHidden(boolean showHidden)

setFileFilter

public void setFileFilter(FileSystemModel.FileFilter filter)

getFileFilter

public FileSystemModel.FileFilter getFileFilter()

getSelection

public FileTable.Entry[] getSelection()

setSelection

public void setSelection(java.lang.Object... files)

setSelection

public boolean setSelection(java.lang.Object file)

clearSelection

public void clearSelection()

setSortColumn

public void setSortColumn(FileTable.SortColumn column)

setSortOrder

public void setSortOrder(SortOrder order)

getAllowMultiSelection

public boolean getAllowMultiSelection()

setAllowMultiSelection

public void setAllowMultiSelection(boolean allowMultiSelection)

getFileSystemModel

public FileSystemModel getFileSystemModel()

getCurrentFolder

public final java.lang.Object getCurrentFolder()

isRoot

public final boolean isRoot()

setCurrentFolder

public void setCurrentFolder(FileSystemModel fsm,
                             java.lang.Object folder)

refreshFileTable

public void refreshFileTable()

selectionChanged

protected void selectionChanged()

sortingChanged

protected void sortingChanged()

columnHeaderClicked

protected void columnHeaderClicked(int column)
Overrides:
columnHeaderClicked in class TableBase

updateColumnHeaderNumbers

protected void updateColumnHeaderNumbers()
Overrides:
updateColumnHeaderNumbers in class TableBase

setSortArrows

protected void setSortArrows()