org.kemet.lf
Class GlobalKemet

java.lang.Object
  extended by org.kemet.lf.GlobalKemet

public class GlobalKemet
extends java.lang.Object

Since:
0.3
Author:
fabricemaupin

GlobalKemet : it's the singleton of the framework. It stores all necessary informations about differents part of the framework.


Field Summary
static java.awt.Color backgroundColorJMenu
           background color for JMenu.
static java.awt.Color backgroundColorMenuBar
           background color for Menu Bar.
 
Method Summary
 boolean add(KemetToolBar toolbar)
           add a toolbar.
 void addBtDraggableFlavor(java.awt.datatransfer.DataFlavor btDraggableFlavor)
           add META information about data of draggable button.
 java.lang.String getApplicationXMLFileName()
           return name of configuration XML file.
static java.awt.Color getBackgroundColorJMenu()
           return the background color of JMenu.
static java.awt.Color getBackgroundColorMenuBar()
           return the background color of menu bar.
 java.util.ArrayList<java.awt.datatransfer.DataFlavor> getBtsDraggableFlavor()
           return META informations about data from draggable buttons.
 javax.swing.JPanel getCentralPanel()
           return the panel which contains window content.
static java.util.Locale getCurrentLoc()
           return the current localization.
static GlobalKemet getInstance()
           get the only one instance from GlobalKemet class.
 java.util.List<java.lang.Object[]> getMenu()
           return the list of JMenu of application.
static int getMinSizeFont()
           return the minimal size of the current font.
 int getMinX()
           return the minimal width of the current window.
 int getMinY()
           return the minimal height of the current window.
 javax.swing.JLabel getMoveAutoWindow()
           return the "move automatically toolbars by relation with main button" button.
 javax.swing.JLabel getMoveWindow()
           return the "move toolbars with main button" button.
 PreferencesManager getMyPrefs()
           return the user preferences manager.
 java.lang.String getOs()
           return the operating system of user.
static java.lang.String getPoliceName()
           return the name of the police used by the application.
 int getPosX()
           return the position (X) of the current window.
 int getPosY()
           return the position (Y) of the current window.
static int getResXMIN()
           return the X min resolution.
static int getResYMIN()
           return the Y min resolution.
 javax.swing.JFrame getRootFrame()
           return the root Kemet window.
 double[] getScreenRes()
           return the resolution of the screen.
 java.util.HashMap getTargetList()
           return list of target (which are contained in configuration XML file).
 int getToolBarCurrentNumber()
           return the toolBar current number.
 javax.swing.JLabel getToolbarFlag()
           return the showHide toolbars button.
 java.util.List<KemetToolBar> getToolBarList()
           return the list of toolbars.
 int getWindowHeight()
           return the height of the current window.
 int getWindowHeightTmp()
           return the temporary height of the current window.
 int getWindowWidth()
           return the width of the current window.
 int getWindowWidthTmp()
           return the temporary width of the current window.
 void init()
           load configuration XML file used by the application.
 boolean isCopyButtonFromButtonItself()
           the copy button from itself (drop panel) is allowed ?
 boolean isFullScreen()
           return if or not we are in fullscreen mode.
 boolean isSaveBeforeExit()
           save the content of the application before leaving ?
 void setApplicationXMLFileName(java.lang.String applicationXMLFileName)
           set name of configuration XML file.
 void setBtsDraggableFlavor(java.util.ArrayList<java.awt.datatransfer.DataFlavor> btsDraggableFlavor)
           set META informations about data of draggable buttons.
 void setCentralPanel(javax.swing.JPanel centralPanel)
           set the panel which contains window content.
 void setCopyButtonFromButtonItself(boolean copyButtonFromButtonItself)
           set to true the copy button from itself (drop panel).
static void setCurrentLoc(java.util.Locale currentLoc)
           set the current localization.
 void setFullScreen(boolean fullScreen)
           set the fullscreen mode.
 void setMenu(java.util.List<java.lang.Object[]> menu)
           set the list of JMenu for application.
 void setMinX(int minX)
           set the minimal width of the current window.
 void setMinY(int minY)
           set the minimal height of the current window.
 void setMoveAutoWindow(javax.swing.JLabel moveAutoWindow)
           set the "move automatically toolbars by relation with main button" button.
 void setMoveWindow(javax.swing.JLabel moveWindow)
           set the "move toolbars with main button" button.
static void setPoliceName(java.lang.String policeName)
           set the name of the police used by the application.
 void setPosX(int posX)
           set the position (X) of the current window.
 void setPosY(int posY)
           set the position (Y) of the current window.
 void setRootFrame(javax.swing.JFrame rootFrame)
           set the root Kemet window.
 void setSaveBeforeExit(boolean saveBeforeExit)
           set to true or false the flag "save content of the application before leaving ?".
 void setToolbarFlag(javax.swing.JLabel toolbarFlag)
           set the showHide toolbars button.
 void setToolBarList(java.util.List<KemetToolBar> toolBarList)
           set the list of toolbars.
 void setWindowHeight(int windowHeight)
           set the height of the current window.
 void setWindowHeightTmp(int windowHeightTmp)
           set the temporary height of the current window.
 void setWindowWidth(int windowWidth)
           set the width of the current window.
 void setWindowWidthTmp(int windowWidthTmp)
           set the temporary width of the current window.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

