SRJRCFrames
v0.1.296

de.schwarzrot.ui
Interface Desktop

All Superinterfaces:
ApplicationEventPublisher, RootWindowHandler
All Known Implementing Classes:
AbstractDesktop, DockDesktop, MDIDesktop, MWIDesktop, SWIDesktop

public interface Desktop
extends ApplicationEventPublisher, RootWindowHandler

interface for applications "desktop". The desktop implementation is responsible to provide a window area to each application. It offers the application access to the toplevel window for its visual area and distributes ApplicationEvents between all Applications. The desktop implementation creates an ActionHandler for Actions common to all Applications and it provides a common ProgressMonitor.

Author:
Reinhard Mantey
See Also:
AbstractApplicationLauncher

Field Summary
static Dimension defaultStartupSize
           
static String ID_DESKTOP
           
static String ID_TITLE
           
 
Method Summary
 void createMainFrame(Application<?> app)
          creates the rootlevel window
 void doAbout(ActionEvent ae)
          pops up the about dialog
 boolean doConfig(String mode)
          pops up the preferences dialog
 void doExit(ActionEvent ae)
          terminate all applications
 void doHelp(ActionEvent ae)
          pops up the help browser
 void doSwitch(Application<?> app)
          switch to another loaded application
 JarExtension getArchiveInfo()
          returns the archive info (result from verifyArchive)
 JComponent getConfigPage()
          returns the desktops configuration page.
 String getCurApp()
          returns the name of the current active application
 Application<?> getDefaultApp()
          returns the default application, which is the application, that should be opened first
 String getName()
          returns the name of the implementing class
 String getVersionString()
          returns the version as string
 void init(List<Application<?>> apps)
          first stage of initialization
 void setActionHandler(DesktopActionHandler handler)
          setter for the DesktopActionHandler, which handles the user-actions common to all applications, like application-switching or exiting of the entire application.
 void setArchiveInfo(JarExtension archiveInfo)
          sets the archive info (result from verifyArchive)
 void setConfig(DesktopConfig ac)
          sets the configuration instance
 void setCurApp(Application<?> curApp)
          sets the current active application
 void setCurApp(String curApp)
          sets the current active application
 void setDefaultApp(Application<?> defaultApp)
          sets the default application
 void setDefaultApp(String defaultApp)
          sets the default application
 void setName(String name)
          sets the name of the desktop implementation
 void setupFrom(Desktop other)
          method to support user configurable desktop environment.
 void start()
          second stage of application setup and start of the game
 void validateUser()
          validates a user
 
Methods inherited from interface org.springframework.context.ApplicationEventPublisher
publishEvent
 
Methods inherited from interface de.schwarzrot.ui.RootWindowHandler
getMainWindow, getProgressMonitor, setProgressMonitor
 

Field Detail

defaultStartupSize

static final Dimension defaultStartupSize

ID_DESKTOP

static final String ID_DESKTOP
See Also:
Constant Field Values

ID_TITLE

static final String ID_TITLE
See Also:
Constant Field Values
Method Detail

createMainFrame

void createMainFrame(Application<?> app)
creates the rootlevel window

Parameters:
app - - application

doAbout

void doAbout(ActionEvent ae)
pops up the about dialog

Parameters:
ae - - action event

doConfig

boolean doConfig(String mode)
pops up the preferences dialog

Parameters:
mode - - should be null for standard operation. If there's an error on application startup, the mode may be "init" to change into initial setup mode.
Returns:
- true if the dialog has been approved, otherwise false

doExit

void doExit(ActionEvent ae)
terminate all applications

Parameters:
ae - - action event

doHelp

void doHelp(ActionEvent ae)
pops up the help browser

Parameters:
ae - - action event

doSwitch

void doSwitch(Application<?> app)
switch to another loaded application

Parameters:
app - - the application to switch to

getArchiveInfo

JarExtension getArchiveInfo()
returns the archive info (result from verifyArchive)

Returns:
- archive info

getConfigPage

JComponent getConfigPage()
returns the desktops configuration page. This page will show an editor for common preferences

Returns:
- the editor page

getCurApp

String getCurApp()
returns the name of the current active application

Returns:
- an application name

getDefaultApp

Application<?> getDefaultApp()
returns the default application, which is the application, that should be opened first

Returns:
- an application

getName

String getName()
returns the name of the implementing class

Returns:
- name of desktop implementation

getVersionString

String getVersionString()
returns the version as string

Returns:
- the version as string

init

void init(List<Application<?>> apps)
first stage of initialization

Parameters:
apps - - list of loaded applications

setActionHandler

void setActionHandler(DesktopActionHandler handler)
setter for the DesktopActionHandler, which handles the user-actions common to all applications, like application-switching or exiting of the entire application.

In order to allow switching of the desktop interface, the handling of the actions is separated from the desktop implementations.

Parameters:
handler - - the handler for desktop actions

setArchiveInfo

void setArchiveInfo(JarExtension archiveInfo)
sets the archive info (result from verifyArchive)

Parameters:
archiveInfo - - the archive info

setConfig

void setConfig(DesktopConfig ac)
sets the configuration instance

Parameters:
ac - - the configuration instance

setCurApp

void setCurApp(Application<?> curApp)
sets the current active application

Parameters:
curApp - - an application

setCurApp

void setCurApp(String curApp)
sets the current active application

Parameters:
curApp - - the name of an application

setDefaultApp

void setDefaultApp(Application<?> defaultApp)
sets the default application

Parameters:
defaultApp - - an application

setDefaultApp

void setDefaultApp(String defaultApp)
sets the default application

Parameters:
defaultApp - - an application name

setName

void setName(String name)
sets the name of the desktop implementation

Parameters:
name - - name of desktop implementation

setupFrom

void setupFrom(Desktop other)
method to support user configurable desktop environment. As by default configuration a different class has been setup as desktop class, we need to borrow configuration from that "old" and unused class.

Parameters:
other - - the probably already configured desktop implementation

start

void start()
second stage of application setup and start of the game


validateUser

void validateUser()
validates a user


SRJRCFrames
v0.1.296

hosted at
Find SRJRCFrames at SourceForge.net. Fast, secure and free:
           Open Source Software download
Submit a bug or request a feature

SRJRCFrames is published according to the GNU General Public License
Copyright 2005-2012 Reinhard Mantey - some rights reserved.