public class GlobalInfo
extends java.lang.Object
implements de.enflexit.api.LastSelectedFolderReminder, java.awt.event.ActionListener
Modifier and Type | Class and Description |
---|---|
static class |
GlobalInfo.ApplicationInUse
This enumeration lists the possible end user applications
that are provided by the package of the energy option model.
|
static class |
GlobalInfo.ChartRenderer
The enumeration ChartRenderer lists all possible
renderer that can be applied to a chart.
|
static class |
GlobalInfo.EomExecutionMode
The Enumeration EOM_EXECUTION_MODE describes the possible execution modes of the EOM.
|
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
APPLICATION_TITLE |
static java.awt.Color[] |
DEFAULT_CHART_COLORS
The Constant DEFAULT_CHART_COLORS defines
a set of standard colors for charts.
|
static java.lang.String |
DOMAIN_SETTINGS_FILE_NAME |
static java.lang.String |
EOM_MAIN_MENU_EXTENSION_ID |
static java.lang.String |
eomClassesMainPackage |
static energyLicense.Delegator |
eomDelegator |
static java.lang.String |
PROPERTY_DIRECTORY |
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent ae) |
void |
addExtensionJMenuItems(javax.swing.JMenu jMenu)
Adds the JMenuItems that are defined by the extension point
"de.enflexit.eom.mainMenu" to the specified JMenu.
|
void |
addExtensionJMenuItems(javax.swing.JPopupMenu jPopupMenu)
Adds the JMenuItems that are defined by the extension point
"de.enflexit.eom.mainMenu" to the specified JPopupMenu.
|
void |
checkLicense()
Checks the current license and terminates, if required.
|
static java.io.File |
findJar(java.lang.Class<?> contextClass)
Returns the corresponding jar file for the specified class.
|
static AbstractMainPanel |
getAbstractMainPanel()
Return the current
AbstractMainPanel . |
static GlobalInfo.ApplicationInUse |
getApplicationInUse()
Returns the current application in use.
|
static BundleProperties |
getBundleProperties()
Returns the bundle properties that are in fact eclipse preferences.
|
static java.awt.Color |
getChartColor(int seriesIndex)
Gets the chart color for the specified index of a data series.
|
static de.enflexit.common.classSelection.ClassSelectionDialog |
getClassSelectionDialogForDomainModel(java.awt.Frame owner)
Returns the class selection dialog for the selection of an extended
AbstractDomainModel . |
static de.enflexit.common.classSelection.ClassSelectionDialog |
getClassSelectionDialogForDomainModelHeatParameterCalculation(java.awt.Frame owner)
Returns the class selection dialog for the selection of an extended
AbstractHeatParameterCalculation . |
de.enflexit.common.classSelection.ClassSelectionDialog |
getClassSelectionDialogForEvaluationCalculation(java.awt.Frame owner)
Returns the class selection dialog for a
AbstractEvaluationCalculation . |
de.enflexit.common.classSelection.ClassSelectionDialog |
getClassSelectionDialogForEvaluationStrategy(java.awt.Frame owner)
Returns the class selection dialog for an Evaluation Strategy.
|
de.enflexit.common.classSelection.ClassSelectionDialog |
getClassSelectionDialogForGroupEvaluationStrategy(java.awt.Frame owner)
Returns the class selection dialog for a Group Evaluation Strategy.
|
de.enflexit.common.classSelection.ClassSelectionDialog |
getClassSelectionDialogForJadeConcept(java.awt.Frame owner)
Returns the class selection dialog for the selection of a JADE concept.
|
de.enflexit.common.classSelection.ClassSelectionDialog |
getClassSelectionDialogForOptionModelCalculation(java.awt.Frame owner)
Returns the class selection dialog for a option model calculation.
|
de.enflexit.common.classSelection.ClassSelectionDialog |
getClassSelectionDialogForStaticModel(java.awt.Frame owner)
Returns the class selection dialog for the selection of an extended
AbstractStaticModel . |
de.enflexit.common.classSelection.ClassSelectionPanel |
getClassSelectionPanelForEvaluationStrategy()
Returns the class selection panel for an Evaluation Strategy.
|
de.enflexit.common.classSelection.ClassSelectionPanel |
getClassSelectionPanelForGroupEvaluationStrategy()
Returns the class selection panel for a Group Evaluation Strategy.
|
static DomainModelSetting |
getDomainModelSetting(java.lang.String domain)
Returns the DomainModelSetting for the specified domain.
|
static DomainSettings |
getDomainSettings()
Returns the current domain settings.
|
static java.lang.String |
getDomainUnit(java.lang.String domain)
Returns the domain unit.
|
static java.io.File |
getExecutionDirectory()
Returns the execution root directory of the EOM application.
|
static GlobalInfo.EomExecutionMode |
getExecutionMode()
Gets the execution mode of the EOM application.
|
static double |
getExponentialScaleOfDouble(double doubleValue)
Gets the exponential scale of a double value to the base of 10.
|
static java.io.File |
getFileDomainSettingFile()
Returns the file for the domain setting file.
|
static java.io.File |
getFilePropertyDirectory()
Returns the property directory as file.
|
static javax.swing.ImageIcon |
getImageIcon(java.lang.String fileName)
Gets the image icon for the specified image.
|
static javax.swing.ImageIcon |
getImageIconForConnectivity(Connectivity connectivity)
Returns the corresponding ImageIcon for the specified connectivity.
|
static javax.swing.ImageIcon |
getImageIconForDomain(java.lang.String domain)
Gets the corresponding ImageIcon for the specified domain.
|
static javax.swing.ImageIcon |
getImageIconForTechnicalInterface(TechnicalInterface ti)
Returns the corresponding ImageIcon for the specified
TechnicalInterface . |
static java.lang.String |
getImagePackage()
Gets the image package location as String.
|
static GlobalInfo |
getInstance()
Will return the instance of this singleton class
|
static java.lang.Class<?>[] |
getJAXBContextClasses()
Returns the JAXB context classes.
|
static java.lang.Class<?>[] |
getJAXBContextClasses(java.lang.String eomClassesPackage,
java.util.ArrayList<java.lang.Class<?>> excludeList)
Returns the JAXB context classes.
|
static java.util.ArrayList<java.lang.Class<?>> |
getJAXBContextClassesExcludeList096()
Gets the JAXB context classes exclude list for version 0.96.
|
static ScheduleCsvImportSettings |
getLastCsvImportSettings() |
static java.io.File |
getLastSelectedDirectory()
Returns the last selected folder.
|
java.io.File |
getLastSelectedFolder() |
static java.lang.String |
getLocalDecimalSeparator()
Gets the decimal separator local.
|
static int |
getNumberOfDecimalPlaces(double doubleValue)
Gets the number of decimal places behind comma of the specified double value.
|
static java.awt.Dialog |
getOwnerDialogForComponent(javax.swing.JComponent component)
Returns the owner dialog for a JComponent.
|
static java.awt.Frame |
getOwnerFrameForComponent(java.awt.Component component)
Returns the owner frame for the specified JComponent.
|
static java.awt.Frame |
getOwnerFrameForContainer(java.awt.Container container)
Returns the owner frame for the specified Container.
|
static javax.swing.JInternalFrame |
getOwnerJInternalFrameForComponent(javax.swing.JComponent component)
Returns the owner JInternalFrame for the specified JComponent.
|
static java.awt.Window |
getOwnerWindowForComponent(java.awt.Component component)
Returns the owner window (e.g. a JFrame or JDialog) for the specified component.
|
static PropertyContentProvider |
getPropertyContentProvider()
Returns the property content provider.
|
static boolean |
getRandomBoolean()
Gets the random boolean.
|
static float |
getRandomFloat(float fromBound,
float toBound)
Gets the random float.
|
static int |
getRandomInteger(int fromBound,
int toBound)
Returns a random integer.
|
static int |
getRoundPrecision()
Gets the round precision for calculations.
|
static ScheduleLengthRestriction |
getScheduleLengthRestriction()
Returns the schedule length restriction.
|
static java.awt.Component |
getTopParentComponent(java.awt.Component component)
Returns the top parent component of the specified component.
|
static de.enflexit.common.VersionInfo |
getVersionInfo()
Gets the version info.
|
static PositionAndSizeReminder.PositionAndSize |
getWindowPositionAndSize(java.lang.String windowClassName)
Returns the reminder value of windows position and size for the specified window class.
|
static double |
interpolateLinear(double x1,
double y1,
double x2,
double y2,
double xSearch)
Interpolate linear between to given value pairs of x and y points.
|
static double |
interpolateLinearOverTime(long time1,
double y1,
long time2,
double y2,
long timeSearch)
Interpolate linear between to given value pairs of time and y points.
|
static boolean |
isAvailableClass(java.lang.String classReference)
Checks if the specified class is available.
|
static boolean |
isHeadlessEomOpertion()
Checks if the EOM is executed headless (without any GUI).
|
static double |
round(double doubleValue)
Rounds a double value to the precision that is specified with
getRoundPrecision() . |
static double |
round(double doubleValue,
double precision)
Rounds a double value to the given precision.
|
static double |
roundToPrecisionStep(double doubleValue,
double precisionStepValue)
Rounds the specified doubleValue to the nearest value defined by precision step.
|
static void |
setAbstractMainPanel(AbstractMainPanel abstractMainPanel)
Sets the current
AbstractMainPanel . |
static void |
setApplicationInUse(GlobalInfo.ApplicationInUse applicationInUse)
Sets the indicator for the current application in use.
|
static void |
setHeadlessEomOperating(boolean headlessOperation)
Sets that the EM has to operated headless.
|
static void |
setLastCsvImportSettings(ScheduleCsvImportSettings lastCsvImportSettings) |
static void |
setLastSelectedDirectory(java.io.File lastSelectedFolder)
Sets the last selected folder.
|
void |
setLastSelectedFolder(java.io.File lastSelectedFolder) |
static void |
setRoundPrecision(int roundPrecision)
Sets the round precision for calculations.
|
static void |
setScheduleLengthRestriction(ScheduleLengthRestriction newSLR)
Sets the schedule length restriction.
|
static void |
setTableCellColors(javax.swing.JTable table,
javax.swing.JComponent component,
boolean isSelected,
boolean hasFocus,
int row)
Sets all table cell color for the actual component.
|
static void |
setWindowPositionAndSize(java.lang.String windowClassName,
PositionAndSizeReminder.PositionAndSize posSize)
Sets the reminder for a window position and size.
|
void |
showJPopupMenuApplicationSwitch(java.awt.Component invoker)
Shows the JPopupMenu for the application switch.
|
void |
switchApplication(GlobalInfo.ApplicationInUse appToUse)
Switches the current application to the specified new application.
|
public static final java.lang.String APPLICATION_TITLE
public static final java.lang.String PROPERTY_DIRECTORY
public static final java.lang.String DOMAIN_SETTINGS_FILE_NAME
public static final java.lang.String EOM_MAIN_MENU_EXTENSION_ID
public static final java.lang.String eomClassesMainPackage
public static energyLicense.Delegator eomDelegator
public static final java.awt.Color[] DEFAULT_CHART_COLORS
public static GlobalInfo getInstance()
public void checkLicense() throws energyLicense.LicenseException
energyLicense.LicenseException
public static de.enflexit.common.VersionInfo getVersionInfo()
public static BundleProperties getBundleProperties()
public static DomainSettings getDomainSettings()
public static DomainModelSetting getDomainModelSetting(java.lang.String domain)
domain
- the domainpublic static java.lang.String getDomainUnit(java.lang.String domain)
domain
- the domainpublic static boolean isAvailableClass(java.lang.String classReference)
classReference
- the class referencenull
or an empty reference was specified, the method returns false
.public static java.lang.Class<?>[] getJAXBContextClasses()
public static java.lang.Class<?>[] getJAXBContextClasses(java.lang.String eomClassesPackage, java.util.ArrayList<java.lang.Class<?>> excludeList)
eomClassesPackage
- the eom classes packageexcludeList
- the exclude listpublic static java.util.ArrayList<java.lang.Class<?>> getJAXBContextClassesExcludeList096()
public static int getRoundPrecision()
public static void setRoundPrecision(int roundPrecision)
roundPrecision
- the new round precisionpublic static double getExponentialScaleOfDouble(double doubleValue)
doubleValue
- the double value to evaluatepublic static void setLastSelectedDirectory(java.io.File lastSelectedFolder)
lastSelectedFolder
- the new last selected folderpublic void setLastSelectedFolder(java.io.File lastSelectedFolder)
setLastSelectedFolder
in interface de.enflexit.api.LastSelectedFolderReminder
public static java.io.File getLastSelectedDirectory()
public java.io.File getLastSelectedFolder()
getLastSelectedFolder
in interface de.enflexit.api.LastSelectedFolderReminder
public static void setScheduleLengthRestriction(ScheduleLengthRestriction newSLR)
newSLR
- the new schedule length restrictionpublic static ScheduleLengthRestriction getScheduleLengthRestriction()
public static java.io.File findJar(java.lang.Class<?> contextClass)
contextClass
- the context classpublic static boolean isHeadlessEomOpertion()
public static void setHeadlessEomOperating(boolean headlessOperation)
headlessOperation
- the new headless operationpublic static GlobalInfo.EomExecutionMode getExecutionMode()
public static java.io.File getExecutionDirectory()
public static java.io.File getFilePropertyDirectory()
public static java.io.File getFileDomainSettingFile()
public static PropertyContentProvider getPropertyContentProvider()
public static java.lang.String getImagePackage()
public static javax.swing.ImageIcon getImageIcon(java.lang.String fileName)
fileName
- the file namepublic static javax.swing.ImageIcon getImageIconForDomain(java.lang.String domain)
domain
- the domainpublic static javax.swing.ImageIcon getImageIconForConnectivity(Connectivity connectivity)
connectivity
- the connectivity to usepublic static javax.swing.ImageIcon getImageIconForTechnicalInterface(TechnicalInterface ti)
TechnicalInterface
.ti
- the technical interfacepublic static java.awt.Component getTopParentComponent(java.awt.Component component)
component
- the componentpublic static java.awt.Frame getOwnerFrameForComponent(java.awt.Component component)
component
- the Componentpublic static java.awt.Frame getOwnerFrameForContainer(java.awt.Container container)
container
- the containerpublic static java.awt.Dialog getOwnerDialogForComponent(javax.swing.JComponent component)
component
- the JComponentpublic static java.awt.Window getOwnerWindowForComponent(java.awt.Component component)
component
- the component that defines the starting pointpublic static javax.swing.JInternalFrame getOwnerJInternalFrameForComponent(javax.swing.JComponent component)
component
- the JComponentpublic static PositionAndSizeReminder.PositionAndSize getWindowPositionAndSize(java.lang.String windowClassName)
windowClassName
- the window class namepublic static void setWindowPositionAndSize(java.lang.String windowClassName, PositionAndSizeReminder.PositionAndSize posSize)
windowClassName
- the window class nameposSize
- the PositionAndSizepublic de.enflexit.common.classSelection.ClassSelectionDialog getClassSelectionDialogForJadeConcept(java.awt.Frame owner)
owner
- the owner framepublic de.enflexit.common.classSelection.ClassSelectionDialog getClassSelectionDialogForStaticModel(java.awt.Frame owner)
AbstractStaticModel
.owner
- the owner framepublic static de.enflexit.common.classSelection.ClassSelectionDialog getClassSelectionDialogForDomainModel(java.awt.Frame owner)
AbstractDomainModel
.owner
- the owner framepublic static de.enflexit.common.classSelection.ClassSelectionDialog getClassSelectionDialogForDomainModelHeatParameterCalculation(java.awt.Frame owner)
AbstractHeatParameterCalculation
.owner
- the ownerpublic de.enflexit.common.classSelection.ClassSelectionDialog getClassSelectionDialogForOptionModelCalculation(java.awt.Frame owner)
owner
- the owner framepublic de.enflexit.common.classSelection.ClassSelectionDialog getClassSelectionDialogForEvaluationCalculation(java.awt.Frame owner)
AbstractEvaluationCalculation
.owner
- the owner framepublic de.enflexit.common.classSelection.ClassSelectionPanel getClassSelectionPanelForEvaluationStrategy()
public de.enflexit.common.classSelection.ClassSelectionDialog getClassSelectionDialogForEvaluationStrategy(java.awt.Frame owner)
owner
- the owner of the dialogpublic de.enflexit.common.classSelection.ClassSelectionPanel getClassSelectionPanelForGroupEvaluationStrategy()
public de.enflexit.common.classSelection.ClassSelectionDialog getClassSelectionDialogForGroupEvaluationStrategy(java.awt.Frame owner)
owner
- the ownerpublic static void setTableCellColors(javax.swing.JTable table, javax.swing.JComponent component, boolean isSelected, boolean hasFocus, int row)
table
- the tablecomponent
- the componentisSelected
- the is selectedhasFocus
- the has focusrow
- the rowpublic static java.lang.String getLocalDecimalSeparator()
public static double round(double doubleValue, double precision)
round(3.1415926535, 2)
will deliver 3.14doubleValue
- the double valueprecision
- the precisionpublic static double round(double doubleValue)
getRoundPrecision()
.
For example: round(3.1415926535, 2)
will deliver 3.14doubleValue
- the double valuepublic static int getNumberOfDecimalPlaces(double doubleValue)
doubleValue
- the double valuepublic static double roundToPrecisionStep(double doubleValue, double precisionStepValue)
doubleValue
- the double valueprecisionStepValue
- the precision step valuepublic static int getRandomInteger(int fromBound, int toBound)
fromBound
- the from boundtoBound
- the to boundpublic static float getRandomFloat(float fromBound, float toBound)
fromBound
- the from boundtoBound
- the to boundpublic static boolean getRandomBoolean()
public static double interpolateLinear(double x1, double y1, double x2, double y2, double xSearch)
x1
- the x1y1
- the y1x2
- the x2y2
- the y2xSearch
- the x searchpublic static double interpolateLinearOverTime(long time1, double y1, long time2, double y2, long timeSearch)
time1
- the time1y1
- the y1time2
- the time2y2
- the y2timeSearch
- the time to which it should be interpolatedpublic static java.awt.Color getChartColor(int seriesIndex)
seriesIndex
- the series indexpublic static void setAbstractMainPanel(AbstractMainPanel abstractMainPanel)
AbstractMainPanel
.abstractMainPanel
- the new AbstractMainPanel
public static AbstractMainPanel getAbstractMainPanel()
AbstractMainPanel
.public static void setApplicationInUse(GlobalInfo.ApplicationInUse applicationInUse)
applicationInUse
- the new application in usepublic static GlobalInfo.ApplicationInUse getApplicationInUse()
public void showJPopupMenuApplicationSwitch(java.awt.Component invoker)
invoker
- the invokerpublic void actionPerformed(java.awt.event.ActionEvent ae)
actionPerformed
in interface java.awt.event.ActionListener
public void addExtensionJMenuItems(javax.swing.JMenu jMenu)
jPopupMenu
- the JPopupMenu that should be extendedpublic void addExtensionJMenuItems(javax.swing.JPopupMenu jPopupMenu)
jPopupMenu
- the JPopupMenu that should be extendedpublic void switchApplication(GlobalInfo.ApplicationInUse appToUse)
appToUse
- the new application to use (required)public static ScheduleCsvImportSettings getLastCsvImportSettings()
public static void setLastCsvImportSettings(ScheduleCsvImportSettings lastCsvImportSettings)
lastCsvImportSettings
- the lastCsvImportSettings to set