public class FileSystemFindTab extends javax.swing.JPanel implements TabbedWindowTab, javax.swing.event.ListSelectionListener, javax.swing.event.PopupMenuListener, java.awt.event.ActionListener, ActionDelegate, ConfigurableUnit
javax.swing.JPanel.AccessibleJPanel
javax.swing.JComponent.AccessibleJComponent
Modifier and Type | Field and Description |
---|---|
protected SharedAction[] |
actions
Remembers the shared action components (optional).
|
protected boolean |
closeAllowed
May the tab be closed by the user?
|
protected java.util.Vector<java.io.File> |
files
List of files from the search task.
|
protected java.lang.Class[] |
filesClasses
Column names of the files list used by the model.
|
protected java.lang.String[] |
filesColumns
Column names of the files list used by the model.
|
protected java.lang.Object[][] |
filesData
List of files currently displayed by the files list.
|
protected java.io.File[] |
filesSorted
List of sorted files.
|
protected java.lang.String |
helpID
Help system ID from the application (must be delegated).
|
protected javax.swing.Icon |
icon
The tab icon.
|
protected javax.swing.JLabel |
labelSelection |
protected javax.swing.JLabel |
labelSize |
protected java.util.Vector<TabListener> |
listeners
Container holding the external tab listeners.
|
protected StatusBarMessage |
message
The message for the status bar.
|
protected javax.swing.JPopupMenu |
popupMenu
Context menu for the tree and table.
|
protected boolean |
sorted
Is list currently sorted?
|
protected java.lang.String[] |
supportedActions
Array with supported shared actions.
|
protected TabbedWindow |
tabbedWindow
The parental tabbed window for this window.
|
protected javax.swing.JTable |
tableFiles |
protected java.lang.String |
title
The tab title.
|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Constructor and Description |
---|
FileSystemFindTab()
Constructor method for i18n purposes only.
|
FileSystemFindTab(java.util.Vector<java.io.File> files,
java.lang.String title,
javax.swing.Icon icon,
StatusBarMessage message)
Constructor for the GUI component.
|
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent event)
Called whenever the one of the components was activated.
|
void |
addTabListener(TabListener listener)
Adds a listener reacting on tab changes.
|
void |
configureUnit(java.lang.String id,
Configuration config)
Restores values from persistent data stores.
|
protected void |
copyFiles()
Copies the entry references based on the current selection in the table to the clipboard.
|
protected void |
deleteFiles()
Deletes existing entries based on the current selection in the table.
|
protected void |
editEntries()
Edits the selected entry based on the current selection (folder or file).
|
protected void |
finalize()
Clean-up method to help the gc.
|
ActionDelegate |
getActionDelegate()
Provides the optional action delegate responsible for shared buttons and menu items.
|
java.awt.Component |
getComponent()
Provides the component to be displayed by the tabbed docking window.
|
javax.swing.Icon |
getIcon()
Provides the graphical icon of the tab used for display.
|
StatusBarMessage |
getMessage()
Provides the status bar message for the tab from the creator.
|
java.io.File[] |
getSelectedFiles()
Provides the files table selection.
|
java.lang.String[] |
getSupportedActions()
Provides the supported shared actions for this delegate.
|
TabbedWindow |
getTabbedWindow()
Provides the tabbed docking window specified when
tabAdded() was called. |
java.lang.String |
getTitle()
Provides the title of the tab used for display.
|
java.lang.String |
getToolTip()
Provides the tooltip of the tab used for display.
|
protected void |
hexEditEntries()
Hexedits the selected entry based on the current selection (folder or file).
|
boolean |
isCloseAllowed()
Provides the info whether the tab may be closed by the user or not.
|
protected void |
openEntries()
Opens the selected entry based on the current selection (folder or file).
|
void |
popupMenuCanceled(javax.swing.event.PopupMenuEvent e)
Popup menu was cancelled.
|
void |
popupMenuWillBecomeInvisible(javax.swing.event.PopupMenuEvent e)
Popup menu will become invisible.
|
void |
popupMenuWillBecomeVisible(javax.swing.event.PopupMenuEvent e)
Popup menu will become visible.
|
void |
processAction(SharedAction action)
Indicates that the given action was initiated and must be processed.
|
void |
refresh()
Updates the contents of the tab.
|
void |
removeTabListener(TabListener listener)
Removes a listener reacting on tab changes.
|
protected void |
renameEntry()
Renames the selected entry based on the current selection (folder or file).
|
void |
setHelpID(java.lang.String helpid)
Sets the identifier for the context sensitive help (must be delegated).
|
void |
setHelpIDRenameDialog(java.lang.String helpid)
Sets the identifier for the context sensitive help (must be delegated).
|
void |
startControl(SharedAction[] actions)
Provides the info that the given shared actions must now be controlled.
|
void |
stopControl()
Provides the info that the control of the given shared actions must be stopped.
|
void |
storeUnit(java.lang.String id,
Configuration config)
Stores the current configuration values persistently.
|
void |
tabAdded(TabbedWindow parent,
java.lang.String id)
Informs the tab that it was added to the tabbed window.
|
void |
tabBecomesHidden()
Informs the tab that it will vanish from the screen.
|
void |
tabBecomesShown()
Informs the tab that it becomes visible on the screen.
|
void |
tabIsHiding()
Informs the tab that it was made invisible by the manager.
|
void |
tabIsShowing()
Informs the tab that it was made visible by the manager.
|
void |
tabRemoved(TabbedWindow parent,
java.lang.String id)
Informs the tab that it was removed from the tabbed window.
|
void |
unitRegistered(ApplicationModel model,
java.lang.String id)
Informs the configurable unit that it was registered with a model.
|
void |
unitUnregistered(ApplicationModel model,
java.lang.String id)
Informs the configurable unit that it was unregistered with a model.
|
protected void |
updateButtons()
Updates the button states (enabled/disabled).
|
protected void |
updateFilesTable()
Creates the files table on basis of the search results.
|
protected void |
updateSelectionInfo()
Updates the selection info of the files table.
|
void |
valueChanged(javax.swing.event.ListSelectionEvent event)
Called whenever the table selection changes.
|
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, 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, removeAll, 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, 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, transferFocusBackward, transferFocusUpCycle
protected java.lang.String title
protected javax.swing.Icon icon
protected StatusBarMessage message
protected TabbedWindow tabbedWindow
protected boolean closeAllowed
protected java.lang.String[] filesColumns
protected java.lang.Class[] filesClasses
protected java.lang.Object[][] filesData
protected java.util.Vector<java.io.File> files
protected javax.swing.JPopupMenu popupMenu
protected java.io.File[] filesSorted
protected boolean sorted
protected java.lang.String[] supportedActions
protected SharedAction[] actions
protected java.util.Vector<TabListener> listeners
protected java.lang.String helpID
protected javax.swing.JTable tableFiles
protected javax.swing.JLabel labelSelection
protected javax.swing.JLabel labelSize
public FileSystemFindTab() throws java.lang.InstantiationException
I18NExtractor
).
java.lang.InstantiationException
- Error indicationpublic FileSystemFindTab(java.util.Vector<java.io.File> files, java.lang.String title, javax.swing.Icon icon, StatusBarMessage message)
files
- The container with found entriestitle
- The tab titleicon
- The tab iconmessage
- The message for the status barprotected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable
- Error indicationpublic java.lang.String getTitle()
getTitle
in interface TabbedWindowTab
public java.lang.String getToolTip()
getToolTip
in interface TabbedWindowTab
public javax.swing.Icon getIcon()
getIcon
in interface TabbedWindowTab
public java.awt.Component getComponent()
getComponent
in interface TabbedWindowTab
public StatusBarMessage getMessage()
getMessage
in interface TabbedWindowTab
public boolean isCloseAllowed()
isCloseAllowed
in interface TabbedWindowTab
public void tabAdded(TabbedWindow parent, java.lang.String id)
tabAdded
in interface TabbedWindowTab
parent
- The tabbed docking windowid
- The unique IDpublic void tabRemoved(TabbedWindow parent, java.lang.String id)
tabRemoved
in interface TabbedWindowTab
parent
- The tabbed docking windowid
- The unique IDpublic void tabBecomesShown()
tabBecomesShown
in interface TabbedWindowTab
public void tabBecomesHidden()
tabBecomesHidden
in interface TabbedWindowTab
public void tabIsShowing()
tabIsShowing
in interface TabbedWindowTab
public void tabIsHiding()
tabIsHiding
in interface TabbedWindowTab
public TabbedWindow getTabbedWindow()
tabAdded()
was called.
getTabbedWindow
in interface TabbedWindowTab
null
if not availablepublic void refresh()
refresh
in interface TabbedWindowTab
public ActionDelegate getActionDelegate()
getActionDelegate
in interface TabbedWindowTab
null
if not availablepublic java.lang.String[] getSupportedActions()
getSupportedActions
in interface ActionDelegate
public void startControl(SharedAction[] actions)
startControl
in interface ActionDelegate
actions
- The actions to care forpublic void stopControl()
stopControl
in interface ActionDelegate
public void processAction(SharedAction action)
processAction
in interface ActionDelegate
action
- The action to be processedprotected void updateFilesTable()
protected void updateButtons()
public java.io.File[] getSelectedFiles()
protected void deleteFiles()
protected void updateSelectionInfo()
protected void openEntries()
Desktop
class (Java 1.6).
protected void editEntries()
Desktop
class (Java 1.6).
protected void hexEditEntries()
protected void renameEntry()
protected void copyFiles()
public void configureUnit(java.lang.String id, Configuration config)
configureUnit
in interface ConfigurableUnit
id
- The unique identifier for the instanceconfig
- The configurationpublic void storeUnit(java.lang.String id, Configuration config)
storeUnit
in interface ConfigurableUnit
id
- The unique identifier for the instanceconfig
- The configurationpublic void unitRegistered(ApplicationModel model, java.lang.String id)
unitRegistered
in interface ConfigurableUnit
model
- The application modelid
- The unique identifier for the instancepublic void unitUnregistered(ApplicationModel model, java.lang.String id)
unitUnregistered
in interface ConfigurableUnit
model
- The application modelid
- The unique identifier for the instancepublic void addTabListener(TabListener listener)
listener
- The listener instancejava.lang.NullPointerException
- If parameter is null
public void removeTabListener(TabListener listener)
listener
- The listener instancejava.lang.NullPointerException
- If parameter is null
public void setHelpID(java.lang.String helpid)
helpid
- The help system linkpublic void setHelpIDRenameDialog(java.lang.String helpid)
helpid
- The help system linkpublic void valueChanged(javax.swing.event.ListSelectionEvent event)
valueChanged
in interface javax.swing.event.ListSelectionListener
event
- The event objectpublic void popupMenuCanceled(javax.swing.event.PopupMenuEvent e)
popupMenuCanceled
in interface javax.swing.event.PopupMenuListener
e
- Event to be processedpublic void popupMenuWillBecomeInvisible(javax.swing.event.PopupMenuEvent e)
popupMenuWillBecomeInvisible
in interface javax.swing.event.PopupMenuListener
e
- Event to be processedpublic void popupMenuWillBecomeVisible(javax.swing.event.PopupMenuEvent e)
popupMenuWillBecomeVisible
in interface javax.swing.event.PopupMenuListener
e
- Event to be processedpublic void actionPerformed(java.awt.event.ActionEvent event)
actionPerformed
in interface java.awt.event.ActionListener
event
- The event objectCopyright © 2005-2013 Leisenfels UG (haftungsbeschränkt). All rights reserved.