backgroundColorJMenu

public static final java.awt.Color backgroundColorJMenu

background color for JMenu.


backgroundColorMenuBar

public static final java.awt.Color backgroundColorMenuBar

background color for Menu Bar.

Method Detail

getInstance

public static GlobalKemet getInstance()
                               throws ExceptionManager

get the only one instance from GlobalKemet class.

Returns:
instance of GlobalKemet class
Throws:
ExceptionManager
Since:
0.3

init

public void init()
          throws ExceptionManager

load configuration XML file used by the application.

Throws:
ExceptionManager
Since:
0.3

getBtsDraggableFlavor

public java.util.ArrayList<java.awt.datatransfer.DataFlavor> getBtsDraggableFlavor()

return META informations about data from draggable buttons.

Returns:
META informations about data
Since:
0.3

setBtsDraggableFlavor

public void setBtsDraggableFlavor(java.util.ArrayList<java.awt.datatransfer.DataFlavor> btsDraggableFlavor)

set META informations about data of draggable buttons.

Parameters:
btsDraggableFlavor - META informations about data from draggable buttons
Since:
0.3

addBtDraggableFlavor

public void addBtDraggableFlavor(java.awt.datatransfer.DataFlavor btDraggableFlavor)
                          throws ExceptionManager

add META information about data of draggable button.

Parameters:
btDraggableFlavor - META information about data from draggable button
Throws:
ExceptionManager
Since:
0.3

getApplicationXMLFileName

public java.lang.String getApplicationXMLFileName()

return name of configuration XML file.

Returns:
name of configuration XML file
Since:
0.3

setApplicationXMLFileName

public void setApplicationXMLFileName(java.lang.String applicationXMLFileName)

set name of configuration XML file.

Parameters:
applicationXMLFileName - name of configuration XML file
Since:
0.3

getTargetList

public java.util.HashMap getTargetList()

return list of target (which are contained in configuration XML file).

Returns:
list of target
Since:
0.3

getMenu

public java.util.List<java.lang.Object[]> getMenu()

return the list of JMenu of application.

Returns:
list of JMenu of application
Since:
0.3

setMenu

public void setMenu(java.util.List<java.lang.Object[]> menu)

set the list of JMenu for application.

Parameters:
menu - list of JMenu for application
Since:
0.3

getOs

public java.lang.String getOs()

return the operating system of user.

Returns:
operating system of user
Since:
0.3

isSaveBeforeExit

public boolean isSaveBeforeExit()

save the content of the application before leaving ?

Returns:
true / false
Since:
0.3

setSaveBeforeExit

public void setSaveBeforeExit(boolean saveBeforeExit)

set to true or false the flag "save content of the application before leaving ?".

Parameters:
saveBeforeExit - true / false
Since:
0.3

getRootFrame

public javax.swing.JFrame getRootFrame()

return the root Kemet window.

Returns:
root Kemet window
Since:
0.3

setRootFrame

public void setRootFrame(javax.swing.JFrame rootFrame)

set the root Kemet window.

Parameters:
rootFrame - root Kemet window
Since:
0.3

getCentralPanel

public javax.swing.JPanel getCentralPanel()

return the panel which contains window content.

Returns:
the panel which contains window content
Since:
0.3

setCentralPanel

public void setCentralPanel(javax.swing.JPanel centralPanel)

set the panel which contains window content.

Parameters:
centralPanel - panel which contains window content
Since:
0.3

getWindowWidth

public int getWindowWidth()

return the width of the current window.

Returns:
the windowWidth
Since:
0.3

setWindowWidth

public void setWindowWidth(int windowWidth)

set the width of the current window.

Parameters:
windowWidth - width of the current window
Since:
0.3

getWindowHeight

public int getWindowHeight()

return the height of the current window.

Returns:
height of the current window
Since:
0.3

setWindowHeight

public void setWindowHeight(int windowHeight)

set the height of the current window.

Parameters:
windowHeight - height of the current window
Since:
0.3

getMinX

public int getMinX()

return the minimal width of the current window.

Returns:
minimal width of the current window
Since:
0.3

setMinX

public void setMinX(int minX)

set the minimal width of the current window.

Parameters:
minX - minimal width of the current window
Since:
0.3

getMinY

public int getMinY()

return the minimal height of the current window.

Returns:
minimal height of the current window
Since:
0.3

setMinY

public void setMinY(int minY)

set the minimal height of the current window.

Parameters:
minY - minimal height of the current window
Since:
0.3

getPosX

public int getPosX()

return the position (X) of the current window.

Returns:
the position (X) of the current window
Since:
0.3

setPosX

public void setPosX(int posX)

set the position (X) of the current window.

Parameters:
posX - position (X) of the current window
Since:
0.3

getPosY

public int getPosY()

return the position (Y) of the current window.

Returns:
position (Y) of the current window
Since:
0.3

