|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
java.awt.Window
java.awt.Frame
javax.swing.JFrame
com.mucommander.ui.main.MainFrame
public class MainFrame
This is the main frame, which contains all other UI components visible on a mucommander window.
| Nested Class Summary | |
|---|---|
protected class |
MainFrame.CustomFocusTraversalPolicy
Manages focus for both FolderPanel and their subcomponents. |
| Nested classes/interfaces inherited from class javax.swing.JFrame |
|---|
javax.swing.JFrame.AccessibleJFrame |
| Nested classes/interfaces inherited from class java.awt.Frame |
|---|
java.awt.Frame.AccessibleAWTFrame |
| Nested classes/interfaces inherited from class java.awt.Window |
|---|
java.awt.Window.AccessibleAWTWindow |
| 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 |
|---|
| Fields inherited from class javax.swing.JFrame |
|---|
accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled |
| Fields inherited from class java.awt.Frame |
|---|
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR |
| Fields inherited from class java.awt.Component |
|---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface javax.swing.WindowConstants |
|---|
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
MainFrame(AbstractFile leftInitialFolder,
AbstractFile rightInitialFolder)
Creates a new main frame set to the given initial folders. |
|
| Method Summary | |
|---|---|
void |
addActivePanelListener(ActivePanelListener activePanelListener)
Registers the given ActivePanelListener to receive events when the active table changes. |
void |
dispose()
Overrides java.awt.Window#dispose to save last MainFrame's attributes in the preferences
before disposing this MainFrame. |
FolderPanel |
getActivePanel()
Returns the currently active panel. |
FileTable |
getActiveTable()
Returns the currently active table. |
CommandBar |
getCommandBar()
Returns the command bar, i.e. |
FolderPanel |
getInactivePanel()
Returns the inactive panel, i.e. |
FileTable |
getInactiveTable()
Returns the inactive table, i.e. |
FolderPanel |
getLeftPanel()
Returns the FolderPanel instance corresponding to the left panel. |
boolean |
getNoEventsMode()
Returns true if 'no events mode' is currently enabled. |
FolderPanel |
getRightPanel()
Returns the FolderPanel instance corresponding to the right panel. |
ProportionalSplitPane |
getSplitPane()
Returns the ProportionalSplitPane component that splits the two panels. |
boolean |
getSplitPaneOrientation()
Returns how folder panels are currently split: if true is returned, panels are split vertically
(default), horizontally otherwise. |
StatusBar |
getStatusBar()
Returns the status bar, where information about selected files and volume are displayed. |
ToolBar |
getToolBar()
Returns the toolbar where shortcut buttons (go back, go forward, ...) are. |
boolean |
isAncestorOfActiveWindow()
Returns true if this MainFrame is active, or is an ancestor of a Window that is currently active. |
boolean |
isAutoSizeColumnsEnabled()
|
boolean |
isForegroundActive()
Returns true if this MainFrame is currently active in the foreground. |
void |
locationCancelled(LocationEvent e)
This method is invoked when the current folder has been cancelled by the user. |
void |
locationChanged(LocationEvent e)
This method is invoked when the current folder has changed. |
void |
locationChanging(LocationEvent e)
This method is invoked when the current folder is being changed. |
void |
locationFailed(LocationEvent e)
This method is invoked when the current folder could not be changed, as a result of the folder not existing or failing to list its contents. |
void |
removeActivePanelListener(ActivePanelListener activePanelListener)
Unregisters the given ActivePanelListener so that it no longer receives events when the active table changes. |
void |
setAutoSizeColumnsEnabled(boolean b)
|
void |
setNoEventsMode(boolean enabled)
Enables/disables the 'no events mode' which prevents mouse and keyboard events from being received by the application (MainFrame, its subcomponents and the menu bar). |
void |
setSameFolder()
Makes both folders the same, choosing the one which is currently active. |
void |
setSplitPaneOrientation(boolean vertical)
Specifies how folder panels are split: if true is passed, the folder panels will be split vertically (default), horizontally otherwise. |
void |
swapFolders()
Swaps the two FolderPanel instances: after a call to this method, the left FolderPanel will be the right one and vice-versa. |
void |
toFront()
Overrides java.awt.Window#toFront to have the window return to a normal state if it is minimized. |
void |
tryRefreshCurrentFolders()
Forces a refrehs of the frame's folder panel. |
void |
updateWindowTitle()
Updates this window's title to show currently active folder and window number. |
| Methods inherited from class javax.swing.JFrame |
|---|
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update |
| Methods inherited from class java.awt.Frame |
|---|
addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setResizable, setState, setTitle, setUndecorated |
| Methods inherited from class java.awt.Window |
|---|
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOwnedWindows, getOwner, getOwnerlessWindows, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isShowing, pack, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setVisible, show, toBack |
| Methods inherited from class java.awt.Container |
|---|
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, 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, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, setBackground, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusUpCycle |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.awt.MenuContainer |
|---|
getFont, postEvent |
| Constructor Detail |
|---|
public MainFrame(AbstractFile leftInitialFolder,
AbstractFile rightInitialFolder)
leftInitialFolder - the initial folder to display in the left panelrightInitialFolder - the initial folder to display in the right panel| Method Detail |
|---|
public void addActivePanelListener(ActivePanelListener activePanelListener)
activePanelListener - the ActivePanelListener to addpublic void removeActivePanelListener(ActivePanelListener activePanelListener)
activePanelListener - the ActivePanelListener to removepublic boolean getNoEventsMode()
true if 'no events mode' is currently enabled.
true if 'no events mode' is currently enabledpublic void setNoEventsMode(boolean enabled)
enabled - true to enable 'no events mode', false to disable itpublic ToolBar getToolBar()
public CommandBar getCommandBar()
public StatusBar getStatusBar()
public FileTable getActiveTable()
The returned table doesn't necessarily have focus, the focus can be in some other component
of the active FolderPanel, or nowhere in the MainFrame if it is currently not in the foreground.
Use Component.hasFocus() to test if the table currently has focus.
FileTable.isActiveTable()public FolderPanel getActivePanel()
The returned panel doesn't necessarily have focus, for example if the MainFrame is currently not in the foreground.
public FileTable getInactiveTable()
getActiveTable().
public FolderPanel getInactivePanel()
getActivePanel().
public FolderPanel getLeftPanel()
public FolderPanel getRightPanel()
public ProportionalSplitPane getSplitPane()
public void setSplitPaneOrientation(boolean vertical)
vertical - if true, the folder panels will be split horizontally (default), vertically otherwise.public boolean getSplitPaneOrientation()
true is returned, panels are split vertically
(default), horizontally otherwise.
true if folder panels are split verticallypublic void swapFolders()
public void setSameFolder()
public boolean isForegroundActive()
true if this MainFrame is currently active in the foreground.
true if this MainFrame is currently active in the foregroundpublic void tryRefreshCurrentFolders()
public boolean isAncestorOfActiveWindow()
true if this MainFrame is active, or is an ancestor of a Window that is currently active.
true if this MainFrame is active, or is an ancestor of a Window that is currently activepublic void updateWindowTitle()
public void locationChanged(LocationEvent e)
LocationListener
locationChanged in interface LocationListenere - describes the location change eventpublic void locationChanging(LocationEvent e)
LocationListenerA call to either LocationListener.locationChanged(LocationEvent), LocationListener.locationCancelled(LocationEvent) or
LocationListener.locationFailed(LocationEvent) will always follow to indicate the outcome of the folder change.
locationChanging in interface LocationListenere - describes the location change eventpublic void locationCancelled(LocationEvent e)
LocationListener
locationCancelled in interface LocationListenere - describes the location change eventpublic void locationFailed(LocationEvent e)
LocationListener
locationFailed in interface LocationListenere - describes the location change eventpublic void dispose()
java.awt.Window#dispose to save last MainFrame's attributes in the preferences
before disposing this MainFrame.
dispose in class java.awt.Windowpublic void toFront()
java.awt.Window#toFront to have the window return to a normal state if it is minimized.
toFront in class java.awt.Windowpublic boolean isAutoSizeColumnsEnabled()
public void setAutoSizeColumnsEnabled(boolean b)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
This file is part of muCommander - Copyright (C) 2002-2008 Maxence Bernard