|
Venice 0.7beta | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.swing.DefaultDesktopManager org.mov.ui.DesktopManager
public class DesktopManager
This class manages activities to do with internal frames on the desktop
Field Summary | |
---|---|
static int |
ARRANGE
Arrange windows in a grid. |
static int |
CASCADE
Cascade windows, resizing based on desktop size |
static int |
HORIZONTAL
Tile windows horizontally |
static int |
VERTICAL
Tile windows vertically |
Constructor Summary | |
---|---|
DesktopManager(javax.swing.JDesktopPane desktop)
Create a new Venice desktop manager to manage the given desktop. |
Method Summary | |
---|---|
void |
addModuleListener(ModuleListener moduleListener)
Add a listener to list for module events. |
static void |
closeAllWindows()
Closes all open windows. |
void |
fireModuleRemoved(Module module)
Inform all the module listeners that this module has been removed. |
void |
fireModuleRenamed(Module module)
Inform all the module listneres that this module has been renamed. |
static javax.swing.JDesktopPane |
getDesktop()
Get the desktop we are managing. |
static boolean |
isDisplayingMessage()
Return whether we are currently displaying any warning or error messages. |
static void |
minimizeWindows()
Minimises all windows that are iconifiable. |
ModuleFrame |
newFrame(Module module)
Display a new frame upon the current desktop. |
ModuleFrame |
newFrame(Module module,
boolean centre,
boolean honourSize,
boolean resizable)
Display a new frame upon the current desktop |
void |
removeModuleListener(ModuleListener moduleListener)
Remove a listener of module events. |
static void |
restoreAll()
Restores all minimised windows. |
void |
save()
Call save() on every open module. |
static void |
setDesktop(javax.swing.JDesktopPane desktop)
Set the desktop we are managing. |
static void |
showErrorMessage(java.lang.String message)
Show a simple error message to the user. |
static void |
showErrorMessage(java.lang.String title,
java.lang.String message)
Show a simple error message to the user. |
static void |
showWarningMessage(java.lang.String message)
Show a simple warning message to the user. |
static void |
tileFrames(int style)
Tiles all the windows in the desktop according to the given style. |
Methods inherited from class javax.swing.DefaultDesktopManager |
---|
activateFrame, beginDraggingFrame, beginResizingFrame, closeFrame, deactivateFrame, deiconifyFrame, dragFrame, endDraggingFrame, endResizingFrame, getBoundsForIconOf, getPreviousBounds, iconifyFrame, maximizeFrame, minimizeFrame, openFrame, removeIconFor, resizeFrame, setBoundsForFrame, setPreviousBounds, setWasIcon, wasIcon |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int HORIZONTAL
public static final int VERTICAL
public static final int CASCADE
public static final int ARRANGE
Constructor Detail |
---|
public DesktopManager(javax.swing.JDesktopPane desktop)
desktop
- the desktop to manage.Method Detail |
---|
public static void setDesktop(javax.swing.JDesktopPane desktop)
desktop
- the desktop to manage.public static javax.swing.JDesktopPane getDesktop()
public void addModuleListener(ModuleListener moduleListener)
moduleListener
- the object to be informed about module events.public void removeModuleListener(ModuleListener moduleListener)
moduleListener
- the object to no longer be informed about
module events.public void fireModuleRemoved(Module module)
module
- that has been removed.public void fireModuleRenamed(Module module)
module
- that has been renamed.public static void showWarningMessage(java.lang.String message)
message
- the warning message to displaypublic static void showErrorMessage(java.lang.String message)
message
- the error message to displaypublic static void showErrorMessage(java.lang.String title, java.lang.String message)
title
- the title of the dialog to displaymessage
- the error message to displaypublic static boolean isDisplayingMessage()
true
if we are displaying a message,
false
otherwise.public static void tileFrames(int style)
style
- one of HORIZONTAL
, VERTICAL
, CASCADE
or ARRANGE
public static void minimizeWindows()
public static void restoreAll()
public static void closeAllWindows()
public ModuleFrame newFrame(Module module)
module
- the module to render in the frame
public ModuleFrame newFrame(Module module, boolean centre, boolean honourSize, boolean resizable)
module
- the module to render in the framecentre
- should the frame be centred?honourSize
- should we honour the frame's preferred size?resizable
- is the frame allowed to be resized?
public void save()
|
Venice 0.7beta | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |