|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component java.awt.Container javax.swing.JComponent javax.swing.JList com.alee.laf.list.WebList com.alee.extended.list.WebFileList
public class WebFileList
Special list component that simplifies files rendering.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JList |
---|
javax.swing.JList.AccessibleJList, javax.swing.JList.DropLocation |
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 | |
---|---|
protected java.io.File |
displayedDirectory
Displayed directory. |
protected java.io.FileFilter |
fileFilter
File filter. |
protected FileListViewType |
fileListViewType
File view mode. |
protected boolean |
generateThumbnails
Whether to generate image file thumbnails or not. |
protected int |
preferredColumnCount
Preferred visible column count. |
protected int |
preferredRowCount
Preferred visible row count. |
protected WebScrollPane |
scrollView
Scroll pane with fixed preferred size that fits file list settings. |
Fields inherited from class com.alee.laf.list.WebList |
---|
editable, editedCell, editListeners, listCellEditor, unselectable |
Fields inherited from class javax.swing.JList |
---|
HORIZONTAL_WRAP, VERTICAL, VERTICAL_WRAP |
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 | |
---|---|
WebFileList()
Constructs empty file list. |
|
WebFileList(java.io.File directory)
Constructs file list with files from the specified directory. |
|
WebFileList(java.io.File[] data)
Constructs file list with the specified files. |
|
WebFileList(java.util.List<java.io.File> data)
Constructs file list with the specified files. |
|
WebFileList(java.lang.String directoryPath)
Constructs file list with files from directory under the specified path. |
Method Summary | |
---|---|
protected ListCellEditor |
createDefaultCellEditor()
Returns default list cell editor for this list. |
WebScrollPane |
createScrollView()
Returns new scroll pane with fixed preferred size that fits file list settings. |
java.io.File |
getDisplayedDirectory()
Returns displayed directory. |
java.io.FileFilter |
getFileFilter()
Returns file filter. |
FileListModel |
getFileListModel()
Returns specific for WebFileList model. |
FileListViewType |
getFileListViewType()
Returns file view mode. |
int |
getPreferredColumnCount()
Returns preferred visible column count. |
int |
getPreferredRowCount()
Returns preferred visible row count. |
java.awt.Dimension |
getPreferredSize()
Returns preferred size for this list. |
WebScrollPane |
getScrollView()
Returns scroll pane with fixed preferred size that fits file list settings. |
java.io.File |
getSelectedFile()
Returns selected file. |
java.util.List<java.io.File> |
getSelectedFiles()
Returns list of selected files. |
WebFileListCellRenderer |
getWebFileListCellRenderer()
Returns specific for WebFileList renderer. |
protected void |
initializeDefaultSettings()
Initializes default file list settings. |
boolean |
isGenerateThumbnails()
Returns whether to generate image file thumbnails or not. |
void |
reloadFiles()
Reloads files from displayed directory. |
void |
repaint(FileElement element)
Repaints cell with specified element. |
void |
setDisplayedDirectory(java.io.File file)
Sets displayed directory. |
void |
setFileFilter(java.io.FileFilter fileFilter)
Sets file filter. |
void |
setFileListViewType(FileListViewType fileListViewType)
Sets file view mode. |
void |
setGenerateThumbnails(boolean generateThumbnails)
Sets whether to generate image file thumbnails or not. |
void |
setPreferredColumnCount(int preferredColumnCount)
Sets preferred visible column count. |
void |
setPreferredRowCount(int preferredRowCount)
Sets preferred visible row count. |
void |
setSelectedFile(java.io.File file)
Selects specified file if it presents in the list. |
void |
setSelectedFile(java.io.File file,
boolean shouldScroll)
Selects specified file if it presents in the list. |
void |
setSelectedFiles(java.util.Collection<java.io.File> files)
Selects specified files if they present in the list. |
Methods inherited from class javax.swing.JList |
---|
addListSelectionListener, addSelectionInterval, clearSelection, createSelectionModel, ensureIndexIsVisible, fireSelectionValueChanged, getAccessibleContext, getAnchorSelectionIndex, getCellBounds, getCellRenderer, getDragEnabled, getDropLocation, getDropMode, getFirstVisibleIndex, getFixedCellHeight, getFixedCellWidth, getLastVisibleIndex, getLayoutOrientation, getLeadSelectionIndex, getListSelectionListeners, getMaxSelectionIndex, getMinSelectionIndex, getModel, getNextMatch, getPreferredScrollableViewportSize, getPrototypeCellValue, getScrollableBlockIncrement, getScrollableTracksViewportHeight, getScrollableTracksViewportWidth, getScrollableUnitIncrement, getSelectedIndex, getSelectedIndices, getSelectedValue, getSelectedValues, getSelectionBackground, getSelectionForeground, getSelectionMode, getSelectionModel, getToolTipText, getUI, getUIClassID, getValueIsAdjusting, getVisibleRowCount, indexToLocation, isSelectedIndex, isSelectionEmpty, locationToIndex, paramString, removeListSelectionListener, removeSelectionInterval, setCellRenderer, setDragEnabled, setDropMode, setFixedCellHeight, setFixedCellWidth, setLayoutOrientation, setListData, setListData, setModel, setPrototypeCellValue, setSelectedIndex, setSelectedIndices, setSelectedValue, setSelectionBackground, setSelectionForeground, setSelectionInterval, setSelectionMode, setSelectionModel, setUI, setValueIsAdjusting, setVisibleRowCount |
Methods inherited from class javax.swing.JComponent |
---|
addAncestorListener, addNotify, 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, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, 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, doLayout, 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, toString, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected boolean generateThumbnails
protected int preferredColumnCount
protected int preferredRowCount
protected FileListViewType fileListViewType
protected java.io.FileFilter fileFilter
protected java.io.File displayedDirectory
protected WebScrollPane scrollView
Constructor Detail |
---|
public WebFileList()
public WebFileList(java.lang.String directoryPath)
directoryPath
- directory pathpublic WebFileList(java.io.File directory)
directory
- directorypublic WebFileList(java.io.File[] data)
data
- files arraypublic WebFileList(java.util.List<java.io.File> data)
data
- files listMethod Detail |
---|
protected void initializeDefaultSettings()
public WebFileListCellRenderer getWebFileListCellRenderer() throws java.lang.ClassCastException
java.lang.ClassCastException
public FileListModel getFileListModel() throws java.lang.ClassCastException
java.lang.ClassCastException
protected ListCellEditor createDefaultCellEditor()
createDefaultCellEditor
in class WebList
public void setPreferredColumnCount(int preferredColumnCount)
preferredColumnCount
- new preferred visible column countpublic int getPreferredColumnCount()
public int getPreferredRowCount()
public void setPreferredRowCount(int preferredRowCount)
preferredRowCount
- new preferred visible row countpublic boolean isGenerateThumbnails()
public void setGenerateThumbnails(boolean generateThumbnails)
generateThumbnails
- whether to generate image file thumbnails or notpublic FileListViewType getFileListViewType()
public void setFileListViewType(FileListViewType fileListViewType)
fileListViewType
- new file view modepublic java.io.FileFilter getFileFilter()
public void setFileFilter(java.io.FileFilter fileFilter)
fileFilter
- new file filterpublic void reloadFiles()
public java.io.File getDisplayedDirectory()
public void setDisplayedDirectory(java.io.File file)
file
- new displayed directorypublic java.util.List<java.io.File> getSelectedFiles()
public java.io.File getSelectedFile()
public void setSelectedFile(java.io.File file)
file
- file to selectpublic void setSelectedFile(java.io.File file, boolean shouldScroll)
file
- file to selectshouldScroll
- whether to scroll to selected file or notpublic void setSelectedFiles(java.util.Collection<java.io.File> files)
files
- files to selectpublic WebScrollPane getScrollView()
public WebScrollPane createScrollView()
public java.awt.Dimension getPreferredSize()
getPreferredSize
in interface SizeMethods<WebList>
getPreferredSize
in class WebList
public void repaint(FileElement element)
element
- element to process
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |