public class VFSSessionWindow extends TabbedWindow
javax.swing.JPanel.AccessibleJPanel
javax.swing.JComponent.AccessibleJComponent
Modifier and Type | Field and Description |
---|---|
protected java.util.Vector<javax.swing.event.ChangeListener> |
changeListeners
Cache for objects listening for change events (e.g. altered selection).
|
protected javax.swing.JComboBox |
comboBoxConnections
Toolbar component.
|
protected java.util.Vector<VFSConnection> |
connections
Cache for the currently configured VFS connections.
|
protected VFSSessionController |
controller
Instance processing the GUI callbacks (MVC controller).
|
protected boolean |
dragEnabled
Is this component a dragging source?
|
protected java.util.Vector<FileHandler> |
fileHandlers
Cache for objects handling file context menues.
|
protected java.util.Date |
lastRun
The timestamp when the update task was executed.
|
protected javax.swing.JMenuItem |
menuItemConnect
Default menu item.
|
protected javax.swing.JMenuItem |
menuItemDisconnect
Default menu item.
|
protected javax.swing.JMenuItem |
menuItemEditConnections
Default menu item.
|
protected javax.swing.JMenuItem |
menuItemNewSession
Default menu item.
|
protected ApplicationModel |
model
The configuration model used for this window.
|
protected LabeledPanel |
panelConnections
Toolbar component.
|
protected java.util.Vector<TabListener> |
tabListeners
Container holding the external tab listeners.
|
protected PeriodicTaskManager |
taskManager
The local manager for the periodic keep alive tasks.
|
protected java.util.Vector<java.lang.Runnable> |
tasks
Additional task to be executed with the updater task (optional).
|
protected javax.swing.JToolBar |
toolBar
The toolbar component.
|
protected java.lang.String |
unitID
The configurable unit ID used for this window.
|
protected java.lang.Runnable |
updater
The current update task (no thread!).
|
protected VFSFileSystemManager |
vfsManager
The local manager for the VFS protocols.
|
autoHide, cacheTabByID, cacheTabByRenderer, counter, helpID, iconError, maxTitleLength, popupListener, popupMenu, previous, tabbedPane, windowParams
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Constructor and Description |
---|
VFSSessionWindow()
Constructor for the GUI component.
|
Modifier and Type | Method and Description |
---|---|
void |
addChangeListener(javax.swing.event.ChangeListener listener)
Adds an instance listening for state changes of the file system window.
|
void |
addFileHandler(FileHandler handler)
Adds an instance creating additional context menus (popups) for the files and directories.
|
java.lang.String |
addTab(TabbedWindowTab tab)
Adds a new tab for the tabbed pane (must be of the type
SessionTab ). |
void |
addTabListener(TabListener listener)
Adds a listener reacting on tab changes.
|
void |
addTask(java.lang.Runnable task)
Adds an additional task to be executed with the updater task (optional)
|
void |
configureUnit(java.lang.String id,
Configuration config)
Restores values from persistent data stores.
|
protected LabeledPanel |
createButton(javax.swing.JMenuItem item,
int newsize,
boolean bottomtext,
java.lang.String text)
Convenience method to create a toolbar button nested in a labeled panel.
|
LabeledPanel[] |
createToolBarComps(javax.swing.JToolBar toolbar,
int newsize,
boolean bottomtext)
Creates the corresponding components to be displayed by an application toolbar.
|
VFSConnectionDialog |
editConnections(VFSConnection vfsconn,
VFSConnectionDialog dialog)
Opens the dialog to edit the current server connections.
|
protected void |
finalize()
Cares for proper cleanup after releasing the object.
|
VFSConnection |
findVFSConnection(java.lang.String id)
Determines the VFS connection associated with the given ID.
|
VFSConnection[] |
findVFSConnections(org.apache.commons.vfs2.FileObject url)
Determines the VFS connections which can be used to show the given network file.
|
VFSSessionTab |
findVFSSessionTab(VFSConnection vfsconn)
Provides the first-best tab for the given VFS connection.
|
VFSConnection[] |
getActiveVFSConnections()
Provides the connections currently used (by tabs).
|
java.util.Vector<VFSConnection> |
getComboConnections()
Provides the connections currently displayed by the connection combo box.
|
boolean |
getDragEnabled()
Getter for the drag gesture supported by this window (default:
false ). |
java.util.Vector<FileHandler> |
getFileHandlers()
Provides the installed file handlers.
|
javax.swing.JMenuItem |
getMenuItemConnect()
Provides one of the menu items.
|
javax.swing.JMenuItem |
getMenuItemDisconnect()
Provides one of the menu items.
|
javax.swing.JMenuItem |
getMenuItemEdit()
Provides one of the menu items.
|
javax.swing.JMenuItem |
getMenuItemNew()
Provides one of the menu items.
|
VFSConnection |
getSelectedComboConnection()
Provides the connection currently selected by the connection combo box.
|
VFSConnection |
getSelectedConnection()
Provides the tabbed pane selection (connection).
|
void |
populateMenu(javax.swing.JMenu menu)
Populates the given menu with items specific for this window (connection management).
|
void |
removeChangeListener(javax.swing.event.ChangeListener listener)
Removes an instance listening for state changes of the file system window.
|
void |
removeFileHandler(FileHandler handler)
Removes an instance creating additional context menus (popups) for the files and directories.
|
TabbedWindowTab |
removeTab(java.lang.String id)
Removes a tab from the tabbed pane.
|
TabbedWindowTab |
removeTab(TabbedWindowTab tab)
Removes a tab from the tabbed pane.
|
void |
removeTabListener(TabListener listener)
Removes a listener reacting on tab changes.
|
void |
removeTask(java.lang.Runnable task)
Removes an existing task to be executed with the updater task (optional)
|
void |
setDragEnabled(boolean enable)
Setter for the drag gesture supported by this window (default:
false ). |
void |
setPeriodicTaskManager(PeriodicTaskManager taskmanager)
Sets the local manager for the periodic keep alive tasks.
|
void |
setSelectedComboConnection(java.lang.String id)
Sets the selected connection for the connection combo box.
|
void |
setSelectedComboConnection(VFSConnection vfsconn)
Sets the selected connection for the connection combo box.
|
void |
setupDefaultConnections()
Convenience to create the default connection for the Leisenfels FTP server.
|
void |
storeUnit(java.lang.String id,
Configuration config)
Stores the current configuration values persistently.
|
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.
|
void |
updateMenuAndToolbar()
Updates the network menu items and toolbar buttons on configuration changes.
|
void |
windowAdded(DockingManager manager,
int location)
Informs the docking window that it was added by the manager.
|
void |
windowBecomesHidden(int location)
Informs the docking window that it will be made invisible by the manager.
|
void |
windowBecomesShown(int location)
Informs the docking window that it will be made visible by the manager.
|
void |
windowIsHiding(int location)
Informs the docking window that it was made invisible by the manager.
|
void |
windowIsShowing(int location)
Informs the docking window that it was made visible by the manager.
|
void |
windowRemoved(DockingManager manager,
int location)
Informs the docking window that it was removed by the manager.
|
actionPerformed, addTabChangeListener, closeAllTabs, closeOtherTabs, closeSelectedTab, findTab, findTab, findTab, getActionDelegate, getComponent, getDockingManager, getIcon, getID, getMode, getPreferredHeight, getPreferredWidth, getSelectedTab, getSelectedTabID, getSupportedActions, getTabRenderer, getTitle, getToolTip, getWindowHeight, getWindowLocation, getWindowLocationX, getWindowLocationY, getWindowState, getWindowWidth, isAutomatic, isButtonPressed, isButtonVisible, isGrowing, isWindowMode, isWindowVisible, popupMenuCanceled, popupMenuWillBecomeInvisible, popupMenuWillBecomeVisible, processAction, refresh, removeTabChangeListener, setAutomatic, setButtonPressed, setButtonVisible, setErrorState, setGrowing, setHelpID, setID, setMode, setPreferredHeight, setPreferredWidth, setSelectedTab, setSelectedTab, setToolTipTextForTab, setWindowHeight, setWindowLocationX, setWindowLocationY, setWindowMode, setWindowState, setWindowVisible, setWindowWidth, startControl, stateChanged, stopControl, updateTabIcons, updateTabTexts, updateTabToolTips, windowIsActive, windowIsInactive
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 javax.swing.JMenuItem menuItemEditConnections
protected javax.swing.JMenuItem menuItemNewSession
protected javax.swing.JMenuItem menuItemConnect
protected javax.swing.JMenuItem menuItemDisconnect
protected javax.swing.JToolBar toolBar
protected LabeledPanel panelConnections
protected javax.swing.JComboBox comboBoxConnections
protected java.util.Vector<VFSConnection> connections
protected java.lang.Runnable updater
protected java.util.Date lastRun
protected VFSSessionController controller
protected java.util.Vector<java.lang.Runnable> tasks
protected VFSFileSystemManager vfsManager
protected PeriodicTaskManager taskManager
protected ApplicationModel model
protected java.lang.String unitID
protected boolean dragEnabled
protected java.util.Vector<TabListener> tabListeners
protected java.util.Vector<FileHandler> fileHandlers
protected java.util.Vector<javax.swing.event.ChangeListener> changeListeners
public VFSSessionWindow()
protected void finalize() throws java.lang.Throwable
finalize
in class TabbedWindow
java.lang.Throwable
public void configureUnit(java.lang.String id, Configuration config)
configureUnit
in interface ConfigurableUnit
configureUnit
in class TabbedWindow
id
- The unique identifier for the instanceconfig
- The configurationpublic void storeUnit(java.lang.String id, Configuration config)
storeUnit
in interface ConfigurableUnit
storeUnit
in class TabbedWindow
id
- The unique identifier for the instanceconfig
- The configurationpublic void unitRegistered(ApplicationModel model, java.lang.String id)
unitRegistered
in interface ConfigurableUnit
unitRegistered
in class TabbedWindow
model
- The application modelid
- The unique identifier for the instancepublic void unitUnregistered(ApplicationModel model, java.lang.String id)
unitUnregistered
in interface ConfigurableUnit
unitUnregistered
in class TabbedWindow
model
- The application modelid
- The unique identifier for the instancepublic java.lang.String addTab(TabbedWindowTab tab)
SessionTab
).
addTab
in class TabbedWindow
tab
- The new tab to be addedjava.lang.NullPointerException
- If parameter is null
java.lang.IllegalArgumentException
- If parameter is invalidpublic TabbedWindowTab removeTab(java.lang.String id)
removeTab
in class TabbedWindow
id
- The tab IDnull
if not removedjava.lang.NullPointerException
- If parameter is null
public TabbedWindowTab removeTab(TabbedWindowTab tab)
removeTab
in class TabbedWindow
tab
- The tabnull
if not removedjava.lang.NullPointerException
- If parameter is null
public void windowAdded(DockingManager manager, int location)
windowRemoved()
are called.
windowAdded
in interface DockingWindow
windowAdded
in class TabbedWindow
manager
- The docking managerlocation
- The location (TOP, BOTTOM, LEFT, RIGHT
)public void windowRemoved(DockingManager manager, int location)
windowAdded()
are called.
windowRemoved
in interface DockingWindow
windowRemoved
in class TabbedWindow
manager
- The docking managerlocation
- The location (TOP, BOTTOM, LEFT, RIGHT
)public void windowBecomesShown(int location)
windowBecomesShown
in interface DockingWindow
windowBecomesShown
in class TabbedWindow
location
- The location (TOP, BOTTOM, LEFT, RIGHT
)public void windowBecomesHidden(int location)
windowBecomesHidden
in interface DockingWindow
windowBecomesHidden
in class TabbedWindow
location
- The location (TOP, BOTTOM, LEFT, RIGHT
)public void windowIsShowing(int location)
windowIsShowing
in interface DockingWindow
windowIsShowing
in class TabbedWindow
location
- The location (TOP, BOTTOM, LEFT, RIGHT
)public void windowIsHiding(int location)
windowIsHiding
in interface DockingWindow
windowIsHiding
in class TabbedWindow
location
- The location (TOP, BOTTOM, LEFT, RIGHT
)public VFSConnection getSelectedConnection()
null
if not availablepublic void addTask(java.lang.Runnable task)
task
- The new task to be addedjava.lang.NullPointerException
- If parameter is null
public void removeTask(java.lang.Runnable task)
task
- The task to be removedjava.lang.NullPointerException
- If parameter is null
public void populateMenu(javax.swing.JMenu menu)
menu
- The menujava.lang.NullPointerException
- If parameter is null
public javax.swing.JMenuItem getMenuItemEdit()
public javax.swing.JMenuItem getMenuItemNew()
public javax.swing.JMenuItem getMenuItemConnect()
public javax.swing.JMenuItem getMenuItemDisconnect()
public LabeledPanel[] createToolBarComps(javax.swing.JToolBar toolbar, int newsize, boolean bottomtext)
populateMenu()
BEFORE this method is called.
toolbar
- The toolbar containernewsize
- The desired image sizebottomtext
- Show bottom text?java.lang.NullPointerException
- If the menu has not been created before or a parameter is null
populateMenu(JMenu)
protected LabeledPanel createButton(javax.swing.JMenuItem item, int newsize, boolean bottomtext, java.lang.String text)
item
- The itemnewsize
- The desired image sizebottomtext
- Show bottom text?text
- The textpublic void updateMenuAndToolbar()
public void setupDefaultConnections()
public VFSConnection getSelectedComboConnection()
null
public void setSelectedComboConnection(VFSConnection vfsconn)
vfsconn
- The connection to selectpublic void setSelectedComboConnection(java.lang.String id)
id
- The connection identifier to selectpublic void setPeriodicTaskManager(PeriodicTaskManager taskmanager)
taskmanager
- The manager (optional)public VFSConnection[] getActiveVFSConnections()
public VFSSessionTab findVFSSessionTab(VFSConnection vfsconn)
vfsconn
- The desired connectionnull
public java.util.Vector<VFSConnection> getComboConnections()
public VFSConnectionDialog editConnections(VFSConnection vfsconn, VFSConnectionDialog dialog)
vfsconn
- The connection to select (optional)dialog
- The connection dialog (optional)public void setDragEnabled(boolean enable)
false
).
enable
- Enable dragging?public boolean getDragEnabled()
false
).
public VFSConnection findVFSConnection(java.lang.String id)
id
- The connection IDnull
if not availablepublic 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 addFileHandler(FileHandler handler)
handler
- The new file handlerjava.lang.NullPointerException
- If the handler is invalidpublic void removeFileHandler(FileHandler handler)
handler
- The file handler to be removedjava.lang.NullPointerException
- If the handler is invalidpublic java.util.Vector<FileHandler> getFileHandlers()
java.lang.NullPointerException
- If the handler is invalidpublic void addChangeListener(javax.swing.event.ChangeListener listener)
listener
- The new change listenerjava.lang.NullPointerException
- If the listener is invalidpublic void removeChangeListener(javax.swing.event.ChangeListener listener)
listener
- The change listener to be removedjava.lang.NullPointerException
- If the listener is invalidpublic VFSConnection[] findVFSConnections(org.apache.commons.vfs2.FileObject url)
url
- The URLnull
if not availableCopyright © 2005-2013 Leisenfels UG (haftungsbeschränkt). All rights reserved.