net.sourceforge.geeboss.view
Class MainView

java.lang.Object
  extended by net.sourceforge.geeboss.view.MainView
All Implemented Interfaces:
Translatable, org.apache.avalon.framework.activity.Initializable

public class MainView
extends java.lang.Object
implements Translatable, org.apache.avalon.framework.activity.Initializable

This is Geeboss's Main view. All GUI Elements are registered in here and getter Methods are provided so that other Classes are able to access and use them. All settings are loaded in here.


Field Summary
static org.eclipse.swt.widgets.Display mDisplay
          A lot of other obj have to access display
static MainView mGeebossGui
          For classes who needs to access the MainController
static boolean mIsClosing
          Flag is set to true when Geeboss is exiting
static LoggerImpl mLogger
          Log all catched Exceptions
static org.eclipse.swt.widgets.Shell mShell
          A lot of other obj have to access shell
 
Constructor Summary
MainView(GeebossContainer container)
          Instantiate a new GUI
 
Method Summary
 void abnormalShutDown()
          This method is called from the Shutdown Hook Thread in case Geeboss was shut down not the normal way (e.g. the OS is shutting down).
 void changeWindowLayout()
          Change the window layout between 2 and 3 column window layout
 void enableSystrayIcon(boolean enabled)
          Enable / Disable Systray Icon for Geeboss
 GeebossContainer getContainer()
          Getter for container
 org.eclipse.swt.widgets.Display getDisplay()
          Getter for display
 EffectTabFolder getEffectTabFolder()
          Get the NewsTabFolder displaying newsfeeds
 EventManager getEventManager()
          Get the event manager for Geeboss.
 FakeToolTip getFakeToolTip()
          Get the FakeToolTip Object
 GeebossMenu getGeebossMenu()
          Method to let other obj access this object
 MidiThread getMidiThread()
          Let other objects access this thread
 PatchTree getPatchTree()
          Method to let other obj access this object
 Quickview getQuickview()
          Get the Geeboss quickview control
 java.util.HashMap<java.lang.String,int[]> getSaveSashWeights()
          Method to let other obj access this object
 org.eclipse.swt.widgets.Shell getShell()
          Getter for shell
 StatusLine getStatusLine()
          Get the StatusLine control
 StompView getStompView()
          Get the NewsText composite
 SystemTray getSystray()
          Get the SystemTray object
 void initialize()
          Initialize this component
 boolean isAlive()
          This method is called to check if Geeboss is still alive or was just closed by the user.
 boolean isBusy()
          Check if Geeboss is currently busy with a midi job
 void onClose(org.eclipse.swt.widgets.Event event, boolean forceExit)
          Called when the Shell is closed.
 void setup(org.eclipse.swt.widgets.Display display)
          Setup the MainView with the parent display
 void showGui()
          Open Geeboss shell
 void updateCoreSettings(SettingsFactory geebossSettingsParser, boolean isHotLoad)
          Update core settings of Geeboss that need to be loaded first
 void updateI18N()
          Update all controlls text with i18n
 void updateUserSettings(SettingsFactory geebossSettingsParser, boolean isHotLoad)
          Update some user settings from the "user.xml"
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mDisplay

public static org.eclipse.swt.widgets.Display mDisplay
A lot of other obj have to access display


mIsClosing

public static boolean mIsClosing
Flag is set to true when Geeboss is exiting


mLogger

public static LoggerImpl mLogger
Log all catched Exceptions


mGeebossGui

public static MainView mGeebossGui
For classes who needs to access the MainController


mShell

public static org.eclipse.swt.widgets.Shell mShell
A lot of other obj have to access shell

Constructor Detail

MainView

public MainView(GeebossContainer container)
Instantiate a new GUI

Parameters:
container - The geeboss container
Method Detail

setup

public void setup(org.eclipse.swt.widgets.Display display)
Setup the MainView with the parent display

Parameters:
display - the parent display

