public class TidePredictionFactory
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
BASE_TIDE_FOLDER_PATH |
static java.lang.String |
defaultTideFormat |
static java.lang.String[] |
logFolderTidesFileExtensions |
static java.lang.String[] |
logFolderTidesFileOptions |
static java.lang.String |
MRA_TIDE_INDICATION_FILE |
static java.lang.String |
MRA_TIDE_INDICATION_FILE_PATH |
static java.lang.String |
MRA_TIDE_INDICATION_FILE_PATH_OLD |
static java.lang.String |
NO_TIDE_STR |
static java.lang.String |
OTHER_TIDE_STR |
Modifier and Type | Method and Description |
---|---|
static TidePredictionFinder |
create(IMraLogGroup source)
Creates a tide finder with either data in log (
logFolderTidesFileOptions )
or from GeneralPreferences.tidesFile . |
static TidePredictionFinder |
create(pt.lsts.imc.lsf.LsfIndex source)
Creates a tide finder with either data in log (
logFolderTidesFileOptions )
or from GeneralPreferences.tidesFile . |
static double |
currentTideLevel()
Return the current tide level for the loaded tide
tideFileInUse . |
static java.lang.String |
fetchData(java.awt.Component parent)
Visual helper to get tide data.
|
static java.lang.String |
fetchData(java.awt.Component parent,
java.lang.String harbor,
java.util.Date start,
java.util.Date end,
boolean showProgress)
Visual helper to get tide data.
|
static java.lang.String |
fetchData(java.lang.String harbor,
java.util.Date start,
java.util.Date end,
javax.swing.ProgressMonitor progress) |
static double |
getTideLevel(java.util.Date date)
Return the tide level for the loaded tide
tideFileInUse
at time provided. |
static double |
getTideLevel(long timestampMillis)
Return the tide level for the loaded tide
tideFileInUse
at time provided. |
static java.lang.String[] |
getTidesFileAsStringList()
Lists the tide list in the
ConfigFetch.getConfFolder() /tides folder. |
static java.io.File[] |
getTidesFileList()
Lists the tide list in the
ConfigFetch.getConfFolder() /tides folder. |
static java.io.File |
getTideSourceFile()
Return the current tides source file.
|
static java.lang.String |
getTideSourceString()
Return the current tides source as string.
|
static java.io.File |
getTidesSourceFileFrom(java.lang.String source)
Return the file from the source name.
|
static void |
main(java.lang.String[] args) |
static java.lang.String |
showTidesSourceChooserGuiPopup(java.awt.Component parent)
|
static java.lang.String |
showTidesSourceChooserGuiPopup(java.awt.Component parent,
java.lang.String currentSource)
|
static java.lang.String |
showTidesSourceChooserGuiPopup(java.awt.Component parent,
java.lang.String currentSource,
java.util.Date startDate,
java.util.Date endDate)
This will popup a dialog for the user to choose the tides source.
|
public static final java.lang.String MRA_TIDE_INDICATION_FILE
public static final java.lang.String MRA_TIDE_INDICATION_FILE_PATH
public static final java.lang.String MRA_TIDE_INDICATION_FILE_PATH_OLD
public static final java.lang.String BASE_TIDE_FOLDER_PATH
public static final java.lang.String NO_TIDE_STR
public static final java.lang.String OTHER_TIDE_STR
public static java.lang.String[] logFolderTidesFileOptions
public static java.lang.String[] logFolderTidesFileExtensions
public static java.lang.String defaultTideFormat
public static double currentTideLevel()
tideFileInUse
.public static double getTideLevel(long timestampMillis)
tideFileInUse
at time provided.public static double getTideLevel(java.util.Date date)
tideFileInUse
at time provided.
Loads or reloads the tides according with GeneralPreferences.tidesFile
.public static java.lang.String getTideSourceString()
public static java.io.File getTideSourceFile()
public static java.io.File getTidesSourceFileFrom(java.lang.String source)
BASE_TIDE_FOLDER_PATH
).source
- public static TidePredictionFinder create(IMraLogGroup source)
logFolderTidesFileOptions
)
or from GeneralPreferences.tidesFile
.
If none found return null.source
- public static TidePredictionFinder create(pt.lsts.imc.lsf.LsfIndex source)
logFolderTidesFileOptions
)
or from GeneralPreferences.tidesFile
.
If none found return null.source
- public static java.io.File[] getTidesFileList()
ConfigFetch.getConfFolder()
/tides folder.public static java.lang.String[] getTidesFileAsStringList()
ConfigFetch.getConfFolder()
/tides folder.public static java.lang.String showTidesSourceChooserGuiPopup(java.awt.Component parent)
parent
- public static java.lang.String showTidesSourceChooserGuiPopup(java.awt.Component parent, java.lang.String currentSource)
parent
- currentSource
- public static java.lang.String showTidesSourceChooserGuiPopup(java.awt.Component parent, java.lang.String currentSource, java.util.Date startDate, java.util.Date endDate)
parent
- The parent component for the created windows.currentSource
- The current source of tides (This should match the file name, no path, of a tide file in
BASE_TIDE_FOLDER_PATH
). This can be null.startDate
- The start date for the tide. This can be null (also imposes null for the end date). This will be
use to try to update the tides data.endDate
- The end date for the tide. This can be null (also imposes null for the satrt date). This will be
use to try to update the tides data.BASE_TIDE_FOLDER_PATH
)).public static java.lang.String fetchData(java.awt.Component parent)
parent
- The parent for the JProgressBar
and JOptionPane
shown.public static java.lang.String fetchData(java.awt.Component parent, java.lang.String harbor, java.util.Date start, java.util.Date end, boolean showProgress)
JProgressBar
will be shown.parent
- The parent for the JProgressBar
and JOptionPane
shown.harbor
- The harbor to fetch or null.start
- The start date or null.end
- The end date or null.showProgress
- If a JProgressBar
is shown or not.public static java.lang.String fetchData(java.lang.String harbor, java.util.Date start, java.util.Date end, javax.swing.ProgressMonitor progress)
harbor
- The harbor to fetch or null.start
- The start date or null.end
- The end date or null.progress
- If a JProgressBar
provided will be used otherwise null for not to show.public static void main(java.lang.String[] args)
Copyright © 2004-2020 FEUP-LSTS and Neptus developers. All Rights Reserved.