public class FilePanelTableImp extends JPanel implements FilePanel, ComponentListener
FilePanelJFlatTable
, and handles
the necessary functionalities.JPanel.AccessibleJPanel
JComponent.AccessibleJComponent
Container.AccessibleAWTContainer
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
FilePanel.FileListViewMode
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor and Description |
---|
FilePanelTableImp(JUploadPanel juploadPanel,
UploadPolicy uploadPolicy)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
void |
addFiles(File[] filesToAdd)
Add multiple files to this panel.
|
void |
cleanHierarchy()
Removes empty folders in the TreeView hierarchy.
|
void |
clearSelection()
Clear the current selection in the JTable.
|
void |
componentHidden(ComponentEvent arg0)
Catches the hidden event on the JViewport.
|
void |
componentMoved(ComponentEvent arg0)
Catches the moved event on the JViewport.
|
void |
componentResized(ComponentEvent arg0)
When the size of the file list (actually the JViewport) changes, we adapt the size if the columns.
|
void |
componentShown(ComponentEvent arg0)
Catches the shown event on the JViewport.
|
void |
focusTable()
Requests focus for the JTable.
|
Component |
getDropComponent()
Return the component on which drop event can occur.
|
FileData |
getFileDataAt(Point point)
Ask for the file contained below the specific point on the screen.
|
FilePanel.FileListViewMode |
getFileListMode()
Set the view mode, for the file list.
|
List<FileData> |
getFiles()
Retrieve all currently stored files.
|
int |
getFilesLength()
Retrieve the number of file entries in the JTable.
|
void |
reload()
Force the reloading of the file structure, and the refreshing of the display
|
void |
remove(FileData fileData)
Removes all occurences of a file from the list.
|
void |
remove(FileData[] files)
Remove an array of files, typically an
UploadFilePacket . |
void |
removeAll()
Removes all file entries.
|
void |
removeFileNotToUpload()
Removes all files, which have the uploadFlag set to false.
|
void |
removeSelected()
Removes all currently selected file entries.
|
void |
setFileListViewMode(FilePanel.FileListViewMode fileListViewMode)
Set the view mode, for the file list.
|
void |
setGridBorderColor(Color color)
Set color of files list grid border.
|
void |
setTableHeaderBackColor(Color color)
Set back color of table header
|
void |
setTableHeaderFont(Font font)
Set table header text font
|
void |
setTableHeaderTextColor(Color color)
Set text color of table header
|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
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, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, 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
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, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
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, 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, transferFocusBackward, transferFocusUpCycle
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getActionMap, setTransferHandler
public FilePanelTableImp(JUploadPanel juploadPanel, UploadPolicy uploadPolicy)
juploadPanel
- The upload panel (parent).uploadPolicy
- The upload policy to apply.public FilePanel.FileListViewMode getFileListMode()
FilePanel
getFileListMode
in interface FilePanel
FilePanel.getFileListMode()
public void setFileListViewMode(FilePanel.FileListViewMode fileListViewMode)
FilePanel
setFileListViewMode
in interface FilePanel
fileListViewMode
- The view mode to set.FilePanel.setFileListViewMode(wjhk.jupload2.gui.filepanel.FilePanel.FileListViewMode)
public final void addFiles(File[] filesToAdd)
FilePanel
public final List<FileData> getFiles()
FilePanel
getFiles
in interface FilePanel
FilePanel.getFiles()
public final int getFilesLength()
FilePanel
getFilesLength
in interface FilePanel
FilePanel.getFilesLength()
public final void removeSelected()
FilePanel
removeSelected
in interface FilePanel
FilePanel.removeSelected()
public final void removeAll()
FilePanel
removeAll
in interface FilePanel
removeAll
in class Container
Container.removeAll()
public void remove(FileData[] files)
UploadFilePacket
.public void removeFileNotToUpload()
FilePanel
removeFileNotToUpload
in interface FilePanel
FilePanel.removeFileNotToUpload()
public final void remove(FileData fileData)
public final void clearSelection()
clearSelection
in interface FilePanel
public final void focusTable()
FilePanel
focusTable
in interface FilePanel
FilePanel.focusTable()
public FileData getFileDataAt(Point point)
FilePanel
getFileDataAt
in interface FilePanel
point
- The pointFilePanel.getFileDataAt(Point)
public Component getDropComponent()
JUploadPanel
, when initializing the
DropTarget.getDropComponent
in interface FilePanel
public void componentHidden(ComponentEvent arg0)
componentHidden
in interface ComponentListener
public void componentMoved(ComponentEvent arg0)
componentMoved
in interface ComponentListener
public void componentResized(ComponentEvent arg0)
componentResized
in interface ComponentListener
public void componentShown(ComponentEvent arg0)
componentShown
in interface ComponentListener
public void setGridBorderColor(Color color)
setGridBorderColor
in interface FilePanel
color
- awt Colorpublic void setTableHeaderBackColor(Color color)
setTableHeaderBackColor
in interface FilePanel
color
- awt Colorpublic void setTableHeaderFont(Font font)
setTableHeaderFont
in interface FilePanel
color
- awt Colorpublic void setTableHeaderTextColor(Color color)
setTableHeaderTextColor
in interface FilePanel
color
- awt Colorpublic void reload()
public void cleanHierarchy()
FilePanel.reload()
methodcleanHierarchy
in interface FilePanel
Copyright © 2015. All rights reserved.