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