de.scheisseichfindemalkeinen
Class BH

java.lang.Object
  extended by de.scheisseichfindemalkeinen.BH
All Implemented Interfaces:
IGuiEventListener, ISystemTrayListener, java.util.EventListener

public class BH
extends java.lang.Object
implements ISystemTrayListener, IGuiEventListener

Class which contains the main-Method

Version:
3.1.8

Field Summary
static boolean developerTest
          Developer-Flag Changes Update URL and other things for testing purposes
static java.lang.String FILE_SEPERATOR
          Path-Seperator for the actual operating system
static java.lang.String JAR_FILENAME
          Filename of jarfile of BH
static java.lang.String[][] libs
          Required Libs
static int MODE_WITH_TRAY
          SystemTray is used
static int MODE_WITHOUT_TRAY
          SystemTray is not used
static int modeSystemTray
          SystemTray is used or not 0 = not used 1 = used
static java.lang.String NAME
          Name of the program
static java.lang.String PATH_DATABASE
          Path to the database directory
static java.lang.String PATH_DOWNLOADLOGS
          Path to the download log directory
static java.lang.String PATH_DOWNLOADS
          Path to the download directory
static java.lang.String PATH_LOGS
          Path to the log directory
static java.lang.String PATH_SETTINGS
          Path to the settings directory
static java.lang.String ROOT_PATH
          Program directory
static java.lang.String VERSION
          Version of the program
 
Constructor Summary
BH()
          Constructor
 
Method Summary
 void exitApp(boolean restart)
          Exit program
 void exitBH(int mode, boolean restart)
          Exits program Mode must be 0 normally! Only the Shutdown-Thread should use Mode 1
static java.lang.String getString(java.lang.String key)
          Returns the localized String for a key
static java.lang.String getVersion()
          Returns the version of BH
 void hideWindow()
          Hide Main-Window
 void keywordsChanged()
          KeywordsChanged
static void main(java.lang.String[] args)
          Main-Method
 void showWindow(java.lang.Class cl)
          Show Window
 void splashProgressBarChanged(int min, int max, int val)
          Progressbar changed
 void splashProgressBarTextChanged(java.lang.String text)
          Progressbar text changed
 void splashProgressBarVisibilityChanged(boolean visible)
          Progressbar visibility changed
 void splashTextChanged(java.lang.String text)
          Splashscreen text changed
 void startDownloads()
          Starts downloads
 void stopDownloads()
          Stops downloads
 void updateWindowClosed(boolean updateRunned, boolean updateSuccessfull)
          Update-Window was closed If an update was downloaded and installed updateRunned is true otherwise false.
 void updateWindowOpened()
          Update-Window was opened and will be open until updateWindowClosed-Method is called
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NAME

public static final java.lang.String NAME
Name of the program

See Also:
Constant Field Values

VERSION

public static final java.lang.String VERSION
Version of the program

See Also:
Constant Field Values

libs

public static java.lang.String[][] libs
Required Libs


FILE_SEPERATOR

public static final java.lang.String FILE_SEPERATOR
Path-Seperator for the actual operating system


MODE_WITHOUT_TRAY

public static final int MODE_WITHOUT_TRAY
SystemTray is not used

See Also:
Constant Field Values

MODE_WITH_TRAY

public static final int MODE_WITH_TRAY
SystemTray is used

See Also:
Constant Field Values

modeSystemTray

public static int modeSystemTray
SystemTray is used or not 0 = not used 1 = used


ROOT_PATH

public static java.lang.String ROOT_PATH
Program directory


JAR_FILENAME

public static java.lang.String JAR_FILENAME
Filename of jarfile of BH


PATH_DATABASE

public static java.lang.String PATH_DATABASE
Path to the database directory


PATH_SETTINGS

public static java.lang.String PATH_SETTINGS
Path to the settings directory


PATH_DOWNLOADLOGS

