de.fh_mannheim.mm.dms.indexserver.gui.components
Class FileListBox

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjavax.swing.JComponent
              extended byjavax.swing.JList
                  extended byde.fh_mannheim.mm.dms.indexserver.gui.components.FileListBox
All Implemented Interfaces:
javax.accessibility.Accessible, DefaultListBox, java.awt.image.ImageObserver, java.awt.MenuContainer, javax.swing.Scrollable, java.io.Serializable

public class FileListBox
extends javax.swing.JList
implements DefaultListBox

This is a special listbox, used to select a file.

Version:
$Revision: 1.14 $
Author:
Jan Löffler, mail@jlsoft.de
See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Field Summary
static int ALLFILES
          Public declarations
static int SCHEDULEDFILES
           
static int SEARCHEDFILES
           
static int STATICFILES
           
 
Fields inherited from class javax.swing.JList
HORIZONTAL_WRAP, VERTICAL, VERTICAL_WRAP
 
Fields inherited from class javax.swing.JComponent
TOOL_TIP_TEXT_KEY, 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
FileListBox(java.util.ArrayList aFilenames)
          This constructor initializes this listbox by filling it with all possible files given in a vector.
FileListBox(int nMode)
          This constructor initializes this listbox by filling it with all possible files.
FileListBox(java.lang.String strFilename, int nMode)
          This constructor initializes this listbox by filling it with all possible uploads.
 
Method Summary
 void clearList()
          Clear listbox.
 int getItemCount()
          Get number of filenames.
 java.lang.String getSelectedFile()
          Get current filename selection.
 void populate()
          Populating listbox.
 void searchFiles(Query query)
          Call this to search in documents.
 void setMode(int nMode)
          Call this to select a mode.
 void setSelectedFile(java.lang.String strFilename)
          Call this to select a file.
 void updateList()
          Call this to update uploadlist.
 void updateList(java.util.ArrayList aFilenames)
          Call this to update uploadlist with a given list.
 void updateList(java.lang.String strFilename)
          Call this to update uploadlist.
 
Methods inherited from class javax.swing.JList
addListSelectionListener, addSelectionInterval, clearSelection, ensureIndexIsVisible, getAccessibleContext, getAnchorSelectionIndex, getCellBounds, getCellRenderer, getDragEnabled, 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, removeListSelectionListener, removeSelectionInterval, setCellRenderer, setDragEnabled, setFixedCellHeight, setFixedCellWidth, setLayoutOrientation, setListData, setListData, setModel, setPrototypeCellValue, setSelectedIndex, setSelectedIndices, setSelectedValue, setSelectionBackground, setSelectionForeground, setSelectionInterval, setSelectionMode, setSelectionModel, setUI, setValueIsAdjusting, setVisibleRowCount, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, validate
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, enable, enableInputMethods, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, 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
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ALLFILES

public static final int ALLFILES
Public declarations

See Also:
Constant Field Values

SCHEDULEDFILES

public static final int SCHEDULEDFILES
See Also:
Constant Field Values

SEARCHEDFILES

public static final int SEARCHEDFILES
See Also:
Constant Field Values

STATICFILES

public static final int STATICFILES
See Also:
Constant Field Values
Constructor Detail

FileListBox

public FileListBox(int nMode)
This constructor initializes this listbox by filling it with all possible files.

Parameters:
nMode - Show scheduled uploads or all files
See Also:
FileListBox(String, int)

FileListBox

public FileListBox(java.lang.String strFilename,
                   int nMode)
This constructor initializes this listbox by filling it with all possible uploads. The id given as parameter is pre-selected.

Parameters:
strFilename - File which should be pre-selected
nMode - Show scheduled uploads or all files
See Also:
FileListBox(int)

FileListBox

public FileListBox(java.util.ArrayList aFilenames)
This constructor initializes this listbox by filling it with all possible files given in a vector.

Parameters:
aFilenames - All files, which should be displayed
See Also:
FileListBox(String, int)
Method Detail

clearList

public void clearList()
Clear listbox. Removes all uploads from listbox.

Specified by:
clearList in interface DefaultListBox

getItemCount

public int getItemCount()
Get number of filenames.

Specified by:
getItemCount in interface DefaultListBox
Returns:
number of filenames

getSelectedFile

public java.lang.String getSelectedFile()
Get current filename selection.

Returns:
selected filename
See Also:
setSelectedFile(String)

populate

public void populate()
Populating listbox. Adds all filenames to the listbox.

Specified by:
populate in interface DefaultListBox

searchFiles

public void searchFiles(Query query)
Call this to search in documents.

Parameters:
query - Pattern you search for

setMode

public void setMode(int nMode)
Call this to select a mode.

Parameters:
nMode - Show scheduled uploads or all files

setSelectedFile

public void setSelectedFile(java.lang.String strFilename)
Call this to select a file.

Parameters:
strFilename - File which should be selected
See Also:
getSelectedFile()

updateList

public void updateList()
Call this to update uploadlist.

Specified by:
updateList in interface DefaultListBox

updateList

public void updateList(java.lang.String strFilename)
Call this to update uploadlist.

Parameters:
strFilename - File which should be selected
See Also:
getSelectedFile()

updateList

public void updateList(java.util.ArrayList aFilenames)
Call this to update uploadlist with a given list.

Parameters:
aFilenames - List with filenames