001 /* 002 * This file is part of McIDAS-V 003 * 004 * Copyright 2007-2013 005 * Space Science and Engineering Center (SSEC) 006 * University of Wisconsin - Madison 007 * 1225 W. Dayton Street, Madison, WI 53706, USA 008 * https://www.ssec.wisc.edu/mcidas 009 * 010 * All Rights Reserved 011 * 012 * McIDAS-V is built on Unidata's IDV and SSEC's VisAD libraries, and 013 * some McIDAS-V source code is based on IDV and VisAD source code. 014 * 015 * McIDAS-V is free software; you can redistribute it and/or modify 016 * it under the terms of the GNU Lesser Public License as published by 017 * the Free Software Foundation; either version 3 of the License, or 018 * (at your option) any later version. 019 * 020 * McIDAS-V is distributed in the hope that it will be useful, 021 * but WITHOUT ANY WARRANTY; without even the implied warranty of 022 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 023 * GNU Lesser Public License for more details. 024 * 025 * You should have received a copy of the GNU Lesser Public License 026 * along with this program. If not, see http://www.gnu.org/licenses. 027 */ 028 029 package edu.wisc.ssec.mcidasv; 030 031 import java.awt.Color; 032 033 import edu.wisc.ssec.mcidasv.util.McVGuiUtils; 034 035 import ucar.unidata.idv.IdvConstants; 036 import ucar.unidata.util.PatternFileFilter; 037 038 /** 039 * Application wide constants. 040 * @version $Id$ 041 */ 042 public interface Constants extends IdvConstants { 043 044 /** Path to a skin that creates a window with an empty comp group. */ 045 public static final String BLANK_COMP_GROUP = 046 "/edu/wisc/ssec/mcidasv/resources/skins/window/comptest.xml"; 047 048 /** 049 * The name of a thing that contains the data choosers and 050 * field selector 051 */ 052 public static final String DATASELECTOR_NAME = "McIDAS-V - Data Explorer"; 053 054 /** 055 * A thing that contains one or more of the things named 056 * <tt>PANEL_NAME</tt>. One of these can be either in a tab 057 * or in it's own window. 058 */ 059 public static final String DISPLAY_NAME = "Display"; 060 061 /** 062 * The name of a thing that contains the display/layer controls 063 */ 064 public static final String DISPLAYCONTROLLER_NAME = "Display Controller"; 065 066 /** Macro for the build date. */ 067 public static String MACRO_BUILDDATE = "%BUILDDATE%"; 068 069 /** Macro for the copyright year in the about HTML file. */ 070 public static String MACRO_COPYRIGHT_YEAR = "%COPYRIGHT_YEAR%"; 071 072 /** Macro for the IDV version in the about HTML file. */ 073 public static String MACRO_IDV_VERSION = "%IDVVERSION%"; 074 075 /** Macro for the version in the about HTML file. */ 076 public static String MACRO_VERSION = "%MCVERSION%"; 077 078 /** Macro for the VisAD version in the about HTML file. */ 079 public static String MACRO_VISAD_VERSION = "%VISADVERSION%"; 080 081 /** Default size for GUI elements */ 082 public static final int ELEMENT_WIDTH = 90; 083 public static final int GAP_RELATED = 6; 084 public static final int GAP_UNRELATED = (GAP_RELATED * 2); 085 public static final int ELEMENT_DOUBLE_WIDTH = ELEMENT_WIDTH * 2; 086 public static final int ELEMENT_ONEHALF_WIDTH = (int)Math.round(ELEMENT_WIDTH * 1.5); 087 public static final int ELEMENT_HALF_WIDTH = Math.round(ELEMENT_WIDTH / 2); 088 public static final int ELEMENT_DOUBLEDOUBLE_WIDTH = (ELEMENT_DOUBLE_WIDTH * 2) + ELEMENT_WIDTH + (GAP_RELATED * 3) + 24; 089 090 /** Icon locations for buttons */ 091 public static final String ICON_APPLY_SMALL = "/edu/wisc/ssec/mcidasv/resources/icons/buttons/action_go.gif"; 092 public static final String ICON_ACCEPT_SMALL = "/edu/wisc/ssec/mcidasv/resources/icons/buttons/accept.png"; 093 public static final String ICON_CANCEL_SMALL = "/edu/wisc/ssec/mcidasv/resources/icons/buttons/stop-loads16.png"; 094 public static final String ICON_EXCLAMATION_SMALL = "/edu/wisc/ssec/mcidasv/resources/icons/buttons/exclamation.png"; 095 public static final String ICON_INFORMATION_SMALL = "/edu/wisc/ssec/mcidasv/resources/icons/buttons/information.png"; 096 public static final String ICON_ERROR_SMALL = "/edu/wisc/ssec/mcidasv/resources/icons/buttons/error.png"; 097 public static final String ICON_HELP_SMALL = "/edu/wisc/ssec/mcidasv/resources/icons/buttons/show-help16.png"; 098 public static final String ICON_ADD_SMALL = "/edu/wisc/ssec/mcidasv/resources/icons/buttons/add.png"; 099 public static final String ICON_DELETE_SMALL = "/edu/wisc/ssec/mcidasv/resources/icons/buttons/delete.png"; 100 public static final String ICON_CONNECT_SMALL = "/edu/wisc/ssec/mcidasv/resources/icons/buttons/connect.png"; 101 public static final String ICON_DISCONNECT_SMALL = "/edu/wisc/ssec/mcidasv/resources/icons/buttons/disconnect.png"; 102 public static final String ICON_UNDO_SMALL = "/edu/wisc/ssec/mcidasv/resources/icons/buttons/arrow_undo.png"; 103 public static final String ICON_REDO_SMALL = "/edu/wisc/ssec/mcidasv/resources/icons/buttons/arrow_redo.png"; 104 public static final String ICON_REFRESH_SMALL = "/edu/wisc/ssec/mcidasv/resources/icons/buttons/view-refresh16.png"; 105 public static final String ICON_OPEN_SMALL = "/edu/wisc/ssec/mcidasv/resources/icons/buttons/document-open16.png"; 106 public static final String ICON_SAVE_SMALL = "/edu/wisc/ssec/mcidasv/resources/icons/buttons/save-as-fave-bundle16.png"; 107 public static final String ICON_SAVEAS_SMALL = "/edu/wisc/ssec/mcidasv/resources/icons/buttons/document-save16.png"; 108 public static final String ICON_PREFERENCES_SMALL = "/edu/wisc/ssec/mcidasv/resources/icons/buttons/preferences-system16.png"; 109 public static final String ICON_NEWWINDOW_SMALL = "/edu/wisc/ssec/mcidasv/resources/icons/buttons/application_add.png"; 110 public static final String ICON_NEWTAB_SMALL = "/edu/wisc/ssec/mcidasv/resources/icons/buttons/tab_add.png"; 111 public static final String ICON_NEXT_SMALL = "/edu/wisc/ssec/mcidasv/resources/icons/buttons/resultset_next.png"; 112 public static final String ICON_PREVIOUS_SMALL = "/edu/wisc/ssec/mcidasv/resources/icons/buttons/resultset_previous.png"; 113 public static final String ICON_RANDOM_SMALL = "/edu/wisc/ssec/mcidasv/resources/icons/buttons/view-refresh16.png"; 114 public static final String ICON_HELPTIPS_SMALL = "/edu/wisc/ssec/mcidasv/resources/icons/buttons/dialog-information16.png"; 115 public static final String ICON_CONSOLE_SMALL = "/edu/wisc/ssec/mcidasv/resources/icons/buttons/utilities-system-monitor16.png"; 116 public static final String ICON_CHECKVERSION_SMALL = "/edu/wisc/ssec/mcidasv/resources/icons/buttons/preferences-desktop-multimedia16.png"; 117 public static final String ICON_FORUMS_SMALL = "/edu/wisc/ssec/mcidasv/resources/icons/buttons/report_go.png"; 118 public static final String ICON_SUPPORT_SMALL = "/edu/wisc/ssec/mcidasv/resources/icons/buttons/email_go.png"; 119 public static final String ICON_DATAEXPLORER_SMALL = "/edu/wisc/ssec/mcidasv/resources/icons/buttons/mcidasv-round16.png"; 120 public static final String ICON_LOCALDATA_SMALL = "/edu/wisc/ssec/mcidasv/resources/icons/buttons/show-data16.png"; 121 public static final String ICON_COLORTABLE_SMALL = "/edu/wisc/ssec/mcidasv/resources/icons/buttons/x-office-presentation16.png"; 122 public static final String ICON_LAYOUTEDIT_SMALL = "/edu/wisc/ssec/mcidasv/resources/icons/buttons/accessories-text-editor16.png"; 123 public static final String ICON_RANGEANDBEARING_SMALL = "/edu/wisc/ssec/mcidasv/resources/icons/buttons/network-wireless16.png"; 124 public static final String ICON_LOCATION_SMALL = "/edu/wisc/ssec/mcidasv/resources/icons/buttons/start-here16.png"; 125 public static final String ICON_BACKGROUND_SMALL = "/edu/wisc/ssec/mcidasv/resources/icons/buttons/background-image16.png"; 126 public static final String ICON_USERSGUIDE_SMALL = "/edu/wisc/ssec/mcidasv/resources/icons/buttons/book_open.png"; 127 public static final String ICON_GETTINGSTARTED_SMALL = "/edu/wisc/ssec/mcidasv/resources/icons/buttons/book_next.png"; 128 public static final String ICON_NOTE_SMALL = "/edu/wisc/ssec/mcidasv/resources/icons/buttons/note.png"; 129 public static final String ICON_MCIDASV_SMALL = "/edu/wisc/ssec/mcidasv/resources/icons/buttons/mcidasv-round16.png"; 130 131 public static final String ICON_DEFAULTLAYOUT_SMALL = "/edu/wisc/ssec/mcidasv/resources/icons/buttons/key.png"; 132 public static final String ICON_DEFAULTLAYOUTADD_SMALL = "/edu/wisc/ssec/mcidasv/resources/icons/buttons/key_add.png"; 133 public static final String ICON_DEFAULTLAYOUTDELETE_SMALL = "/edu/wisc/ssec/mcidasv/resources/icons/buttons/key_delete.png"; 134 135 public static final String ICON_REMOVE_SMALL = "/edu/wisc/ssec/mcidasv/resources/icons/buttons/edit-cut16.png"; 136 public static final String ICON_REMOVELAYERS_SMALL = "/edu/wisc/ssec/mcidasv/resources/icons/buttons/remove-layers16.png"; 137 public static final String ICON_REMOVEDATA_SMALL = "/edu/wisc/ssec/mcidasv/resources/icons/buttons/remove-data16.png"; 138 public static final String ICON_REMOVELAYERSDATA_SMALL = "/edu/wisc/ssec/mcidasv/resources/icons/buttons/remove-layers-data16.png"; 139 140 public static final String ICON_FAVORITE_SMALL = "/edu/wisc/ssec/mcidasv/resources/icons/buttons/fave-bundle16.png"; 141 public static final String ICON_FAVORITESAVE_SMALL = "/edu/wisc/ssec/mcidasv/resources/icons/buttons/save-as-fave-bundle16.png"; 142 public static final String ICON_FAVORITEMANAGE_SMALL = "/edu/wisc/ssec/mcidasv/resources/icons/buttons/manage-favorite16.png"; 143 144 public static final String ICON_CANCEL = "/edu/wisc/ssec/mcidasv/resources/icons/toolbar/stop-load22.png"; 145 public static final String ICON_HELP = "/edu/wisc/ssec/mcidasv/resources/icons/toolbar/show-help22.png"; 146 public static final String ICON_REFRESH = "/edu/wisc/ssec/mcidasv/resources/icons/toolbar/view-refresh22.png"; 147 public static final String ICON_UPDATE = "/edu/wisc/ssec/mcidasv/resources/icons/toolbar/system-software-update22.png"; 148 public static final String ICON_OPEN = "/edu/wisc/ssec/mcidasv/resources/icons/toolbar/document-open22.png"; 149 public static final String ICON_SAVE = "/edu/wisc/ssec/mcidasv/resources/icons/toolbar/document-save22.png"; 150 151 /** 152 * Java OS descriptor for the Max OSX operating system. This should be 153 * constant for any machine running java on OSX. 154 */ 155 public static final String OS_OSX = "Mac OS X"; 156 /** 157 * The name of thing that contains the actual VisAD display, 158 * the animation control, view and projection menus, and the 159 * toolbar. 160 */ 161 public static final String PANEL_NAME = "Panel"; 162 163 /** Gail's server preference manager. */ 164 public static final String PREF_LIST_ADDE_SERVERS = "ADDE Servers"; 165 166 /** Server state preference ID prefix. Holds the last server/group used. */ 167 public static final String PREF_SERVERSTATE = "idv.chooser.adde.serverstate"; 168 169 /** The server/group to use if there is no value associated with {@link #PREF_SERVERSTATE}. */ 170 public static final String[] DEFAULT_SERVERSTATE = new String[] { "adde.ucar.edu", "RTIMAGES" }; 171 172 /** Advanced prefs for IDV, Java, and McIDAS-X. */ 173 public static final String PREF_LIST_ADVANCED = "Advanced"; 174 175 /** Advanced prefs for IDV, Java, and McIDAS-X. */ 176 public static final String PREF_LIST_LOCAL_ADDE = "Local Data"; 177 178 /** Prefs for which display types to allow. */ 179 public static final String PREF_LIST_AVAILABLE_DISPLAYS = "Available Displays"; 180 181 /** Prefs for which data choosers should show up. */ 182 public static final String PREF_LIST_DATA_CHOOSERS = "Data Sources"; 183 184 /** Name of panel containing prefs related to data formatting. */ 185 public static final String PREF_LIST_FORMATS_DATA = "Formats & Data"; 186 187 /** Name of the panel that holds the "general" sorts of user prefs. */ 188 public static final String PREF_LIST_GENERAL = "General"; 189 190 /** Panel name for the different nav control scheme prefs. */ 191 public static final String PREF_LIST_NAV_CONTROLS = "Navigation Controls"; 192 193 /** Pref for image chooser to include system servers */ 194 public static final String PREF_SYSTEMSERVERSIMG = 195 "mcidasv.chooser.adde.image.servers.system"; 196 197 /** Prefs for configuring what appears in the toolbar. */ 198 public static final String PREF_LIST_TOOLBAR = "Toolbar Options"; 199 200 /** Name of the different prefs for configuring how tabs/windows look. */ 201 public static final String PREF_LIST_VIEW = "Display Window"; 202 203 /** Pref ID for limiting # of new windows when loading bundles. */ 204 public static final String PREF_OPEN_LIMIT_WIN = "mcv.open.limitwin"; 205 206 /** The name of the version check user preference. */ 207 public static final String PREF_VERSION_CHECK = "mcidasv.doversioncheck"; 208 209 /** The name of the prerelease check user preference. */ 210 public static final String PREF_PRERELEASE_CHECK = "mcidasv.doprereleasecheck"; 211 212 /** Name of the {@literal "remove all data warning"} preference. */ 213 public static final String PREF_CONFIRM_REMOVE_DATA = 214 "mcv.warn.remove.data.all"; 215 216 /** Name of the {@literal "remove all layers warning"} preference. */ 217 public static final String PREF_CONFIRM_REMOVE_LAYERS = 218 "mcv.warn.remove.layers.all"; 219 220 /** Name of the {@literal "remove everything warning"} preference. */ 221 public static final String PREF_CONFIRM_REMOVE_BOTH = 222 "mcv.warn.remove.everything"; 223 224 /** Preference for controlling the automated saving of the default layout. */ 225 public static final String PREF_AUTO_SAVE_DEFAULT_LAYOUT = "mcidasv.defaultlayout.autosave"; 226 227 public static final String PREF_SAVE_DASHBOARD_VIZ = "mcidasv.dashboard.savevisibility"; 228 229 /** Preference for saving image preview default */ 230 public static final String PREF_IMAGE_PREVIEW = "mcidasv.chooser.adde.preview"; 231 232 /** 233 * Show large or small icons. If PREF_TBM_ICONS is disabled, this pref 234 * has no meaning. 235 */ 236 public static final String PREF_TBM_SIZE = "tbm.icon.size"; 237 238 /** Property name for for the path to about dialog template. */ 239 public static String PROP_ABOUTTEXT = "mcidasv.about.text"; 240 241 /** Path to the main McIDAS-V icon. */ 242 public static final String PROP_APP_ICON = "mcidasv.window.icon"; 243 244 /** WHen was visad.jar built? */ 245 public static String PROP_VISAD_DATE = "visad.build.date"; 246 247 /** What version of VisAD lives within visad.jar? */ 248 public static String PROP_VISAD_REVISION = "visad.build.revision"; 249 250 /** Was there a problem determing VisAD's version? */ 251 public static String PROP_VISAD_PARSE_FAIL = "visad.build.parsefail"; 252 253 /** What exactly broke the version extraction? */ 254 public static String PROP_VISAD_ORIGINAL = "visad.build.contents"; 255 256 /** When was McIDAS-V built? */ 257 public static String PROP_BUILD_DATE = "mcidasv.build.date"; 258 259 /** Property name for the copyright year. */ 260 public static String PROP_COPYRIGHT_YEAR = "mcidasv.copyright.year"; 261 262 /** Property name for the McIdas-V homepage URL. */ 263 public static String PROP_HOMEPAGE = "mcidasv.homepage"; 264 265 /** Specifies use of {@code edu.wisc.ssec.mcidasv.ui.TabbedUIManager}. */ 266 public static final String PROP_TABBED_UI = "mcidasv.tabbedDisplay"; 267 268 /** Property name for the major version number. */ 269 public static String PROP_VERSION_MAJOR = "mcidasv.version.major"; 270 271 /** Property name for the minor version number. */ 272 public static String PROP_VERSION_MINOR = "mcidasv.version.minor"; 273 274 /** Property name for the version release number. */ 275 public static String PROP_VERSION_RELEASE = "mcidasv.version.release"; 276 277 /** Property name for the path to version file. */ 278 public static String PROP_VERSIONFILE = "mcidasv.version.file"; 279 280 /** Property that determines whether the view panel should pop up. */ 281 public static final String PROP_VP_SHOWPOPUP = 282 "idv.ui.viewpanel.showpopup"; 283 284 /** Property for whether view panel categories will be shown. */ 285 public static final String PROP_VP_SHOWCATS = 286 "idv.ui.viewpanel.showcategories"; 287 288 /** typo was found in IDV code. */ 289 public static final String PROP_VP_CATOPEN = "viewpanel.catgegory.open"; 290 291 /** Property used to restore the size and position of the dashboard upon start. */ 292 public static final String PROP_DASHBOARD_BOUNDS = "mcidasv.dashboard.bounds"; 293 294 /** Application property file name. */ 295 public static final String PROPERTIES_FILE = 296 "/edu/wisc/ssec/mcidasv/resources/mcidasv.properties"; 297 298 /** McIDAS-V webpage base url */ 299 public static final String HOMEPAGE_URL = "https://www.ssec.wisc.edu/mcidas/software/v"; 300 301 /** Location of latest version file under base url */ 302 public static final String VERSION_URL = "stable/version.txt"; 303 public static final String VERSION_HANDLER_URL = "stable/version.php"; 304 305 /** Location of latest prerelease directory under base url */ 306 public static final String PRERELEASE_URL = "prerelease/"; 307 308 /** Location of latest notice file under base url */ 309 public static final String NOTICE_URL = "stable/notice.txt"; 310 311 public static final String SCRUB_STRINGS_FILE = "/edu/wisc/ssec/mcidasv/resources/scrubstrings.xml"; 312 313 /** Where to look for javahelp */ 314 public static final String DEFAULT_DOCPATH = "/docs/userguide"; 315 316 /** File suffix for bundle files */ 317 public static final String SUFFIX_MCV = ".mcv"; 318 319 /** File suffix for compressed bundle files */ 320 public static final String SUFFIX_MCVZ = ".mcvz"; 321 322 /** File filter used for bundle files */ 323 public static final PatternFileFilter FILTER_MCV = 324 new PatternFileFilter("(.+\\.mcv$)", "McIDAS-V Bundles (*.mcv)", SUFFIX_MCV); 325 326 /** File filter used for bundle files */ 327 public static final PatternFileFilter FILTER_MCVZ = 328 new PatternFileFilter("(.+\\.mcvz$)", "McIDAS-V Zipped Data Bundles (*.mcvz)", SUFFIX_MCVZ); 329 330 /** File filter used for bundle files */ 331 public static final PatternFileFilter FILTER_MCVMCVZ = 332 new PatternFileFilter("(.+\\.mcv$|.+\\.mcvz$)", "All McIDAS-V Bundles (*.mcv,*.mcvz)", SUFFIX_MCV); 333 334 /** Default port for local ADDE servers */ 335 public static final String LOCAL_ADDE_PORT = "8112"; 336 337 public static final String PROP_CHAN = "selectedchannel"; 338 339 /** Preference to store what ADDE servers to show */ 340 public static final String PROP_SERVERS = "idv.serverstoshow"; 341 342 /** Preference to store whether to show all ADDE servers */ 343 public static final String PROP_SERVERS_ALL = "idv.serverstoshow.all"; 344 345 /** Name to store the total system memory */ 346 public static final String PROP_SYSMEM = "idv.sysmem"; 347 348 /** Maximum amount of memory 32bit JREs can address, in megabytes */ 349 public static final int MAX_MEMORY_32BIT = 1536; 350 351 /** A particular shade of blue we are using for branding */ 352 public static final Color MCV_BLUE = new Color(96, 176, 224); 353 public static final Color MCV_BLUE_DARK = new Color(0, 96, 255); 354 355 /** Identifier for the {@literal "monitor panel"} window component. */ 356 public static final String COMP_MONITORPANEL = "mcv.monitorpanel"; 357 358 /** Default user directory name */ 359 public static final String USER_DIRECTORY_NAME = "McIDAS-V"; 360 }