public static java.lang.String PATH_DOWNLOADLOGS
Path to the download log directory


PATH_LOGS

public static java.lang.String PATH_LOGS
Path to the log directory


PATH_DOWNLOADS

public static java.lang.String PATH_DOWNLOADS
Path to the download directory


developerTest

public static boolean developerTest
Developer-Flag Changes Update URL and other things for testing purposes

Constructor Detail

BH

public BH()
Constructor

Method Detail

exitBH

public void exitBH(int mode,
                   boolean restart)
Description copied from interface: ISystemTrayListener
Exits program Mode must be 0 normally! Only the Shutdown-Thread should use Mode 1

Specified by:
exitBH in interface ISystemTrayListener
Parameters:
mode - Mode
restart - Restart

startDownloads

public void startDownloads()
Description copied from interface: ISystemTrayListener
Starts downloads

Specified by:
startDownloads in interface ISystemTrayListener

stopDownloads

public void stopDownloads()
Description copied from interface: ISystemTrayListener
Stops downloads

Specified by:
stopDownloads in interface ISystemTrayListener

getString

public static java.lang.String getString(java.lang.String key)
Returns the localized String for a key

Parameters:
key - Key
Returns:
Localized String

exitApp

public void exitApp(boolean restart)
Description copied from interface: IGuiEventListener
Exit program

Specified by:
exitApp in interface IGuiEventListener
Parameters:
restart - Restart

hideWindow

public void hideWindow()
Description copied from interface: IGuiEventListener
Hide Main-Window

Specified by:
hideWindow in interface IGuiEventListener

showWindow

public void showWindow(java.lang.Class cl)
Description copied from interface: IGuiEventListener
Show Window

Specified by:
showWindow in interface IGuiEventListener
Parameters:
cl - Class of window to show

keywordsChanged

public void keywordsChanged()
Description copied from interface: IGuiEventListener
KeywordsChanged

Specified by:
keywordsChanged in interface IGuiEventListener

splashTextChanged

public void splashTextChanged(java.lang.String text)
Description copied from interface: IGuiEventListener
Splashscreen text changed

Specified by:
splashTextChanged in interface IGuiEventListener
Parameters:
text - Text

splashProgressBarChanged

public void splashProgressBarChanged(int min,
                                     int max,
                                     int val)
Description copied from interface: IGuiEventListener
Progressbar changed

Specified by:
splashProgressBarChanged in interface IGuiEventListener
Parameters:
min - Minimum
max - Maximum
val - Value

splashProgressBarTextChanged

public void splashProgressBarTextChanged(java.lang.String text)
Description copied from interface: IGuiEventListener
Progressbar text changed

Specified by:
splashProgressBarTextChanged in interface IGuiEventListener
Parameters:
text - Text

splashProgressBarVisibilityChanged

public void splashProgressBarVisibilityChanged(boolean visible)
Description copied from interface: IGuiEventListener
Progressbar visibility changed

Specified by:
splashProgressBarVisibilityChanged in interface IGuiEventListener
Parameters:
visible - Visible

updateWindowClosed

public void updateWindowClosed(boolean updateRunned,
                               boolean updateSuccessfull)
Description copied from interface: IGuiEventListener
Update-Window was closed If an update was downloaded and installed updateRunned is true otherwise false. updateSuccessfull is true if the update was successfull otherwise it will be false.

Specified by:
updateWindowClosed in interface IGuiEventListener
Parameters:
updateRunned - Update runned
updateSuccessfull - Update successfull

updateWindowOpened

public void updateWindowOpened()
Description copied from interface: IGuiEventListener
Update-Window was opened and will be open until updateWindowClosed-Method is called

Specified by:
updateWindowOpened in interface IGuiEventListener

getVersion

public static java.lang.String getVersion()
Returns the version of BH

Returns:
Version

main

public static void main(java.lang.String[] args)
Main-Method

Parameters:
args - Arguments