initialize

public void initialize()
                throws java.lang.Exception
Initialize this component

Specified by:
initialize in interface org.apache.avalon.framework.activity.Initializable
Throws:
java.lang.Exception

getContainer

public GeebossContainer getContainer()
Getter for container

Returns:
the container

getDisplay

public org.eclipse.swt.widgets.Display getDisplay()
Getter for display

Returns:
the display

getShell

public org.eclipse.swt.widgets.Shell getShell()
Getter for shell

Returns:
the shell

isAlive

public boolean isAlive()
This method is called to check if Geeboss is still alive or was just closed by the user.

Returns:
true if Geeboss is still running

abnormalShutDown

public void abnormalShutDown()
This method is called from the Shutdown Hook Thread in case Geeboss was shut down not the normal way (e.g. the OS is shutting down).
It is not guaranteed, that this method will be executed in any case.


changeWindowLayout

public void changeWindowLayout()
Change the window layout between 2 and 3 column window layout


enableSystrayIcon

public void enableSystrayIcon(boolean enabled)
Enable / Disable Systray Icon for Geeboss

Parameters:
enabled - true if enabled

getEventManager

public EventManager getEventManager()
Get the event manager for Geeboss.

Returns:
Returns the eventManager.

getFakeToolTip

public FakeToolTip getFakeToolTip()
Get the FakeToolTip Object

Returns:
FakeToolTip The fake tooltip object

getPatchTree

public PatchTree getPatchTree()
Method to let other obj access this object

Returns:
The tree holding all patch

getMidiThread

public MidiThread getMidiThread()
Let other objects access this thread

Returns:
the midi thread

getGeebossMenu

public GeebossMenu getGeebossMenu()
Method to let other obj access this object

Returns:
geeboss menu

getEffectTabFolder

public EffectTabFolder getEffectTabFolder()
Get the NewsTabFolder displaying newsfeeds

Returns:
NewsTabFolder

getStompView

public StompView getStompView()
Get the NewsText composite

Returns:
NewsText

getQuickview

public Quickview getQuickview()
Get the Geeboss quickview control

Returns:
Quickview

getStatusLine

public StatusLine getStatusLine()
Get the StatusLine control

Returns:
status line.

getSystray

public SystemTray getSystray()
Get the SystemTray object

Returns:
The system tray

getSaveSashWeights

public java.util.HashMap<java.lang.String,int[]> getSaveSashWeights()
Method to let other obj access this object

Returns:
HashMap with the saved SashWeights

isBusy

public boolean isBusy()
Check if Geeboss is currently busy with a midi job

Returns:
true if geeboss is busy with a midi job

updateI18N

public void updateI18N()
Update all controlls text with i18n

Specified by:
updateI18N in interface Translatable

onClose

public void onClose(org.eclipse.swt.widgets.Event event,
                    boolean forceExit)
Called when the Shell is closed. If boolean parameter forceExit is set to true, Geeboss will exit, even if "Minimize to Tray on Exit" is set to true. This forced exit is called when the user has pressed the "Exit" menuitem from the "File" menu.

Parameters:
event - The occuring Event
forceExit - If true, force Geeboss to exit

showGui

public void showGui()
Open Geeboss shell


updateCoreSettings

public void updateCoreSettings(SettingsFactory geebossSettingsParser,
                               boolean isHotLoad)
Update core settings of Geeboss that need to be loaded first

Parameters:
geebossSettingsParser - The settings parser to use
isHotLoad - true if the settings are imported by the user from the running program

updateUserSettings

public void updateUserSettings(SettingsFactory geebossSettingsParser,
                               boolean isHotLoad)
Update some user settings from the "user.xml"

Parameters:
geebossSettingsParser - The settings parser to use
isHotLoad - true if the settings are imported by the user from the running program


Copyright (c) 2005 The Geeboss team (http://geeboss.sourceforge.net). All Rights Reserved.