setPosY

public void setPosY(int posY)

set the position (Y) of the current window.

Parameters:
posY - position (Y) of the current window
Since:
0.3

getWindowWidthTmp

public int getWindowWidthTmp()

return the temporary width of the current window.

Returns:
temporary width of the current window
Since:
0.3

setWindowWidthTmp

public void setWindowWidthTmp(int windowWidthTmp)

set the temporary width of the current window.

Parameters:
windowWidthTmp - temporary width of the current window
Since:
0.3

getWindowHeightTmp

public int getWindowHeightTmp()

return the temporary height of the current window.

Returns:
temporary height of the current window
Since:
0.3

setWindowHeightTmp

public void setWindowHeightTmp(int windowHeightTmp)

set the temporary height of the current window.

Parameters:
windowHeightTmp - temporary height of the current window
Since:
0.3

getPoliceName

public static java.lang.String getPoliceName()

return the name of the police used by the application.

Returns:
name of the police used by the application
Since:
0.3

setPoliceName

public static void setPoliceName(java.lang.String policeName)

set the name of the police used by the application.

Parameters:
policeName - name of the police used by the application
Since:
0.3

getBackgroundColorJMenu

public static java.awt.Color getBackgroundColorJMenu()

return the background color of JMenu.

Returns:
background color of JMenu
Since:
0.3

getBackgroundColorMenuBar

public static java.awt.Color getBackgroundColorMenuBar()

return the background color of menu bar.

Returns:
background color of menu bar
Since:
0.3

getMinSizeFont

public static int getMinSizeFont()

return the minimal size of the current font.

Returns:
minimal size of the current font
Since:
0.3

isCopyButtonFromButtonItself

public boolean isCopyButtonFromButtonItself()

the copy button from itself (drop panel) is allowed ?

Returns:
true / false
Since:
0.3

setCopyButtonFromButtonItself

public void setCopyButtonFromButtonItself(boolean copyButtonFromButtonItself)

set to true the copy button from itself (drop panel).

Parameters:
copyButtonFromButtonItself - true / false
Since:
0.3

getCurrentLoc

public static java.util.Locale getCurrentLoc()

return the current localization.

Returns:
current localization
Since:
0.4

setCurrentLoc

public static void setCurrentLoc(java.util.Locale currentLoc)

set the current localization.

Parameters:
currentLoc - the currentLoc to set
Since:
0.4

getToolBarList

public java.util.List<KemetToolBar> getToolBarList()

return the list of toolbars.

Returns:
toolBarList
Since:
0.4

setToolBarList

public void setToolBarList(java.util.List<KemetToolBar> toolBarList)

set the list of toolbars.

Parameters:
toolBarList - list of toolbars
Since:
0.4

add

public boolean add(KemetToolBar toolbar)

add a toolbar.

Parameters:
toolbar - toolbar to add
Returns:
true / false
Since:
0.4

getToolBarCurrentNumber

public int getToolBarCurrentNumber()

return the toolBar current number.

Returns:
toolBar current number
Since:
0.4

setToolbarFlag

public void setToolbarFlag(javax.swing.JLabel toolbarFlag)

set the showHide toolbars button.

Parameters:
toolbarFlag - the showHide toolbars button
Since:
0.4

getToolbarFlag

public javax.swing.JLabel getToolbarFlag()

return the showHide toolbars button.

Returns:
toolbarFlag
Since:
0.4

getScreenRes

public double[] getScreenRes()

return the resolution of the screen.

Returns:
the resolution of the screen
Since:
0.4

getResXMIN

public static int getResXMIN()

return the X min resolution.

Returns:
X min resolution
Since:
0.4

getResYMIN

public static int getResYMIN()

return the Y min resolution.

Returns:
Y min resolution
Since:
0.4

getMyPrefs

public PreferencesManager getMyPrefs()

return the user preferences manager.

Returns:
user preferences manager
Since:
0.4

getMoveWindow

public javax.swing.JLabel getMoveWindow()

return the "move toolbars with main button" button.

Returns:
"move toolbars with main button" button
Since:
0.4

setMoveWindow

public void setMoveWindow(javax.swing.JLabel moveWindow)

set the "move toolbars with main button" button.

Parameters:
moveWindow - "move toolbars with main button" button
Since:
0.4

getMoveAutoWindow

public javax.swing.JLabel getMoveAutoWindow()

return the "move automatically toolbars by relation with main button" button.

Returns:
"move automatically toolbars by relation with main button" button
Since:
0.4

setMoveAutoWindow

public void setMoveAutoWindow(javax.swing.JLabel moveAutoWindow)

set the "move automatically toolbars by relation with main button" button.

Parameters:
moveAutoWindow - "move automatically toolbars by relation with main button" button
Since:
0.4

isFullScreen

public boolean isFullScreen()

return if or not we are in fullscreen mode.

Returns:
true / false
Since:
0.4

setFullScreen

public void setFullScreen(boolean fullScreen)

set the fullscreen mode.

Parameters:
fullScreen - true / false
Since:
0.4


Copyright © 2008 F. MAUPIN. All Rights Reserved.