|
jWorkSheet release 0.90 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.ponec.jworksheet.core.ApplContext
public class ApplContext
A Main Application Context
Field Summary | |
---|---|
protected WorkDay |
currentDay
|
static java.lang.String |
EXTENSION_TMP
A temporarry extension |
static java.lang.String |
FILE_DATA
Data XML File |
static java.lang.String |
FILE_LOCK
Lock File |
static java.lang.String |
FILE_MODULES
Subdirectory of modules |
static java.lang.String |
FILE_STYLES
Style subdirectory |
static boolean |
LANGUAGE_MANAGER_ENABLED
Is the language manager enabled? |
protected LanguageManager |
languageManager
LanguageMananer |
static java.lang.String |
MODULE_ENTRY
|
protected Parameters |
parameters
Parameters of the application. |
protected int |
timeInterval
|
protected long |
timeSaveExpected
Last Saved Time |
protected JWorkSheet |
topFrame
Basic window |
protected WorkSpace |
workSpace
|
Constructor Summary | |
---|---|
ApplContext()
Creates a new instance of ApplContext |
Method Summary | |
---|---|
void |
closeAppl(boolean closeWindow)
Close The Application (no exit) |
void |
createExitEvent()
Create an Exit row, if it is enabled. |
boolean |
createLock(boolean force)
Create new lock. |
void |
deleteTempFiles()
Delete all temporarry files from a Config Directory. |
Event |
findLastEventToday()
Returns the Last Event Today, or null. |
void |
fireModuleEvent()
File an module event. |
java.io.File |
getConfigDir()
Configuration Directory |
java.io.File |
getConfigFile()
Configuration Directory |
java.io.File |
getDataFile()
Data File |
java.io.File |
getDataFileBackup()
Data File Backup |
java.io.File |
getDataFileTemp()
Data File for a temporarry usage. |
float |
getDataVersion()
Returns an old version. |
java.util.Locale |
getLanguage()
Current Language |
LanguageManager |
getLanguageManager()
Returns manager |
java.util.List<MetaReport> |
getMetaReports()
Get Sorted Reports. |
java.io.File |
getModulesDir()
Get Modules directory and create one if the directory is missing. |
Parameters |
getParameters()
Parameters of the application. |
YearMonthDay |
getSelectedDay()
Get "Selected Day" - don't modify it! |
java.lang.String |
getSelectedDayStr()
GetCurrentDay |
java.io.File |
getStyleDir()
Style Directory |
java.io.File |
getStyleFile(java.lang.String fileName)
Get a style file |
javax.swing.JTabbedPane |
getTabbedPane()
Get a main Tabbed pane of the application |
java.lang.String |
getTagContent(java.io.File file,
java.lang.String tagName)
Returns a tag content. |
JWorkSheet |
getTopFrame()
Get JWorkSheet |
WorkDay |
getWorkDay()
Get Work Day |
WorkSpace |
getWorkSpace()
Returns WorkSpace |
void |
initModules()
|
boolean |
isDataRestored()
Warning: data is restored from a backup! |
boolean |
isStarting()
Does application starting |
boolean |
isSystrayEnabled()
Systray is enabled in case a parameter is supported AND system is supported too |
boolean |
isToday()
Is selected time Today? |
void |
loadData()
Load Parameters & Data. |
protected void |
loadParameters()
Load parameters from file. |
void |
run()
Save data (file: data.xml) |
void |
saveData(boolean includeParams)
Save data into file(s) |
void |
saveParameters()
Save parameters into file. |
void |
saveStyleFiles()
Save styles into config directory. |
void |
selectWorkDay(YearMonthDay workDay)
Select a WorkDay by parameter |
void |
setInitialized()
Initializaton flag |
void |
setSystrayTooltip()
Display a Tooltip into a Systray |
void |
setTopFrame(JWorkSheet topFrame,
boolean showDebugWindow)
Set JWorkSheet |
void |
setUserConfigDir(java.lang.String userConfigDir)
Set a user configuration directory |
void |
showReport(java.lang.String report)
Show report in a browser. |
void |
showReport(java.lang.String aData,
java.io.File aXsl,
java.util.ArrayList<java.lang.String[]> params)
Show a report in HTML viewer: |
void |
tableChanged(javax.swing.event.TableModelEvent e)
Save a data in a special thread, if data is changed (TableModelListener). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final boolean LANGUAGE_MANAGER_ENABLED
public static final java.lang.String FILE_LOCK
public static final java.lang.String FILE_DATA
public static final java.lang.String FILE_STYLES
public static final java.lang.String FILE_MODULES
public static final java.lang.String EXTENSION_TMP
public static final java.lang.String MODULE_ENTRY
protected JWorkSheet topFrame
protected LanguageManager languageManager
protected Parameters parameters
protected WorkSpace workSpace
protected WorkDay currentDay
protected long timeSaveExpected
protected final int timeInterval
Constructor Detail |
---|
public ApplContext()
Method Detail |
---|
public WorkSpace getWorkSpace()
getWorkSpace
in interface JwsContext
public void loadData()
public void initModules()
public void saveData(boolean includeParams)
public void closeAppl(boolean closeWindow)
public void createExitEvent()
public java.io.File getConfigDir()
getConfigDir
in interface JwsContext
public java.io.File getStyleDir()
getStyleDir
in interface JwsContext
public java.io.File getModulesDir()
public java.io.File getConfigFile()
getConfigFile
in interface JwsContext
public java.io.File getDataFile()
getDataFile
in interface JwsContext
public java.io.File getDataFileTemp() throws java.io.IOException
getDataFileTemp
in interface JwsContext
java.io.IOException
public void deleteTempFiles()
public java.io.File getDataFileBackup()
getDataFileBackup
in interface JwsContext
public java.io.File getStyleFile(java.lang.String fileName)
getStyleFile
in interface JwsContext
public YearMonthDay getSelectedDay()
getSelectedDay
in interface JwsContext
public java.lang.String getSelectedDayStr()
public boolean isToday()
isToday
in interface JwsContext
public java.util.Locale getLanguage()
getLanguage
in interface JwsContext
public void selectWorkDay(YearMonthDay workDay)
getWorkDay()
public WorkDay getWorkDay()
getWorkDay
in interface JwsContext
public void tableChanged(javax.swing.event.TableModelEvent e)
tableChanged
in interface javax.swing.event.TableModelListener
public void run()
run
in interface java.lang.Runnable
public boolean createLock(boolean force)
public Parameters getParameters()
getParameters
in interface JwsContext
protected void loadParameters()
public void saveStyleFiles()
public void saveParameters()
public void setInitialized()
public boolean isStarting()
JwsContext
isStarting
in interface JwsContext
public void fireModuleEvent()
public float getDataVersion()
public java.lang.String getTagContent(java.io.File file, java.lang.String tagName) throws java.io.IOException
java.io.IOException
public JWorkSheet getTopFrame()
getTopFrame
in interface JwsContext
public void setTopFrame(JWorkSheet topFrame, boolean showDebugWindow)
public void setUserConfigDir(java.lang.String userConfigDir)
public void showReport(java.lang.String aData, java.io.File aXsl, java.util.ArrayList<java.lang.String[]> params) throws javax.xml.transform.TransformerConfigurationException, javax.xml.transform.TransformerException, java.io.IOException
aData
- Null value means a BasicDataFileaXsl
-
javax.xml.transform.TransformerConfigurationException
javax.xml.transform.TransformerException
java.io.IOException
public java.util.List<MetaReport> getMetaReports()
public boolean isSystrayEnabled()
isSystrayEnabled
in interface JwsContext
public Event findLastEventToday()
public void setSystrayTooltip()
public void showReport(java.lang.String report) throws java.io.IOException
java.io.IOException
public boolean isDataRestored()
public LanguageManager getLanguageManager()
public javax.swing.JTabbedPane getTabbedPane()
getTabbedPane
in interface JwsContext
|
jWorkSheet release 0.90 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |