org.stellarium
Class StelCore

java.lang.Object
  extended by java.awt.event.MouseAdapter
      extended by org.stellarium.StelCore
All Implemented Interfaces:
java.awt.event.KeyListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.util.EventListener

public class StelCore
extends java.awt.event.MouseAdapter
implements java.awt.event.KeyListener, java.awt.event.MouseMotionListener

Main class for Stellarium.

Manage all the objects to be used in the program.

Version:
0.8.2
Author:
Jérôme Beau, Fred Simon
See Also:
stel_core.cpp, stel_core.h

Nested Class Summary
static class StelCore.FontParam
           
static class StelCore.MOUNT_MODE
           
 
Field Summary
private  ApplicationCallback applicationCallback
           
private  ConstellationMgr asterisms
          Manage constellations (boundaries, names etc..)
private  StelAtmosphere atmosphere
          Atmosphere
private  float autoMoveDuration
          Duration of movement for the auto move to a selected object
(package private)  SkyGrid aziGrid
          Azimutal grid
(package private)  java.lang.String baseFontFile
          The font file used by default during initialization
(package private)  Cardinals cardinalsPoints
          Cardinals points
(package private)  SColor chartColor
          ?
(package private)  float constellationFontSize
          size for constellation labels
(package private)  double deltaAlt
          View movement
(package private)  double deltaAz
          View movement
(package private)  double deltaFov
          View movement
(package private)  SkyLine eclipticLine
          Eclptic line
(package private)  SkyLine equatorLine
          Celestial Equator line
(package private)  SkyGrid equGrid
          Equatorial grid
(package private)  boolean firstTime
          For init to track if reload or first time setup
(package private)  boolean flagEnableMoveKeys
           
(package private)  boolean flagEnableZoomKeys
           
private  boolean flagManualZoom
          Define whether auto zoom can go further
private static float FontSizeCardinalPoints
           
private static float FontSizeConstellations
           
private static float FontSizeGeneral
           
private static float FontSizeSolarSystem
           
(package private)  HipStarMgr hipStars
          Manage the hipparcos stars
(package private)  float initFov
          Default viewing FOV
(package private)  javax.vecmath.Point3d initViewPos
          Default viewing direction
(package private)  Landscape landscape
          The landscape ie the fog, the ground and "decor"
protected  LoadingBar loadingBar
           
private  java.lang.String localeDir
          The directory containing the translation .mo file
(package private)  SkyLine meridianLine
          Meridian line
(package private)  MeteorMgr meteors
          Manage meteor showers
(package private)  MilkyWay milkyWay
          Our galaxy
(package private)  double moveSpeed
          Speed of movement and zooming
private  Navigator navigation
          Manage all navigation parameters, coordinate transformations etc..
(package private)  NebulaMgr nebulas
          Manage the nebulas
(package private)  boolean objectPointerVisibility
          Should selected object pointer be drawn
private  Observator observatory
          Manage observer position and locales for its country
private  DefaultProjector projection
          Manage the projection mode and matrix
(package private)  ImageMgr scriptImages
          for script loaded image display
private  StelObject selectedObject
          The selected object in stellarium
(package private)  float skyBrightness
          Current sky Brightness in ?
private  java.lang.String skyCultureDir
          The directory containing data for the culture used for constellations, etc.
private  SkyLocalizer skyloc
          For sky cultures and locales
private  Translator skyTranslator
          The translator used for astronomical object naming
 SolarSystem ssystem
          Manage the solar system
private  TelescopeMgr telescopeMgr
          For managing connected telescopes
private  ToneReproductor toneConverter
          Tones conversion between stellarium world and display device
(package private)  double zoomSpeed
          Speed of movement and zooming
 
Constructor Summary
StelCore(ApplicationCallback applicationCallback)
           
 
Method Summary
 void autoZoomIn(float moveDuration)
          Go and zoom to the selected object.
 void autoZoomIn(float moveDuration, boolean allowManualZoom)
           
 void autoZoomOut(float moveDuration)
          Unzoom and go to the init position
 void autoZoomOut(float moveDuration, boolean full)
           
 StelObject cleverFind(int x, int y)
          Find in a "clever" way an object from its screen position
(package private)  StelObject cleverFind(javax.vecmath.Point3d v)
          Find in a "clever" way an object from its equatorial position
 void close()
           
 void dragView(int x1, int y1, int x2, int y2)
          Make the first screen position correspond to the second (useful for mouse dragging)
(package private)  double draw(int deltaTime)
          Execute all the drawing functions
private  void drawChartBackground()
           
protected  void finalize()
           
(package private)  boolean findAndSelect(int x, int y)
          Find and select an object near given screen position
 boolean findAndSelect(javax.vecmath.Point3d pos)
          Find and select an object near given equatorial position
 boolean findAndSelectI18n(java.lang.String nameI18n)
          Find and select an object from its translated name
 double getAimFov()
          If is currently zooming, return the target FOV, otherwise return current FOV
 float getAtmosphereFadeDuration()
          Get atmosphere fade duration in s
 float getAutoMoveDuration()
          Get automove duration in seconds
 SColor getColorAzimutalGrid()
           
 SColor getColorCardinalPoints()
          Get Cardinals Points color
 SColor getColorConstellationBoundaries()
           
 SColor getColorConstellationLine()
          Get constellation line color
 SColor getColorConstellationNames()
          Get constellation names color
 SColor getColorEclipticLine()
           
 SColor getColorEquatorGrid()
           
 SColor getColorEquatorLine()
           
 SColor getColorMeridianLine()
           
 SColor getColorNebulaCircle()
           
 SColor getColorNebulaLabels()
           
 SColor getColorPlanetsNames()
           
 SColor getColorPlanetsOrbits()
           
 SColor getColorPlanetsTrails()
           
(package private)  SColor getColorStarCircles()
           
(package private)  SColor getColorStarNames()
           
 double getConstellationArtFadeDuration()
          Get constellation art intensity
 double getConstellationArtIntensity()
          Get constellation art intensity
private  java.lang.String getCursorPos(int x, int y)
           
 java.lang.String getDataDir()
          Get the name of the directory containing the data
 boolean getFlagAtmosphere()
          Get flag for displaying Atmosphere
 boolean getFlagAzimutalGrid()
          Get flag for displaying Azimutal Grid
 boolean getFlagBrightNebulae()
          Get flag for displaying Nebulae as brigth
 boolean getFlagCardinalsPoints()
          Get flag for displaying Cardinals Points
 boolean getFlagConstellationArt()
          Get display flag of constellation art
 boolean getFlagConstellationBoundaries()
          Get display flag of constellation boundaries
 boolean getFlagConstellationIsolateSelected()
          Get whether selected constellation is drawn alone
 boolean getFlagConstellationLines()
          Get display flag of constellation lines
 boolean getFlagConstellationNames()
          Get display flag of constellation names.
 boolean getFlagEclipticLine()
          Get flag for displaying Ecliptic Line
 boolean getFlagEquatorGrid()
          Get flag for displaying Equatorial Grid
 boolean getFlagEquatorLine()
          Get flag for displaying Equatorial Line
 boolean getFlagFog()
          Get flag for displaying Fog
 boolean getFlagGravityLabels()
          Get flag for enabling gravity labels
 boolean getFlagHasSelected()
          Return whether an object is currently selected
 boolean getFlagLandscape()
          Get flag for displaying Landscape
 boolean getFlagLightTravelTime()
           
 boolean getFlagLockSkyPosition()
          Set whether sky position is locked
 boolean getFlagManualAutoZoom()
          Get whether auto zoom can go further than normal
 boolean getFlagMeridianLine()
          Get flag for displaying Meridian Line
 boolean getFlagMilkyWay()
          Get flag for displaying Milky Way
 boolean getFlagMoonScaled()
          Get flag for displaying a scaled Moon
 boolean getFlagNebula()
          Get flag for displaying Nebulae
 boolean getFlagNebulaDisplayNoTexture()
          Get flag for displaying Nebulae without textures
 boolean getFlagNebulaHints()
          Get flag for displaying Nebulae Hints
 boolean getFlagPlanets()
          Get flag for displaying Planets
 boolean getFlagPlanetsHints()
          Get flag for displaying Planets Hints
 boolean getFlagPlanetsOrbits()
          Get flag for displaying Planets Orbits
 boolean getFlagPlanetsTrails()
          Get flag for displaying Planets Trails
 boolean getFlagPointStar()
           
 boolean getFlagStarName()
           
 boolean getFlagStars()
           
(package private)  boolean getFlagStarSciName()
           
 boolean getFlagStarTwinkle()
           
(package private)  boolean getFlagTelescopeName()
           
(package private)  boolean getFlagTelescopes()
           
 boolean getFlagTracking()
          Get object tracking
 boolean getFlipHorz()
          get/set horizontal/vertical image flip
 boolean getFlipVert()
           
 void getFontForLocale(java.lang.String _locale, StelCore.FontParam _font, StelCore.FontParam _fixedFont)
          TESTING font file and scaling to use for a given locale
 double getFov()
          Get current FOV (in degree)
 ImageMgr getImageMgr()
          Return the current image manager which display users images
(package private)  boolean getIsTimeNow()
          Get wether the current stellarium time is the real world time
 double getJDay()
          Get the current date in Julian Day
 java.lang.String getLandscapeAuthorName()
           
 java.lang.String getLandscapeDescription()
           
 java.lang.String getLandscapeName()
           
 LoadingBar getLoadingBar()
           
 float getMaxMagStarName()
           
(package private)  float getMaxMagStarSciName()
           
 int getMeteorsRate()
          Get Meteor Rate in number per hour
 float getMilkyWayIntensity()
          Get Milky Way intensity
 float getMoonScale()
          Get Moon scale
 StelCore.MOUNT_MODE getMountMode()
          Get current mount type
 Navigator getNavigation()
           
 double getNebulaCircleScale()
          Get Nebulae Hints circle scale
 float getNebulaMaxMagHints()
          Get maximum magnitude at which nebulae hints are displayed
 Observator getObservatory()
          Return the current observatory (as a object)
 java.lang.String getPlanetHashString()
          For use by TUI
 double getPlanetsScale()
          Get base planets display scaling factor
 DefaultProjector getProjection()
           
 java.lang.String getProjectionType()
          Get the projection type
 StelObject getSelectedObject()
           
 java.lang.String getSelectedObjectInfo()
          Get a multiline String describing the currently selected object
 SColor getSelectedObjectInfoColor()
          Get a color used to display info about the currently selected object
 java.lang.String getSelectedObjectShortInfo()
          Get a 1 line String briefly describing the currently selected object
 java.lang.String getSkyCulture()
          Get the current sky culture I18 name
 java.lang.String getSkyCultureDir()
           
 java.lang.String getSkyCultureHash()
           
 java.lang.String getSkyCultureListI18()
          Get the I18 available sky culture names
 java.lang.String getSkyLanguage()
           
(package private)  float getStarLimitingMag()
           
 float getStarMagScale()
           
 float getStarScale()
           
 float getStarTwinkleAmount()
           
 double getTimeSpeed()
          Get time speed in JDay/sec
 Translator getTranslator()
           
 int getViewportHeight()
          Get viewport height
 int getViewportHorizontalOffset()
          Get the horizontal viewport offset in pixels
 boolean getViewportMaskDisk()
          Get whether a disk mask must be drawn over the viewport
 int getViewportPosX()
          Get viewport X position
 int getViewportPosY()
          Get viewport Y position
 int getViewportVerticalOffset()
          Get the vertical viewport offset in pixels
 int getViewportWidth()
          Get viewport width
 double getZoomSpeed()
           
 void gotoSelectedObject()
          Go to the selected object
 void initData(IniFileParser conf)
           
 boolean initGL1(IniFileParser conf)
          Load core data and initialize with default values
 boolean initGL2(IniFileParser conf)
           
 boolean initGL3(IniFileParser conf)
           
 void keyPressed(java.awt.event.KeyEvent keyEvent)
           
 void keyReleased(java.awt.event.KeyEvent keyEvent)
           
 void keyTyped(java.awt.event.KeyEvent keyEvent)
           
(package private)  java.util.List<java.lang.String> listMatchingObjectsI18n(java.lang.String objPrefix)
           
 java.util.List<java.lang.String> listMatchingObjectsI18n(java.lang.String objPrefix, int maxNbItem)
          Find and return the list of at most maxNbItem objects auto-completing the passed object I18n name
 boolean loadLandscape(java.util.Map<java.lang.String,java.lang.String> param)
          Load a landscape based on a hash of parameters mirroring the landscape.ini file and make it the current landscape
(package private)  void loadObservatory()
           
 void mouseClicked(java.awt.event.MouseEvent e)
          Handle mouse clics
 void mouseDragged(java.awt.event.MouseEvent e)
           
 void mouseMoved(java.awt.event.MouseEvent e)
          Handle mouse move
 void moveObserver(double lat, double lon, double alt, int delay, java.lang.String name)
          Move to a new latitude and longitude on home planet
 void panView(double delta_az, double delta_alt)
          Move view in alt/az (or equatorial if in that mode) coordinates
 void printGravity(SFontIfc font, float x, float y, java.lang.String str)
          Print the passed String so that it is oriented in the drection of the gravity
 void printGravity(SFontIfc font, float x, float y, java.lang.String str, boolean speedOptimize, float xshift, float yshift)
           
 void repaint()
           
private  StelObject searchByNameI18n(java.lang.String name)
          Find any kind of object by the name
private  boolean selectObject(StelObject obj)
          Select passed object
 boolean selectObject(java.lang.String type, java.lang.String id)
          Find and select an object based on selection type and standard name or number
 void setAtmosphereFadeDuration(float f)
          Set atmosphere fade duration in s
 void setAutoMoveDuration(float f)
          Set automove duration in seconds
 void setColorAzimutalGrid(SColor v)
           
 void setColorCardinalPoints(SColor v)
          Set Cardinals Points color
 void setColorConstellationBoundaries(SColor v)
           
 void setColorConstellationLine(SColor v)
          Set constellation line color
 void setColorConstellationNames(SColor v)
          Set constellation names color
 void setColorEclipticLine(SColor v)
           
 void setColorEquatorGrid(SColor v)
           
 void setColorEquatorLine(SColor v)
           
 void setColorMeridianLine(SColor v)
           
 void setColorNebulaCircle(SColor v)
           
 void setColorNebulaLabels(SColor v)
           
 void setColorPlanetsNames(SColor v)
           
 void setColorPlanetsOrbits(SColor v)
           
 void setColorPlanetsTrails(SColor v)
           
(package private)  void setColorScheme(IniFileParser conf, java.lang.String section)
          Please keep saveCurrentSettings up to date with any new color settings added here
(package private)  void setColorStarCircles(SColor v)
           
(package private)  void setColorStarNames(SColor v)
           
 void setConstellationArtFadeDuration(float f)
          Set constellation art intensity
 void setConstellationArtIntensity(float f)
          Set constellation art intensity
 void setFlagAtmosphere(boolean b)
          Set flag for displaying Atmosphere
 void setFlagAzimutalGrid(boolean b)
          Set flag for displaying Azimutal Grid
 void setFlagBrightNebulae(boolean b)
          Set flag for displaying Nebulae as bright
 void setFlagCardinalsPoints(boolean b)
          Set flag for displaying Cardinals Points
 void setFlagConstellationArt(boolean b)
          Set display flag of constellation art
 void setFlagConstellationBoundaries(boolean b)
          Set display flag of constellation boundaries
 void setFlagConstellationIsolateSelected(boolean b)
          Set whether selected constellation is drawn alone
 void setFlagConstellationLines(boolean b)
          Set display flag of constellation lines
 void setFlagConstellationNames(boolean b)
          Set display flag of constellation names
 void setFlagEclipticLine(boolean b)
          Set flag for displaying Ecliptic Line
 void setFlagEquatorGrid(boolean b)
          Set flag for displaying Equatorial Grid
 void setFlagEquatorLine(boolean b)
          Set flag for displaying Equatorial Line
 void setFlagFog(boolean b)
          Set flag for displaying Fog
 void setFlagGravityLabels(boolean b)
          Set flag for enabling gravity labels
 void setFlagLandscape(boolean b)
          Set flag for displaying Landscape
 void setFlagLightTravelTime(boolean b)
           
 void setFlagLockSkyPosition(boolean b)
          Set whether sky position is to be locked
 void setFlagManualAutoZoom(boolean b)
          Set whether auto zoom can go further than normal
 void setFlagMeridianLine(boolean b)
          Set flag for displaying Meridian Line
 void setFlagMilkyWay(boolean b)
          Set flag for displaying Milky Way
 void setFlagMoonScaled(boolean b)
          Set flag for displaying a scaled Moon
 void setFlagNebula(boolean b)
          Set flag for displaying Nebulae
 void setFlagNebulaDisplayNoTexture(boolean b)
          Set flag for displaying Nebulae even without textures
 void setFlagNebulaHints(boolean b)
          Set flag for displaying Nebulae Hints
 void setFlagPlanets(boolean b)
          Set flag for displaying Planets
 void setFlagPlanetsHints(boolean b)
          Set flag for displaying Planets Hints
 void setFlagPlanetsOrbits(boolean b)
          Set flag for displaying Planets Orbits
 void setFlagPlanetsTrails(boolean b)
          Set flag for displaying Planets Trails
 void setFlagPointStar(boolean b)
           
 void setFlagSelectedObjectPointer(boolean b)
          Set whether a pointer is to be drawn over selected object
 void setFlagStarName(boolean b)
           
 void setFlagStars(boolean b)
           
(package private)  void setFlagStarSciName(boolean b)
           
 void setFlagStarTwinkle(boolean b)
           
(package private)  void setFlagTelescopeName(boolean b)
           
(package private)  void setFlagTelescopes(boolean b)
           
 void setFlagTracking(boolean b)
          Set object tracking
 void setFlipHorz(boolean flip)
           
 void setFlipVert(boolean flip)
           
 void setFov(double f)
          Set the current FOV (in degree)
 boolean setHomePlanet(java.lang.String planet)
           
 void setJDay(double JD)
          Set the current date in Julian Day
 boolean setLandscape(java.lang.String newLandscapeName)
          Set the landscape
 void setMaxFov(double f)
          Set the maximum FOV (in degree)
 void setMaximizedViewport(int screenW, int screenH)
          Maximize viewport according to passed screen values
 void setMaxMagStarName(float f)
           
(package private)  void setMaxMagStarSciName(float f)
           
 void setMeteorsRate(int f)
          Set Meteor Rate in number per hour
 void setMilkyWayIntensity(float f)
          Set Milky Way intensity
 void setMoonScale(float f)
          Set Moon scale
 void setMountMode(StelCore.MOUNT_MODE m)
          Set current mount type
 void setNebulaCircleScale(float f)
          Set Nebulae Hints circle scale
 void setNebulaMaxMagHints(float f)
          Set maximum magnitude at which nebulae hints are displayed
 void setPlanetsScale(double f)
          Set base planets display scaling factor
 void setPlanetsSelected(java.lang.String englishName)
           
 void setProjectionType(java.lang.String sptype)
          Set the projection type
 boolean setSkyCulture(java.lang.String cultureName)
          Set the current sky culture according to passed name
(package private)  boolean setSkyCultureDir(java.lang.String cultureDir)
          Set the current sky culture from the passed directory
 void setSkyLanguage(java.lang.String newSkyLocaleName)
           
 void setSquareViewport(int screenW, int screenH, int hoffset, int voffset)
          Set a centered squared viewport with passed vertical and horizontal offset
(package private)  void setStarLimitingMag(float f)
           
 void setStarMagScale(float f)
           
 void setStarScale(float f)
           
 void setStarTwinkleAmount(float f)
           
(package private)  void setTimeNow()
          Set stellarium time to current real world time
 void setTimeSpeed(double ts)
          Set time speed in JDay/sec
 void setViewportHorizontalOffset(int hoff)
          Set the horizontal viewport offset in pixels
 void setViewportMaskDisk()
          Set whether a disk mask must be drawn over the viewport
 void setViewportMaskNone()
          Set whether no mask must be drawn over the viewport
(package private)  void setViewportSize(int w, int h)
          Set the viewport width and height
 void setViewportVerticalOffset(int voff)
          Set the vertical viewport offset in pixels
 void startPlanetsTrails(boolean b)
          Start/stop displaying planets Trails
 void telescopeGoto(int nr)
           
 void toggleMountMode()
          Toggle current mount mode between equatorial and altazimutal
(package private)  void turnDown(boolean s)
           
(package private)  void turnLeft(boolean s)
           
(package private)  void turnRight(boolean s)
           
(package private)  void turnUp(boolean s)
           
 void unSelect()
          Does not deselect selected constellation
(package private)  void update(int deltaTime)
          Update all the objects in function of the time
 void updateMove(int deltaTime)
          Increment/decrement smoothly the vision field and position
 void zoomIn(boolean s)
           
 void zoomOut(boolean s)
           
 void zoomTo(double aimFov)
          Zoom to the given FOV (in degree)
 void zoomTo(double aimFOV, double moveDuration)
           
 void zoomTo(double aimFov, float moveDuration)
           
 
Methods inherited from class java.awt.event.MouseAdapter
mouseEntered, mouseExited, mousePressed, mouseReleased
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FontSizeCardinalPoints

private static final float FontSizeCardinalPoints
See Also:
Constant Field Values

FontSizeSolarSystem

private static final float FontSizeSolarSystem
See Also:
Constant Field Values

FontSizeGeneral

private static final float FontSizeGeneral
See Also:
Constant Field Values

FontSizeConstellations

private static final float FontSizeConstellations
See Also:
Constant Field Values

loadingBar

protected LoadingBar loadingBar

applicationCallback

private ApplicationCallback applicationCallback

baseFontFile

java.lang.String baseFontFile
The font file used by default during initialization


localeDir

private java.lang.String localeDir
The directory containing the translation .mo file


skyCultureDir

private java.lang.String skyCultureDir
The directory containing data for the culture used for constellations, etc.


skyTranslator

private Translator skyTranslator
The translator used for astronomical object naming


navigation

private Navigator navigation
Manage all navigation parameters, coordinate transformations etc..


observatory

private Observator observatory
Manage observer position and locales for its country


projection

private DefaultProjector projection
Manage the projection mode and matrix


selectedObject

private StelObject selectedObject
The selected object in stellarium


hipStars

HipStarMgr hipStars
Manage the hipparcos stars


asterisms

private ConstellationMgr asterisms
Manage constellations (boundaries, names etc..)


nebulas

NebulaMgr nebulas
Manage the nebulas


ssystem

public SolarSystem ssystem
Manage the solar system


atmosphere

private StelAtmosphere atmosphere
Atmosphere


equGrid

SkyGrid equGrid
Equatorial grid


aziGrid

SkyGrid aziGrid
Azimutal grid


equatorLine

SkyLine equatorLine
Celestial Equator line


eclipticLine

SkyLine eclipticLine
Eclptic line


meridianLine

SkyLine meridianLine
Meridian line


cardinalsPoints

Cardinals cardinalsPoints
Cardinals points


milkyWay

MilkyWay milkyWay
Our galaxy


meteors

MeteorMgr meteors
Manage meteor showers


landscape

Landscape landscape
The landscape ie the fog, the ground and "decor"


toneConverter

private ToneReproductor toneConverter
Tones conversion between stellarium world and display device


skyloc

private SkyLocalizer skyloc
For sky cultures and locales


scriptImages

ImageMgr scriptImages
for script loaded image display


telescopeMgr

private TelescopeMgr telescopeMgr
For managing connected telescopes


skyBrightness

float skyBrightness
Current sky Brightness in ?


objectPointerVisibility

boolean objectPointerVisibility
Should selected object pointer be drawn


flagEnableZoomKeys

boolean flagEnableZoomKeys

flagEnableMoveKeys

boolean flagEnableMoveKeys

deltaFov

double deltaFov
View movement


deltaAlt

double deltaAlt
View movement


deltaAz

double deltaAz
View movement


moveSpeed

double moveSpeed
Speed of movement and zooming


zoomSpeed

double zoomSpeed
Speed of movement and zooming


initFov

float initFov
Default viewing FOV


initViewPos

javax.vecmath.Point3d initViewPos
Default viewing direction


flagManualZoom

private boolean flagManualZoom
Define whether auto zoom can go further


chartColor

SColor chartColor
?


autoMoveDuration

private float autoMoveDuration
Duration of movement for the auto move to a selected object


firstTime

boolean firstTime
For init to track if reload or first time setup


constellationFontSize

float constellationFontSize
size for constellation labels

Constructor Detail

StelCore

public StelCore(ApplicationCallback applicationCallback)
         throws StellariumException
Throws:
StellariumException
Method Detail

repaint

public void repaint()

setFlagTelescopes

void setFlagTelescopes(boolean b)

getFlagTelescopes

boolean getFlagTelescopes()

setFlagTelescopeName

void setFlagTelescopeName(boolean b)

getFlagTelescopeName

boolean getFlagTelescopeName()

telescopeGoto

public void telescopeGoto(int nr)

close

public void close()

mouseDragged

public void mouseDragged(java.awt.event.MouseEvent e)
Specified by:
mouseDragged in interface java.awt.event.MouseMotionListener

finalize

protected void finalize()
                 throws java.lang.Throwable
Overrides:
finalize in class java.lang.Object
Throws:
java.lang.Throwable

getLoadingBar

public LoadingBar getLoadingBar()

initData

public void initData(IniFileParser conf)
              throws StellariumException
Throws:
StellariumException

initGL1

public boolean initGL1(IniFileParser conf)
                throws StellariumException
Load core data and initialize with default values

Parameters:
conf - The configuration source to load from
Throws:
StellariumException

initGL2

public boolean initGL2(IniFileParser conf)
                throws StellariumException
Throws:
StellariumException

initGL3

public boolean initGL3(IniFileParser conf)
                throws StellariumException
Throws:
StellariumException

update

void update(int deltaTime)
      throws StellariumException
Update all the objects in function of the time

Parameters:
deltaTime -
Throws:
StellariumException

draw

double draw(int deltaTime)
      throws StellariumException
Execute all the drawing functions

Parameters:
deltaTime -
Throws:
StellariumException

setLandscape

public boolean setLandscape(java.lang.String newLandscapeName)
                     throws StellariumException
Set the landscape

Throws:
StellariumException

loadLandscape

public boolean loadLandscape(java.util.Map<java.lang.String,java.lang.String> param)
                      throws StellariumException
Load a landscape based on a hash of parameters mirroring the landscape.ini file and make it the current landscape

Throws:
StellariumException

setViewportSize

void setViewportSize(int w,
                     int h)
Set the viewport width and height


searchByNameI18n

private StelObject searchByNameI18n(java.lang.String name)
Find any kind of object by the name

Parameters:
name -
Returns:

findAndSelectI18n

public boolean findAndSelectI18n(java.lang.String nameI18n)
Find and select an object from its translated name

Parameters:
nameI18n - the case sensitive object translated name
Returns:
true if a object was found with the passed name

selectObject

public boolean selectObject(java.lang.String type,
                            java.lang.String id)
                     throws StellariumException
Find and select an object based on selection type and standard name or number

Returns:
true if an object was selected
Throws:
StellariumException

findAndSelect

public boolean findAndSelect(javax.vecmath.Point3d pos)
Find and select an object near given equatorial position

Returns:
true if a object was found at position (this does not necessarily means it is selected)

findAndSelect

boolean findAndSelect(int x,
                      int y)
Find and select an object near given screen position

Returns:
true if a object was found at position (this does not necessarily means it is selected)

cleverFind

StelObject cleverFind(javax.vecmath.Point3d v)
Find in a "clever" way an object from its equatorial position

Returns:

cleverFind

public StelObject cleverFind(int x,
                             int y)
Find in a "clever" way an object from its screen position

Parameters:
x -
y -
Returns:

autoZoomIn

public void autoZoomIn(float moveDuration)
Go and zoom to the selected object.

Parameters:
moveDuration -

autoZoomIn

public void autoZoomIn(float moveDuration,
                       boolean allowManualZoom)

autoZoomOut

public void autoZoomOut(float moveDuration)
Unzoom and go to the init position

Parameters:
moveDuration -

autoZoomOut

public void autoZoomOut(float moveDuration,
                        boolean full)

setSkyCulture

public boolean setSkyCulture(java.lang.String cultureName)
                      throws StellariumException
Set the current sky culture according to passed name

Throws:
StellariumException

setSkyCultureDir

boolean setSkyCultureDir(java.lang.String cultureDir)
                   throws StellariumException
Set the current sky culture from the passed directory

Throws:
StellariumException

setSkyLanguage

public void setSkyLanguage(java.lang.String newSkyLocaleName)
                    throws StellariumException
Parameters:
newSkyLocaleName - The name of the locale (e.g fr) to use for sky object labels
Throws:
StellariumException

getTranslator

public Translator getTranslator()

setColorScheme

void setColorScheme(IniFileParser conf,
                    java.lang.String section)
              throws StellariumException
Please keep saveCurrentSettings up to date with any new color settings added here

Throws:
StellariumException

getSelectedObjectInfoColor

public SColor getSelectedObjectInfoColor()
Get a color used to display info about the currently selected object


drawChartBackground

private void drawChartBackground()

getCursorPos

private java.lang.String getCursorPos(int x,
                                      int y)

setProjectionType

public void setProjectionType(java.lang.String sptype)
                       throws StellariumException
Set the projection type

Throws:
StellariumException

setFlipHorz

public void setFlipHorz(boolean flip)

setFlipVert

public void setFlipVert(boolean flip)

turnRight

void turnRight(boolean s)

turnLeft

void turnLeft(boolean s)

turnUp

void turnUp(boolean s)

turnDown

void turnDown(boolean s)

zoomIn

public void zoomIn(boolean s)

zoomOut

public void zoomOut(boolean s)

dragView

public void dragView(int x1,
                     int y1,
                     int x2,
                     int y2)
Make the first screen position correspond to the second (useful for mouse dragging)


updateMove

public void updateMove(int deltaTime)
Increment/decrement smoothly the vision field and position

Parameters:
deltaTime -

setHomePlanet

public boolean setHomePlanet(java.lang.String planet)

getPlanetHashString

public java.lang.String getPlanetHashString()
For use by TUI


setTimeNow

void setTimeNow()
Set stellarium time to current real world time


getIsTimeNow

boolean getIsTimeNow()
Get wether the current stellarium time is the real world time


selectObject

private boolean selectObject(StelObject obj)
Select passed object

Parameters:
obj - - to select
Returns:
true if the object was selected (false if the same was already selected)

listMatchingObjectsI18n

java.util.List<java.lang.String> listMatchingObjectsI18n(java.lang.String objPrefix)

listMatchingObjectsI18n

public java.util.List<java.lang.String> listMatchingObjectsI18n(java.lang.String objPrefix,
                                                                int maxNbItem)
Find and return the list of at most maxNbItem objects auto-completing the passed object I18n name

Parameters:
objPrefix - the case insensitive first letters of the searched object
maxNbItem - the maximum number of returned object names
Returns:
a vector of matching object name by order of relevance, or an empty vector if nothing match

getFontForLocale

public void getFontForLocale(java.lang.String _locale,
                             StelCore.FontParam _font,
                             StelCore.FontParam _fixedFont)
                      throws StellariumException
TESTING font file and scaling to use for a given locale

Throws:
StellariumException

setFlagTracking

public void setFlagTracking(boolean b)
Set object tracking


setFlagStars

public void setFlagStars(boolean b)

getFlagStars

public boolean getFlagStars()

setFlagStarName

public void setFlagStarName(boolean b)

getFlagStarName

public boolean getFlagStarName()

setFlagStarSciName

void setFlagStarSciName(boolean b)

getFlagStarSciName

boolean getFlagStarSciName()

setFlagStarTwinkle

public void setFlagStarTwinkle(boolean b)

getFlagStarTwinkle

public boolean getFlagStarTwinkle()

setFlagPointStar

public void setFlagPointStar(boolean b)

getFlagPointStar

public boolean getFlagPointStar()

setMaxMagStarName

public void setMaxMagStarName(float f)

getMaxMagStarName

public float getMaxMagStarName()

setMaxMagStarSciName

void setMaxMagStarSciName(float f)

getMaxMagStarSciName

float getMaxMagStarSciName()

setStarScale

public void setStarScale(float f)

getStarScale

public float getStarScale()

setStarMagScale

public void setStarMagScale(float f)

getStarMagScale

public float getStarMagScale()

setStarTwinkleAmount

public void setStarTwinkleAmount(float f)

getStarTwinkleAmount

public float getStarTwinkleAmount()

setStarLimitingMag

void setStarLimitingMag(float f)

getStarLimitingMag

float getStarLimitingMag()

getColorStarNames

SColor getColorStarNames()

getColorStarCircles

SColor getColorStarCircles()

setColorStarNames

void setColorStarNames(SColor v)

setColorStarCircles

void setColorStarCircles(SColor v)

getDataDir

public java.lang.String getDataDir()
Get the name of the directory containing the data


getSkyCultureDir

public java.lang.String getSkyCultureDir()

getSkyCulture

public java.lang.String getSkyCulture()
Get the current sky culture I18 name


getSkyCultureListI18

public java.lang.String getSkyCultureListI18()
Get the I18 available sky culture names


getSkyCultureHash

public java.lang.String getSkyCultureHash()

getSkyLanguage

public java.lang.String getSkyLanguage()
Returns:
The name of the locale (e.g fr)

setTimeSpeed

public void setTimeSpeed(double ts)
Set time speed in JDay/sec


getTimeSpeed

public double getTimeSpeed()
Get time speed in JDay/sec


setJDay

public void setJDay(double JD)
Set the current date in Julian Day


getJDay

public double getJDay()
Get the current date in Julian Day


getFlagTracking

public boolean getFlagTracking()
Get object tracking


setFlagLockSkyPosition

public void setFlagLockSkyPosition(boolean b)
Set whether sky position is to be locked


getFlagLockSkyPosition

public boolean getFlagLockSkyPosition()
Set whether sky position is locked


setMountMode

public void setMountMode(StelCore.MOUNT_MODE m)
Set current mount type


getMountMode

public StelCore.MOUNT_MODE getMountMode()
Get current mount type


toggleMountMode

public void toggleMountMode()
Toggle current mount mode between equatorial and altazimutal


gotoSelectedObject

public void gotoSelectedObject()
Go to the selected object


panView

public void panView(double delta_az,
                    double delta_alt)
Move view in alt/az (or equatorial if in that mode) coordinates


setAutoMoveDuration

public void setAutoMoveDuration(float f)
Set automove duration in seconds


getAutoMoveDuration

public float getAutoMoveDuration()
Get automove duration in seconds


zoomTo

public void zoomTo(double aimFov)
Zoom to the given FOV (in degree)


zoomTo

public void zoomTo(double aimFov,
                   float moveDuration)

getFov

public double getFov()
Get current FOV (in degree)


getAimFov

public double getAimFov()
If is currently zooming, return the target FOV, otherwise return current FOV


setFov

public void setFov(double f)
Set the current FOV (in degree)


setMaxFov

public void setMaxFov(double f)
Set the maximum FOV (in degree)


setFlagManualAutoZoom

public void setFlagManualAutoZoom(boolean b)
Set whether auto zoom can go further than normal


getFlagManualAutoZoom

public boolean getFlagManualAutoZoom()
Get whether auto zoom can go further than normal


getFlagHasSelected

public boolean getFlagHasSelected()
Return whether an object is currently selected


unSelect

public void unSelect()
Does not deselect selected constellation


setFlagSelectedObjectPointer

public void setFlagSelectedObjectPointer(boolean b)
Set whether a pointer is to be drawn over selected object


getSelectedObjectInfo

public java.lang.String getSelectedObjectInfo()
Get a multiline String describing the currently selected object


getSelectedObjectShortInfo

public java.lang.String getSelectedObjectShortInfo()
Get a 1 line String briefly describing the currently selected object


setFlagConstellationLines

public void setFlagConstellationLines(boolean b)
Set display flag of constellation lines


getFlagConstellationLines

public boolean getFlagConstellationLines()
Get display flag of constellation lines


setFlagConstellationArt

public void setFlagConstellationArt(boolean b)
Set display flag of constellation art


getFlagConstellationArt

public boolean getFlagConstellationArt()
Get display flag of constellation art


setFlagConstellationNames

public void setFlagConstellationNames(boolean b)
Set display flag of constellation names

Parameters:
b - If constellation names must be displayed.

getFlagConstellationNames

public boolean getFlagConstellationNames()
Get display flag of constellation names.

Returns:
If constellation names must be displayed.

setFlagConstellationBoundaries

public void setFlagConstellationBoundaries(boolean b)
Set display flag of constellation boundaries


getFlagConstellationBoundaries

public boolean getFlagConstellationBoundaries()
Get display flag of constellation boundaries


getColorConstellationBoundaries

public SColor getColorConstellationBoundaries()

setConstellationArtIntensity

public void setConstellationArtIntensity(float f)
Set constellation art intensity


getConstellationArtIntensity

public double getConstellationArtIntensity()
Get constellation art intensity


setConstellationArtFadeDuration

public void setConstellationArtFadeDuration(float f)
Set constellation art intensity


getConstellationArtFadeDuration

public double getConstellationArtFadeDuration()
Get constellation art intensity


setFlagConstellationIsolateSelected

public void setFlagConstellationIsolateSelected(boolean b)
Set whether selected constellation is drawn alone


getFlagConstellationIsolateSelected

public boolean getFlagConstellationIsolateSelected()
Get whether selected constellation is drawn alone


getColorConstellationLine

public SColor getColorConstellationLine()
Get constellation line color


setColorConstellationLine

public void setColorConstellationLine(SColor v)
Set constellation line color


getColorConstellationNames

public SColor getColorConstellationNames()
Get constellation names color


setColorConstellationNames

public void setColorConstellationNames(SColor v)
Set constellation names color


setFlagPlanets

public void setFlagPlanets(boolean b)
Set flag for displaying Planets


getFlagPlanets

public boolean getFlagPlanets()
Get flag for displaying Planets


setFlagPlanetsTrails

public void setFlagPlanetsTrails(boolean b)
Set flag for displaying Planets Trails


getFlagPlanetsTrails

public boolean getFlagPlanetsTrails()
Get flag for displaying Planets Trails


setFlagPlanetsHints

public void setFlagPlanetsHints(boolean b)
Set flag for displaying Planets Hints


getFlagPlanetsHints

public boolean getFlagPlanetsHints()
Get flag for displaying Planets Hints


setFlagPlanetsOrbits

public void setFlagPlanetsOrbits(boolean b)
Set flag for displaying Planets Orbits


getFlagPlanetsOrbits

public boolean getFlagPlanetsOrbits()
Get flag for displaying Planets Orbits


setFlagLightTravelTime

public void setFlagLightTravelTime(boolean b)

getFlagLightTravelTime

public boolean getFlagLightTravelTime()

getColorPlanetsOrbits

public SColor getColorPlanetsOrbits()

getColorPlanetsNames

public SColor getColorPlanetsNames()

startPlanetsTrails

public void startPlanetsTrails(boolean b)
Start/stop displaying planets Trails


getColorPlanetsTrails

public SColor getColorPlanetsTrails()

setPlanetsScale

public void setPlanetsScale(double f)
Set base planets display scaling factor


getPlanetsScale

public double getPlanetsScale()
Get base planets display scaling factor


setPlanetsSelected

public void setPlanetsSelected(java.lang.String englishName)
Parameters:
englishName - The planet name or "" to select no planet

setFlagMoonScaled

public void setFlagMoonScaled(boolean b)
Set flag for displaying a scaled Moon


getFlagMoonScaled

public boolean getFlagMoonScaled()
Get flag for displaying a scaled Moon


setMoonScale

public void setMoonScale(float f)
Set Moon scale


getMoonScale

public float getMoonScale()
Get Moon scale


setFlagAzimutalGrid

public void setFlagAzimutalGrid(boolean b)
Set flag for displaying Azimutal Grid


getFlagAzimutalGrid

public boolean getFlagAzimutalGrid()
Get flag for displaying Azimutal Grid


getColorAzimutalGrid

public SColor getColorAzimutalGrid()

setFlagEquatorGrid

public void setFlagEquatorGrid(boolean b)
Set flag for displaying Equatorial Grid


getFlagEquatorGrid

public boolean getFlagEquatorGrid()
Get flag for displaying Equatorial Grid


getColorEquatorGrid

public SColor getColorEquatorGrid()

setFlagEquatorLine

public void setFlagEquatorLine(boolean b)
Set flag for displaying Equatorial Line


getFlagEquatorLine

public boolean getFlagEquatorLine()
Get flag for displaying Equatorial Line


getColorEquatorLine

public SColor getColorEquatorLine()

setFlagEclipticLine

public void setFlagEclipticLine(boolean b)
Set flag for displaying Ecliptic Line


getFlagEclipticLine

public boolean getFlagEclipticLine()
Get flag for displaying Ecliptic Line


getColorEclipticLine

public SColor getColorEclipticLine()

setFlagMeridianLine

public void setFlagMeridianLine(boolean b)
Set flag for displaying Meridian Line


getFlagMeridianLine

public boolean getFlagMeridianLine()
Get flag for displaying Meridian Line


getColorMeridianLine

public SColor getColorMeridianLine()

setFlagCardinalsPoints

public void setFlagCardinalsPoints(boolean b)
Set flag for displaying Cardinals Points


getFlagCardinalsPoints

public boolean getFlagCardinalsPoints()
Get flag for displaying Cardinals Points


setColorCardinalPoints

public void setColorCardinalPoints(SColor v)
Set Cardinals Points color


getColorCardinalPoints

public SColor getColorCardinalPoints()
Get Cardinals Points color


setColorConstellationBoundaries

public void setColorConstellationBoundaries(SColor v)

setColorPlanetsOrbits

public void setColorPlanetsOrbits(SColor v)

setColorPlanetsNames

public void setColorPlanetsNames(SColor v)

setColorPlanetsTrails

public void setColorPlanetsTrails(SColor v)

setColorAzimutalGrid

public void setColorAzimutalGrid(SColor v)

setColorEquatorGrid

public void setColorEquatorGrid(SColor v)

setColorEquatorLine

public void setColorEquatorLine(SColor v)

setColorEclipticLine

public void setColorEclipticLine(SColor v)

setColorMeridianLine

public void setColorMeridianLine(SColor v)

setColorNebulaLabels

public void setColorNebulaLabels(SColor v)

setColorNebulaCircle

public void setColorNebulaCircle(SColor v)

setViewportHorizontalOffset

public void setViewportHorizontalOffset(int hoff)
Set the horizontal viewport offset in pixels


getViewportHorizontalOffset

public int getViewportHorizontalOffset()
Get the horizontal viewport offset in pixels


setViewportVerticalOffset

public void setViewportVerticalOffset(int voff)
Set the vertical viewport offset in pixels


getViewportVerticalOffset

public int getViewportVerticalOffset()
Get the vertical viewport offset in pixels


setMaximizedViewport

public void setMaximizedViewport(int screenW,
                                 int screenH)
Maximize viewport according to passed screen values


setSquareViewport

public void setSquareViewport(int screenW,
                              int screenH,
                              int hoffset,
                              int voffset)
Set a centered squared viewport with passed vertical and horizontal offset


setViewportMaskDisk

public void setViewportMaskDisk()
Set whether a disk mask must be drawn over the viewport


getViewportMaskDisk

public boolean getViewportMaskDisk()
Get whether a disk mask must be drawn over the viewport


setViewportMaskNone

public void setViewportMaskNone()
Set whether no mask must be drawn over the viewport


getProjectionType

public java.lang.String getProjectionType()
                                   throws StellariumException
Get the projection type

Throws:
StellariumException

getFlipHorz

public boolean getFlipHorz()
get/set horizontal/vertical image flip


getFlipVert

public boolean getFlipVert()

setFlagGravityLabels

public void setFlagGravityLabels(boolean b)
Set flag for enabling gravity labels


getFlagGravityLabels

public boolean getFlagGravityLabels()
Get flag for enabling gravity labels


getViewportWidth

public int getViewportWidth()
Get viewport width


getViewportHeight

public int getViewportHeight()
Get viewport height


getViewportPosX

public int getViewportPosX()
Get viewport X position


getViewportPosY

public int getViewportPosY()
Get viewport Y position


printGravity

public void printGravity(SFontIfc font,
                         float x,
                         float y,
                         java.lang.String str)
Print the passed String so that it is oriented in the drection of the gravity


printGravity

public void printGravity(SFontIfc font,
                         float x,
                         float y,
                         java.lang.String str,
                         boolean speedOptimize,
                         float xshift,
                         float yshift)

setFlagLandscape

public void setFlagLandscape(boolean b)
Set flag for displaying Landscape


getFlagLandscape

public boolean getFlagLandscape()
Get flag for displaying Landscape


setFlagFog

public void setFlagFog(boolean b)
Set flag for displaying Fog


getFlagFog

public boolean getFlagFog()
Get flag for displaying Fog


setFlagAtmosphere

public void setFlagAtmosphere(boolean b)
Set flag for displaying Atmosphere


getFlagAtmosphere

public boolean getFlagAtmosphere()
Get flag for displaying Atmosphere


setAtmosphereFadeDuration

public void setAtmosphereFadeDuration(float f)
Set atmosphere fade duration in s


getAtmosphereFadeDuration

public float getAtmosphereFadeDuration()
Get atmosphere fade duration in s


setFlagMilkyWay

public void setFlagMilkyWay(boolean b)
Set flag for displaying Milky Way


getFlagMilkyWay

public boolean getFlagMilkyWay()
Get flag for displaying Milky Way


setMilkyWayIntensity

public void setMilkyWayIntensity(float f)
Set Milky Way intensity


getMilkyWayIntensity

public float getMilkyWayIntensity()
Get Milky Way intensity


setFlagNebula

public void setFlagNebula(boolean b)
Set flag for displaying Nebulae


getFlagNebula

public boolean getFlagNebula()
Get flag for displaying Nebulae


setFlagNebulaHints

public void setFlagNebulaHints(boolean b)
Set flag for displaying Nebulae Hints


getFlagNebulaHints

public boolean getFlagNebulaHints()
Get flag for displaying Nebulae Hints


setNebulaCircleScale

public void setNebulaCircleScale(float f)
Set Nebulae Hints circle scale


getNebulaCircleScale

public double getNebulaCircleScale()
Get Nebulae Hints circle scale


setFlagBrightNebulae

public void setFlagBrightNebulae(boolean b)
Set flag for displaying Nebulae as bright


getFlagBrightNebulae

public boolean getFlagBrightNebulae()
Get flag for displaying Nebulae as brigth


setNebulaMaxMagHints

public void setNebulaMaxMagHints(float f)
Set maximum magnitude at which nebulae hints are displayed


getNebulaMaxMagHints

public float getNebulaMaxMagHints()
Get maximum magnitude at which nebulae hints are displayed


setFlagNebulaDisplayNoTexture

public void setFlagNebulaDisplayNoTexture(boolean b)
Set flag for displaying Nebulae even without textures


getFlagNebulaDisplayNoTexture

public boolean getFlagNebulaDisplayNoTexture()
Get flag for displaying Nebulae without textures


getColorNebulaLabels

public SColor getColorNebulaLabels()

getColorNebulaCircle

public SColor getColorNebulaCircle()

getObservatory

public Observator getObservatory()
Return the current observatory (as a object)


moveObserver

public void moveObserver(double lat,
                         double lon,
                         double alt,
                         int delay,
                         java.lang.String name)
Move to a new latitude and longitude on home planet


setMeteorsRate

public void setMeteorsRate(int f)
Set Meteor Rate in number per hour


getMeteorsRate

public int getMeteorsRate()
Get Meteor Rate in number per hour


getImageMgr

public ImageMgr getImageMgr()
Return the current image manager which display users images


getZoomSpeed

public double getZoomSpeed()

getLandscapeName

public java.lang.String getLandscapeName()

getLandscapeAuthorName

public java.lang.String getLandscapeAuthorName()

getLandscapeDescription

public java.lang.String getLandscapeDescription()

loadObservatory

void loadObservatory()

getNavigation

public Navigator getNavigation()

getProjection

public DefaultProjector getProjection()

getSelectedObject

public StelObject getSelectedObject()

zoomTo

public void zoomTo(double aimFOV,
                   double moveDuration)

mouseClicked

public void mouseClicked(java.awt.event.MouseEvent e)
Handle mouse clics

Specified by:
mouseClicked in interface java.awt.event.MouseListener
Overrides:
mouseClicked in class java.awt.event.MouseAdapter

mouseMoved

public void mouseMoved(java.awt.event.MouseEvent e)
Handle mouse move

Specified by:
mouseMoved in interface java.awt.event.MouseMotionListener

keyTyped

public void keyTyped(java.awt.event.KeyEvent keyEvent)
Specified by:
keyTyped in interface java.awt.event.KeyListener

keyPressed

public void keyPressed(java.awt.event.KeyEvent keyEvent)
Specified by:
keyPressed in interface java.awt.event.KeyListener

keyReleased

public void keyReleased(java.awt.event.KeyEvent keyEvent)
Specified by:
keyReleased in interface java.awt.event.KeyListener