|
|||||||||
| 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
com.mucommander.ui.main.table.FileTable
public class FileTable
A heavily modified JTable which displays a folder's contents and allows file mouse and keyboard selection,
marking and navigation. JTable provides the basics for file selection but its behavior has to be
extended to allow file marking.
| Nested Class Summary | |
|---|---|
class |
FileTable.QuickSearch
This inner class enables quick search functionality on the FileTable, which allows to |
| Nested classes/interfaces inherited from class javax.swing.JTable |
|---|
javax.swing.JTable.AccessibleJTable, javax.swing.JTable.DropLocation, javax.swing.JTable.PrintMode |
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
javax.swing.JComponent.AccessibleJComponent |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
java.awt.Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
| Field Summary |
|---|
| Fields inherited from class javax.swing.JTable |
|---|
AUTO_RESIZE_ALL_COLUMNS, AUTO_RESIZE_LAST_COLUMN, AUTO_RESIZE_NEXT_COLUMN, AUTO_RESIZE_OFF, AUTO_RESIZE_SUBSEQUENT_COLUMNS, autoCreateColumnsFromModel, autoResizeMode, cellEditor, cellSelectionEnabled, columnModel, dataModel, defaultEditorsByColumnClass, defaultRenderersByColumnClass, editingColumn, editingRow, editorComp, gridColor, preferredViewportSize, rowHeight, rowMargin, rowSelectionAllowed, selectionBackground, selectionForeground, selectionModel, showHorizontalLines, showVerticalLines, tableHeader |
| 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 | |
|---|---|
FileTable(MainFrame mainFrame,
FolderPanel folderPanel,
FileTableConfiguration conf)
|
|
| Method Summary | |
|---|---|
void |
activePanelChanged(FolderPanel folderPanel)
This method is invoked when the currently active (i.e. |
void |
addTableSelectionListener(TableSelectionListener listener)
Adds the given TableSelectionListener to the list of listeners that are registered to receive notifications when the currently selected file changes. |
void |
changeSelection(int rowIndex,
int columnIndex,
boolean toggle,
boolean extend)
Overrides the changeSelection method from JTable to track the current selected row (the one that has focus) and fire a TableSelectionListener.selectedFileChanged(FileTable) event
to registered listeners. |
void |
colorChanged(ColorChangedEvent event)
Not used. |
void |
configurationChanged(ConfigurationEvent event)
Listens to certain configuration variables. |
void |
doLayout()
Overrides JTable's doLayout() method to use a custom column layout (if auto-column sizing is enabled). |
void |
editCurrentFilename()
Turns on the filename editor on current row. |
void |
fireMarkedFilesChangedEvent()
Notifies all registered listeners that the currently marked files have changed on this FileTable. |
void |
fireSelectedFileChangedEvent()
Notifies all registered listeners that the currently selected file has changed on this FileTable. |
void |
focusGained(java.awt.event.FocusEvent e)
Restores selection when focus is gained. |
void |
focusLost(java.awt.event.FocusEvent e)
Hides selection when focus is lost. |
void |
fontChanged(FontChangedEvent event)
Receives theme font changes notifications. |
boolean |
getAutoSizeColumnsEnabled()
Returns true if auto columns sizing is currently enabled. |
javax.swing.table.TableCellRenderer |
getCellRenderer(int row,
int column)
Method overriden to return a custom TableCellRenderer. |
int |
getColumnPosition(int colNum)
|
int |
getColumnWidth(int columnId)
|
FileTableConfiguration |
getConfiguration()
|
AbstractFile |
getCurrentFolder()
Returns the folder currently displayed by this FileTable. |
FileTableColumnModel |
getFileTableColumnModel()
Convenience method that returns this table's javax.swing.table.TableColumnModel cast as a
FileTableColumnModel. |
FileTableModel |
getFileTableModel()
Convenience method that returns this table's model (the one that JTable.getModel() returns),
as a FileTableModel, to avoid having to cast it. |
FolderPanel |
getFolderPanel()
Returns the FolderPanel that contains this FileTable. |
int |
getPageRowIncrement()
Returns the number of rows that a page down/page up action should jump, based on this FileTable's viewport size. |
java.awt.Dimension |
getPreferredScrollableViewportSize()
|
java.awt.Dimension |
getPreferredSize()
|
FileTable.QuickSearch |
getQuickSearch()
Returns the FileTable.QuickSearch inner class instance used by this FileTable. |
AbstractFile |
getSelectedFile()
Returns the file that is currently selected (highlighted), null if the parent folder '..' is
currently selected. |
AbstractFile |
getSelectedFile(boolean includeParentFolder)
Returns the file that is currently selected (highlighted). |
AbstractFile |
getSelectedFile(boolean includeParentFolder,
boolean returnCachedFile)
Returns the file that is currently selected (highlighted), wrapped in a CachedFile
instance if the corresponding parameter is true. |
FileSet |
getSelectedFiles()
Returns selected files in a FileSet. |
SortInfo |
getSortInfo()
Returns a SortInfo instance that holds information about how this table is currently sorted. |
boolean |
isActiveTable()
Returns true/ if this table is the active one in the MainFrame. |
boolean |
isAutoSizeColumnsEnabled()
Returns true if the auto-columns sizing is currently enabled. |
boolean |
isColumnDisplayable(int colNum)
Returns true if the given column can be displayed given the current folder. |
boolean |
isColumnEnabled(int colNum)
Returns true if the specified column is enabled. |
boolean |
isColumnVisible(int colNum)
Returns true if the specified column is currently visible. |
boolean |
isParentFolder(int row)
Returns true if the given row is the parent folder '..' . |
boolean |
isParentFolderSelected()
Returns true if the currently selected row/file is the parent folder '..' . |
void |
keyPressed(java.awt.event.KeyEvent e)
|
void |
keyReleased(java.awt.event.KeyEvent e)
|
void |
keyTyped(java.awt.event.KeyEvent e)
|
void |
markSelectedFile()
Marks or unmarks the current selected file (current row) and advance current row to the next one, with the following exceptions: if quick search is active, this method does nothing if '..' file is selected, file is not marked but current row is still advanced to the next one if the MarkSelectedFileAction key event is repeated and the last file has already
been marked/unmarked since the key was last released, the file is not marked in order to avoid
marked/unmarked flaps when the mark key is kept pressed. |
void |
mouseClicked(java.awt.event.MouseEvent e)
|
void |
mouseDragged(java.awt.event.MouseEvent e)
|
void |
mouseEntered(java.awt.event.MouseEvent e)
|
void |
mouseExited(java.awt.event.MouseEvent e)
|
void |
mouseMoved(java.awt.event.MouseEvent e)
|
void |
mousePressed(java.awt.event.MouseEvent e)
|
void |
mouseReleased(java.awt.event.MouseEvent e)
|
protected boolean |
processKeyBinding(javax.swing.KeyStroke ks,
java.awt.event.KeyEvent ke,
int condition,
boolean pressed)
Method overriden to consume keyboard events when quick search is active or when a row is being editing in order to prevent registered actions from being fired. |
void |
removeTableSelectionListener(TableSelectionListener listener)
Removes the given TableSelectionListener from the list of listeners that are registered to receive notifications when the currently selected file changes. |
void |
reverseSortOrder()
Reverses the current sort order, from ascending to descending or vice-versa. |
void |
selectFile(AbstractFile file)
Selects the given file, does nothing if this table does not contain the file. |
void |
selectRow(int row)
Makes the given row the currently selected one. |
void |
setAutoSizeColumnsEnabled(boolean enabled)
Enables/disables auto-columns sizing, which automatically resizes columns to fit the table's width. |
void |
setColumnEnabled(int colNum,
boolean enabled)
Enables/disables the specified column. |
void |
setColumnModel(javax.swing.table.TableColumnModel columnModel)
|
void |
setCurrentFolder(AbstractFile folder,
AbstractFile[] children)
Changes the current folder, preserving the current file selection if the folder hasn't changed. |
void |
setCurrentFolder(AbstractFile folder,
AbstractFile[] children,
AbstractFile select)
Changes the current folder, selecting the specified file if it can be found in the folder. |
void |
setFileMarked(AbstractFile file,
boolean marked)
Sets the given file as marked/unmarked in the table model, repaints the corresponding row to reflect the change, and notifies registered TableSelectionListener that currently marked files
have changed on this FileTable. |
void |
setFoldersFirst(boolean enabled)
Controls whether folders are displayed first in this FileTable or mixed with regular files. |
void |
setRangeMarked(int startRow,
int endRow,
boolean marked)
Marks or unmarks a range of rows, delimited by the provided start row index and end row index (inclusive). |
void |
setRowMarked(int row,
boolean marked)
Sets the given row as marked/unmarked in the table model, repaints the row to reflect the change, and notifies registered TableSelectionListener that the files currently marked
on this FileTable have changed. |
void |
sortBy(int criterion)
Sorts this FileTable by the given sort criterion. |
void |
sortBy(int criterion,
boolean ascending)
Sorts this FileTable by the given sort criterion and order. |
void |
sortBy(int criterion,
boolean ascending,
boolean foldersFirst)
Sorts this FileTable by the given sort criterion, order and 'folders first' value. |
void |
sortBy(SortInfo sortInfo)
Calls sortBy(int, boolean, boolean) with the sort information contained in the given SortInfo. |
java.lang.String |
toString()
Overridden for debugging purposes. |
void |
updateColumnsVisibility()
Updates the visibility of all columns based on their enabled state, and for conditional columns on the current folder. |
| Methods inherited from class javax.swing.JTable |
|---|
addColumn, addColumnSelectionInterval, addNotify, addRowSelectionInterval, clearSelection, columnAdded, columnAtPoint, columnMarginChanged, columnMoved, columnRemoved, columnSelectionChanged, configureEnclosingScrollPane, convertColumnIndexToModel, convertColumnIndexToView, convertRowIndexToModel, convertRowIndexToView, createDefaultColumnModel, createDefaultColumnsFromModel, createDefaultDataModel, createDefaultEditors, createDefaultRenderers, createDefaultSelectionModel, createDefaultTableHeader, createScrollPaneForTable, editCellAt, editCellAt, editingCanceled, editingStopped, getAccessibleContext, getAutoCreateColumnsFromModel, getAutoCreateRowSorter, getAutoResizeMode, getCellEditor, getCellEditor, getCellRect, getCellSelectionEnabled, getColumn, getColumnClass, getColumnCount, getColumnModel, getColumnName, getColumnSelectionAllowed, getDefaultEditor, getDefaultRenderer, getDragEnabled, getDropLocation, getDropMode, getEditingColumn, getEditingRow, getEditorComponent, getFillsViewportHeight, getGridColor, getIntercellSpacing, getModel, getPrintable, getRowCount, getRowHeight, getRowHeight, getRowMargin, getRowSelectionAllowed, getRowSorter, getScrollableBlockIncrement, getScrollableTracksViewportHeight, getScrollableTracksViewportWidth, getScrollableUnitIncrement, getSelectedColumn, getSelectedColumnCount, getSelectedColumns, getSelectedRow, getSelectedRowCount, getSelectedRows, getSelectionBackground, getSelectionForeground, getSelectionModel, getShowHorizontalLines, getShowVerticalLines, getSurrendersFocusOnKeystroke, getTableHeader, getToolTipText, getUI, getUIClassID, getUpdateSelectionOnSort, getValueAt, initializeLocalVars, isCellEditable, isCellSelected, isColumnSelected, isEditing, isRowSelected, moveColumn, paramString, prepareEditor, prepareRenderer, print, print, print, print, print, removeColumn, removeColumnSelectionInterval, removeEditor, removeNotify, removeRowSelectionInterval, resizeAndRepaint, rowAtPoint, selectAll, setAutoCreateColumnsFromModel, setAutoCreateRowSorter, setAutoResizeMode, setCellEditor, setCellSelectionEnabled, setColumnSelectionAllowed, setColumnSelectionInterval, setDefaultEditor, setDefaultRenderer, setDragEnabled, setDropMode, setEditingColumn, setEditingRow, setFillsViewportHeight, setGridColor, setIntercellSpacing, setModel, setPreferredScrollableViewportSize, setRowHeight, setRowHeight, setRowMargin, setRowSelectionAllowed, setRowSelectionInterval, setRowSorter, setSelectionBackground, setSelectionForeground, setSelectionMode, setSelectionModel, setShowGrid, setShowHorizontalLines, setShowVerticalLines, setSurrendersFocusOnKeystroke, setTableHeader, setUI, setUpdateSelectionOnSort, setValueAt, sizeColumnsToFit, sizeColumnsToFit, sorterChanged, tableChanged, unconfigureEnclosingScrollPane, updateUI, valueChanged |
| Methods inherited from class javax.swing.JComponent |
|---|
addAncestorListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
| Methods inherited from class java.awt.Container |
|---|
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree |
| Methods inherited from class java.awt.Component |
|---|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, transferFocus, transferFocusUpCycle |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public FileTable(MainFrame mainFrame,
FolderPanel folderPanel,
FileTableConfiguration conf)
| Method Detail |
|---|
public FolderPanel getFolderPanel()
FolderPanel that contains this FileTable.
public boolean isActiveTable()
true/ if this table is the active one in the MainFrame.
Being the active table doesn't necessarily mean that it currently has focus, the focus can be in some other component
of the active FolderPanel, or nowhere in the MainFrame if the window is not in the foreground.
Use Component.hasFocus() to test if the table currently has focus.
MainFrame.getActiveTable()public FileTableModel getFileTableModel()
JTable.getModel() returns),
as a FileTableModel, to avoid having to cast it.
public SortInfo getSortInfo()
SortInfo instance that holds information about how this table is currently sorted.
public FileTable.QuickSearch getQuickSearch()
FileTable.QuickSearch inner class instance used by this FileTable.
public AbstractFile getSelectedFile()
null if the parent folder '..' is
currently selected.
public AbstractFile getSelectedFile(boolean includeParentFolder)
true.
includeParentFolder - if true and parent folder '..' is currently selected, the parent folder
will be returned.
public AbstractFile getSelectedFile(boolean includeParentFolder,
boolean returnCachedFile)
CachedFile
instance if the corresponding parameter is true. If the currently selected file is the
parent folder '..', the parent folder is returned only if the corresponding parameter is true.
includeParentFolder - if true and the parent folder '..' is currently selected, the parent folder file
will be returned. If false, null will be returned if the parent folder file is currently selected.returnCachedFile - if true, a CachedFile corresponding to the currently selected file will be returned
public FileSet getSelectedFiles()
FileSet. Selected files are either the marked files or the currently selected
file if no file is currently marked. The parent folder '..' is never included in the returned set.
public boolean isParentFolderSelected()
true if the currently selected row/file is the parent folder '..' .
public boolean isParentFolder(int row)
true if the given row is the parent folder '..' .
row - index of the row to test
public AbstractFile getCurrentFolder()
public void setCurrentFolder(AbstractFile folder,
AbstractFile[] children)
folder - the new folderchildren - child files of the new folder
public void setCurrentFolder(AbstractFile folder,
AbstractFile[] children,
AbstractFile select)
folder - the new folderchildren - child files of the new folderselect - the file to select (highlight), can be null.public boolean isAutoSizeColumnsEnabled()
true if the auto-columns sizing is currently enabled.
public void setAutoSizeColumnsEnabled(boolean enabled)
enabled - true to enable auto-columns sizing, false to disable itpublic boolean getAutoSizeColumnsEnabled()
true if auto columns sizing is currently enabled.
public void setFoldersFirst(boolean enabled)
enabled - if true, folders are displayed before regular files. If false, files are mixed with directories.public void selectFile(AbstractFile file)
file - the file to selectpublic void selectRow(int row)
row - index of the row to select
public void setRowMarked(int row,
boolean marked)
TableSelectionListener that the files currently marked
on this FileTable have changed.
This method has no effect if the row corresponds to the parent folder row '..' .
row - index of the row to selectmarked - true to mark the row, false to unmark it
public void setFileMarked(AbstractFile file,
boolean marked)
TableSelectionListener that currently marked files
have changed on this FileTable.
file - file to selectmarked - true to mark the file, false to unmark itpublic void markSelectedFile()
MarkSelectedFileAction key event is repeated and the last file has already
been marked/unmarked since the key was last released, the file is not marked in order to avoid
marked/unmarked flaps when the mark key is kept pressed.
MarkSelectedFileAction
public void setRangeMarked(int startRow,
int endRow,
boolean marked)
startRow - index of the first row to repaintendRow - index of the last row to mark, can be lower, greater or equals to startRowmarked - if true, the rows will be marked, unmarked otherwisepublic int getPageRowIncrement()
public void sortBy(int criterion,
boolean ascending,
boolean foldersFirst)
criterion - the sort criterion, see Columns for allowed valuesascending - true for ascending order, false for descending orderfoldersFirst - if true, folders are displayed before regular files. If false, files are mixed with directories.public void sortBy(SortInfo sortInfo)
sortBy(int, boolean, boolean) with the sort information contained in the given SortInfo.
sortInfo - the information to use to sort this table.
public void sortBy(int criterion,
boolean ascending)
criterion - the sort criterion, see Columns for allowed valuesascending - true for ascending order, false for descending orderpublic void sortBy(int criterion)
criterion - the sort criterion, see Columns for allowed valuespublic FileTableColumnModel getFileTableColumnModel()
javax.swing.table.TableColumnModel cast as a
FileTableColumnModel.
public void setColumnModel(javax.swing.table.TableColumnModel columnModel)
setColumnModel in class javax.swing.JTablepublic boolean isColumnVisible(int colNum)
true if the specified column is currently visible.
colNum - column index, see Columns for allowed values
public boolean isColumnDisplayable(int colNum)
true if the given column can be displayed given the current folder. Certain columns such as
Columns.OWNER and Columns.GROUP can be displayed only if the current folder can supply this
information for the files it contains.
Note that the return value does not take into account the column's current enabled state.
colNum - column index, see Columns for allowed values
public void updateColumnsVisibility()
public boolean isColumnEnabled(int colNum)
true if the specified column is enabled.
colNum - column index, see Columns for allowed values
public void setColumnEnabled(int colNum,
boolean enabled)
isColumnDisplayable(int) for more information about
this.
If the current sort criterion corresponds to the specified column and this
column is disabled, the sort criterion will be reset to Columns.NAME to prevent the table from being
sorted by an invisible column/criterion.
colNum - identifier of the column which should be enabled or disabled, see Columns for allowed valuesenabled - true to enable the column, false to disable it.public int getColumnPosition(int colNum)
public void reverseSortOrder()
public void editCurrentFilename()
public void addTableSelectionListener(TableSelectionListener listener)
listener - the TableSelectionListener instance to add to the list of registered listeners.public void removeTableSelectionListener(TableSelectionListener listener)
listener - the TableSelectionListener instance to add to the list of registered listeners.public void fireSelectedFileChangedEvent()
public void fireMarkedFilesChangedEvent()
public void doLayout()
doLayout in class javax.swing.JTable
public javax.swing.table.TableCellRenderer getCellRenderer(int row,
int column)
getCellRenderer in class javax.swing.JTable
protected boolean processKeyBinding(javax.swing.KeyStroke ks,
java.awt.event.KeyEvent ke,
int condition,
boolean pressed)
processKeyBinding in class javax.swing.JTable
public void changeSelection(int rowIndex,
int columnIndex,
boolean toggle,
boolean extend)
TableSelectionListener.selectedFileChanged(FileTable) event
to registered listeners.
changeSelection in class javax.swing.JTablepublic java.awt.Dimension getPreferredSize()
getPreferredSize in class javax.swing.JComponentpublic java.awt.Dimension getPreferredScrollableViewportSize()
getPreferredScrollableViewportSize in interface javax.swing.ScrollablegetPreferredScrollableViewportSize in class javax.swing.JTablepublic java.lang.String toString()
toString in class java.awt.Componentpublic void mouseClicked(java.awt.event.MouseEvent e)
mouseClicked in interface java.awt.event.MouseListenerpublic void mouseEntered(java.awt.event.MouseEvent e)
mouseEntered in interface java.awt.event.MouseListenerpublic void mouseExited(java.awt.event.MouseEvent e)
mouseExited in interface java.awt.event.MouseListenerpublic void mousePressed(java.awt.event.MouseEvent e)
mousePressed in interface java.awt.event.MouseListenerpublic void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased in interface java.awt.event.MouseListenerpublic void mouseDragged(java.awt.event.MouseEvent e)
mouseDragged in interface java.awt.event.MouseMotionListenerpublic void mouseMoved(java.awt.event.MouseEvent e)
mouseMoved in interface java.awt.event.MouseMotionListenerpublic void keyPressed(java.awt.event.KeyEvent e)
keyPressed in interface java.awt.event.KeyListenerpublic void keyTyped(java.awt.event.KeyEvent e)
keyTyped in interface java.awt.event.KeyListenerpublic void keyReleased(java.awt.event.KeyEvent e)
keyReleased in interface java.awt.event.KeyListenerpublic void focusGained(java.awt.event.FocusEvent e)
focusGained in interface java.awt.event.FocusListenerpublic void focusLost(java.awt.event.FocusEvent e)
focusLost in interface java.awt.event.FocusListenerpublic void activePanelChanged(FolderPanel folderPanel)
ActivePanelListener
activePanelChanged in interface ActivePanelListenerfolderPanel - the new active FolderPanel.public void configurationChanged(ConfigurationEvent event)
configurationChanged in interface ConfigurationListenerevent - describes the configuration modification.public void colorChanged(ColorChangedEvent event)
colorChanged in interface ThemeListenerpublic void fontChanged(FontChangedEvent event)
fontChanged in interface ThemeListenerpublic FileTableConfiguration getConfiguration()
public int getColumnWidth(int columnId)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
This file is part of muCommander - Copyright (C) 2002-2008 Maxence Bernard