|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.event.MouseAdapter
org.stellarium.StelApp
public abstract class StelApp
Nested Class Summary | |
---|---|
static class |
StelApp.DATE_FORMAT
|
static class |
StelApp.DRAWMODE
Possible drawing modes |
static class |
StelApp.TIME_FORMAT
|
static class |
StelApp.TZ_FORMAT
|
Field Summary | |
---|---|
private StelCommandInterface
|
commander
interface to perform all UI and scripting actions |
private IniFileParser
|
conf
|
private static StelCore |
core
The associcated StelCore instance FRED: Made it static, you can have only one core, and too many parameters to pass the core elements... |
(package private)
java.lang.String |
customTzName
Something like "Europe/Paris" |
private StelApp.DATE_FORMAT
|
dateFormat
|
private ViewportDistorter
|
distorter
|
private StelApp.DRAWMODE |
drawMode
|
private boolean |
enableMoveMouse
allow mouse at edge of screen to move view |
private boolean |
flagTimePause
|
private double |
fps
|
private int |
frame
Used for fps counter |
(package private) double |
gmtShift
Time shift between GMT time and local time in hour. |
protected boolean |
initialized
|
private boolean |
is_mouse_moving_horiz
|
private boolean |
is_mouse_moving_vert
|
private float |
maxFPS
|
private float |
minFPS
|
private int |
mouseZoom
|
private java.lang.String |
positionFile
|
private double |
presetSkyTime
|
protected int |
screenH
Screen size |
protected int |
screenW
Screen size |
private ScriptMgr |
scripts
manage playing and recording scripts |
private java.lang.String |
selectedScript
script filename (without directory) selected in a UI to run when exit UI |
private java.lang.String |
selectedScriptDirectory
script directory for same |
private java.lang.String |
startupTimeMode
|
private double |
temp_time_velocity
|
private int |
timeBase
Used for fps counter |
private StelApp.TIME_FORMAT
|
timeFormat
|
private int |
timefr
Used for fps counter |
private int |
timeMultiplier
used for adjusting delta_time for script speeds |
(package private) StelApp.TZ_FORMAT |
timeZoneMode
Can be the system default or a user defined value |
private StelUI |
ui
The main User Interface |
Constructor Summary | |
---|---|
StelApp()
|
Method Summary | |
---|---|
private void |
appInitGL()
|
double |
draw(int deltaTime)
Draw all / Main drawinf function called at each frame |
java.lang.String |
getAppLanguage()
|
StelCommandInterface
|
getCommander()
|
IniFileParser
|
getConf()
|
static StelCore |
getCore()
|
java.lang.String |
getCustomTzName()
|
java.lang.String |
getDateFormatStr()
|
double |
getFps()
|
double |
getGMTShift(double jd)
Return the current time shift at observator time zone with respect to GMT time |
double |
getGMTShift(double jd,
boolean isLocal)
Return the current time shift at observator time zone with respect to GMT time |
java.lang.String |
getISO8601TimeLocal(double JD)
|
double |
getMouseCursorTimeout()
|
int |
getMouseZoom()
|
double |
getPresetSkyTime()
|
java.lang.String |
getPrintableDateLocal(double jd)
Return a String with the local date formated according to the date_format variable |
java.lang.String |
getPrintableDateUTC(double jd)
Return a String with the UTC date formated according to the date_format variable |
java.lang.String |
getPrintableTimeLocal(double jd)
Return a String with the local time (according to time_zone_mode variable) formated according to the time_format variable. |
java.lang.String |
getPrintableTimeUTC(double jd)
Tree.Return a String with the UTC time formated according to the time_format variable |
ScriptMgr |
getScripts()
|
java.lang.String |
getSelectedScript()
|
java.lang.String |
getStartupTimeMode()
|
double |
getTempTimeVelocity()
|
java.lang.String |
getTimeFormatStr()
|
int |
getTimeMultiplier()
|
(package private) StelApp.TZ_FORMAT |
getTzFormat()
|
StelUI |
getUi()
|
java.util.List<java.lang.String>
|
getVideoModeList()
Return a list of working fullscreen hardware video modes (one per line) |
java.lang.String |
getViewPortDistorterType()
|
boolean |
getVisionModeChart()
Get flag for activating chart vision mode |
boolean |
getVisionModeNight()
Get flag for activating night vision mode |
void |
init()
Initialize application and core |
void |
initData()
|
protected void |
initFromGLInit()
|
protected abstract void |
initSDL(int screenW,
int screenH, int bbpMode, boolean fullScreen)
|
boolean |
isFlagTimePause()
|
boolean |
isVisionModeNormal()
Get flag for activating chart vision mode |
void |
keyPressed(java.awt.event.KeyEvent e)
|
void |
keyReleased(java.awt.event.KeyEvent e)
|
void |
keyTyped(java.awt.event.KeyEvent e)
|
void |
mouseClicked(java.awt.event.MouseEvent e)
|
void |
mouseDragged(java.awt.event.MouseEvent e)
|
void |
mouseMoved(java.awt.event.MouseEvent e)
|
void |
playStartupScript()
|
void |
quit()
Quit the application |
void |
recordCommand(java.lang.String commandline)
Required because stelcore doesn't have access to the script manager anymore! |
void |
restoreFrom2DfullscreenProjection()
Restore previous projection mode |
void |
saveCurrentConfig(IniFileParser conf)
|
private java.lang.String |
sDateFormatToString(StelApp.DATE_FORMAT df)
|
void |
set2DfullscreenProjection()
Set the drawing mode in 2D for drawing in the full screen |
void |
setAppLanguage(java.lang.String newAppLocaleName)
Set the application language This applies to GUI, console messages etc.. |
void |
setCustomTimezone(java.lang.String timeZoneId)
|
void |
setCustomTzName(java.lang.String tzname)
Set a custom time zone. |
void |
setDateFormatStr(java.lang.String df)
|
void |
setFlagTimePause(boolean flagTimePause)
|
void |
setGMTShift(int t)
Set the current time shift at observator time zone with respect to GMT time |
void |
setPresetSkyTime(double presetSkyTime)
|
void |
setSelectedScript(java.lang.String selectedScript)
|
void |
setSelectedScriptDirectory(java.lang.String selectedScriptDirectory)
|
void |
setStartupTimeMode(java.lang.String startupTimeMode)
|
void |
setTempTimeVelocity(double tempTimeVelocity)
|
void |
setTimeFormatStr(java.lang.String tf)
|
void |
setTimeMultiplier(int timeMultiplier)
|
void |
setViewPortDistorterType(java.lang.String type)
|
void |
setVisionModeChart()
Set flag for activating chart vision mode |
void |
setVisionModeNight()
Set flag for activating night vision mode |
void |
setVisionModeNormal()
Set flag for activating chart vision mode ["color" section name used for easier backward compatibility for older configs - Rob] |
abstract void |
startMainLoop()
Start the main loop until the end of the execution |
private java.lang.String |
sTimeFormatToString(StelApp.TIME_FORMAT tf)
|
private StelApp.DATE_FORMAT
|
stringToSDateFormat(java.lang.String df)
Convert the date format enum to its associated String and reverse |
private StelApp.TIME_FORMAT
|
stringToSTimeFormat(java.lang.String tf)
Convert the time format enum to its associated String and reverse |
void |
update(int deltaTime)
Update all object according to the delta time |
Methods inherited from class java.awt.event.MouseAdapter |
---|
mouseEntered, mouseExited, mousePressed, mouseReleased |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.stellarium.ApplicationCallback |
---|
orderRepaint |
Field Detail |
---|
private IniFileParser conf
private static StelCore core
private java.lang.String selectedScript
private java.lang.String selectedScriptDirectory
private java.lang.String positionFile
private boolean enableMoveMouse
private double presetSkyTime
private java.lang.String startupTimeMode
private int mouseZoom
private int frame
private int timefr
private int timeBase
private double fps
private float minFPS
private float maxFPS
private boolean flagTimePause
private double temp_time_velocity
private boolean is_mouse_moving_horiz
private boolean is_mouse_moving_vert
private int timeMultiplier
private StelCommandInterface commander
private ScriptMgr scripts
private StelUI ui
private ViewportDistorter distorter
private StelApp.DRAWMODE drawMode
protected boolean initialized
private StelApp.TIME_FORMAT timeFormat
private StelApp.DATE_FORMAT dateFormat
StelApp.TZ_FORMAT timeZoneMode
java.lang.String customTzName
double gmtShift
protected int screenW
protected int screenH
Constructor Detail |
---|
public StelApp() throws StellariumException
StellariumException
Method Detail |
---|
public static StelCore getCore()
public java.lang.String getPrintableDateUTC(double jd) throws StellariumException
jd
- The Julian day
StellariumException
- If the current date format is not supported
public java.lang.String getISO8601TimeLocal(double JD)
public java.lang.String getPrintableDateLocal(double jd) throws StellariumException
jd
- The Julian day
StellariumException
- If the current date format is not supported
public java.lang.String getPrintableTimeUTC(double jd) throws StellariumException
jd
- The Julian day
StellariumException
- If the current time format is not supported
private StelApp.DATE_FORMAT stringToSDateFormat(java.lang.String df)
df
- The date format parameter ("system_default", "mmddyyyy", "ddmmyyyy", "yyyymmdd")
private java.lang.String sDateFormatToString(StelApp.DATE_FORMAT df)
public java.lang.String getPrintableTimeLocal(double jd) throws StellariumException
jd
- The Julian day
StellariumException
- If the current time format is not supported
public void setGMTShift(int t)
t
- The new value
public java.lang.String getCustomTzName()
StelApp.TZ_FORMAT getTzFormat()
public void setCustomTzName(java.lang.String tzname)
tzname
- The name of the time zone.
public double getGMTShift(double jd)
jd
- The Julian day
public double getGMTShift(double jd, boolean isLocal)
jd
- The Julian day
isLocal
-
private StelApp.TIME_FORMAT stringToSTimeFormat(java.lang.String tf)
tf
- The time format parameter ("system_default", "24h", "12h")
private java.lang.String sTimeFormatToString(StelApp.TIME_FORMAT tf)
public void setViewPortDistorterType(java.lang.String type) throws StellariumException
StellariumException
public java.lang.String getViewPortDistorterType()
public void init() throws StellariumException
StellariumException
public void initData()
protected void initFromGLInit()
private void appInitGL()
protected abstract void initSDL(int screenW, int screenH, int bbpMode, boolean fullScreen)
public void update(int deltaTime) throws StellariumException
deltaTime
- The time that elapsed.
StellariumException
public double draw(int deltaTime)
public abstract void startMainLoop()
public int getTimeMultiplier()
public void mouseClicked(java.awt.event.MouseEvent e)
mouseClicked
in interface java.awt.event.MouseListener
mouseClicked
in class java.awt.event.MouseAdapter
public void mouseMoved(java.awt.event.MouseEvent e)
mouseMoved
in interface java.awt.event.MouseMotionListener
public void mouseDragged(java.awt.event.MouseEvent e)
mouseDragged
in interface java.awt.event.MouseMotionListener
public void keyTyped(java.awt.event.KeyEvent e)
keyTyped
in interface java.awt.event.KeyListener
public void keyPressed(java.awt.event.KeyEvent e)
keyPressed
in interface java.awt.event.KeyListener
public void keyReleased(java.awt.event.KeyEvent e)
keyReleased
in interface java.awt.event.KeyListener
public void quit()
quit
in interface ApplicationCallback
public void playStartupScript()
public void setAppLanguage(java.lang.String newAppLocaleName)
newAppLocaleName
- The name of the language (e.g fr) to use for GUI, TUI and console messages
etc..
public java.lang.String getAppLanguage()
public void setVisionModeNight() throws StellariumException
StellariumException
public boolean getVisionModeNight()
public void setVisionModeChart() throws StellariumException
StellariumException
public boolean getVisionModeChart()
public void setVisionModeNormal() throws StellariumException
StellariumException
public boolean isVisionModeNormal()
public IniFileParser getConf()
public void saveCurrentConfig(IniFileParser conf) throws StellariumException
StellariumException
public double getMouseCursorTimeout()
public java.util.List<java.lang.String> getVideoModeList()
public void recordCommand(java.lang.String commandline)
recordCommand
in
interface ApplicationCallback
commandline
- The command text to record
public java.lang.String getTimeFormatStr()
public void setTimeFormatStr(java.lang.String tf)
public java.lang.String getDateFormatStr()
public void setDateFormatStr(java.lang.String df)
public void setCustomTimezone(java.lang.String timeZoneId)
public void set2DfullscreenProjection()
public void restoreFrom2DfullscreenProjection()
public double getFps()
public StelCommandInterface getCommander()
public int getMouseZoom()
public void setPresetSkyTime(double presetSkyTime)
public double getPresetSkyTime()
public void setStartupTimeMode(java.lang.String startupTimeMode)
public java.lang.String getStartupTimeMode()
public java.lang.String getSelectedScript()
public void setSelectedScript(java.lang.String selectedScript)
public void setSelectedScriptDirectory(java.lang.String selectedScriptDirectory)
public void setTimeMultiplier(int timeMultiplier)
public ScriptMgr getScripts()
public StelUI getUi()
public boolean isFlagTimePause()
public void setFlagTimePause(boolean flagTimePause)
public double getTempTimeVelocity()
public void setTempTimeVelocity(double tempTimeVelocity)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |