Class DisplayControlImpl
- All Implemented Interfaces:
ActionListener,ItemListener,PropertyChangeListener,EventListener,HyperlinkListener,Sharable,DataChangeListener,DisplayControl,Prototypable,ControlListener,DisplayListener
- Direct Known Subclasses:
ADTControl,AerologicalSoundingControl,AnimationTextControl,AudioControl,ChatLogControl,DrawingControl,GridDisplayControl,HydraControl,ImageMovieControl,LocationIndicatorControl,MapDisplayControl,MovieDisplayControl,MultiDisplayHolder,NoteControl,ObsDisplayControl,OmniControl,ProbeControl,ProfilerControl,RadarGridControl,RangeAndBearingControl,RGBCompositeControl,ScatterDisplay,ShapefileControl,TextDisplayControl
- Author:
- IDV development team
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classClass SideLegendLabel Does the underline -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ListThis is the list of DataCategory-s that were defined for this DisplayControl by the idv/controls.properties and ControlDescriptor code.protected ColorScaleInfoHolds the color scale informationprotected ListThis is the color scale widget for a displayprotected ContourInfoUsed to hold contour information if this control is enabled for it.protected StringUsed by the isl to override selective parameters in the default contourInfoprotected ContourWidgetThis is the contour info gui widget for controls enabled for contoursprotected ControlContextThis is the context in whcih this display control exists (typically an instance of the IntegratedDataViewer but we use the ControlContext interface to keep us honest and not sloppy).protected ColorTableWidgetThis is the color table gui widget for controls enabled for color tablesprotected DataSelectionTheDataSelectionthat holds any data subsetting specifications (e.g., time).protected StringThe name of the ViewManager that any displays should be added toprotected ViewManagerThis can be used to temporarily set a ViewManager that is to be used.protected final StringThe name for the text type for the display list.protected HashtableThis is the table of the view manager display list displayablesprotected booleanA boolean to see if the display list got it's color from the display.protected ListHolds theDisplayMaster-s that this control wholly owns (e.g., profile display master).protected UnitThe Unit (may be null) that is used to display data.protected StringThe url to show help for this control.protected StringThis is the initial text note text.protected booleanThis gets set to track when we have been re-instantiated from a bundle without any data.booleanFlag for progressive resolution.booleanFlag for matching the display regionprotected JTextAreaThe text area widget used for the control text notesprotected JComponentThe Container that holds the noteTextArea.protected StringThe name of the parameter (if there is one)booleanFlag for reloading from boundsprotected HashtableA hashtable that is used to hold extra properties that are passed to theDataChoicethrough the getData called.protected StringThe label to show the resolution readout in the side legendprotected SelectRangeWidgetThis is the contour info gui widget for controls enabled for contoursprotected booleanA flag to check if this control is in the middle of toggling its visibility checkboxes.protected ListContains a list of allSharableobjects (e.g., AnimationWidget) that are created by this control.protected booleanDo we show the note text?protected JSliderslider for setting skip valuesprotected doubleversionprotected ListHolds theViewManager-s that this control has created.protected static final doublefudge factor for the Z positionFields inherited from class ucar.unidata.idv.control.DisplayControlBase
APPEARANCE_DARK, APPEARANCE_IDV, APPEARANCE_LIGHT, CMD_BARBSIZE, CMD_COLORS, CMD_COLORTABLE, CMD_INTERVAL, CMD_LEVEL, CMD_LINEWIDTH, CMD_POPUP, CMD_REMOVE, DEFAULT_POINT_SIZE, DEFAULT_SAMPLING_MODE, FIND_ALL, FIND_CATEGORY, FIND_CLASS, FIND_SPECIAL, FIND_THIS, FIND_WITHDATA, FIND_WITHTHISDATA, FIND_WITHTHISFIELD, FIND_WITHTHISVIEW, FLAG_COLOR, FLAG_COLORTABLE, FLAG_COLORUNIT, FLAG_CONTOUR, FLAG_DATACONTROL, FLAG_DISPLAYUNIT, FLAG_GRIDTRAJECTORY, FLAG_LINEWIDTH, FLAG_NONE, FLAG_SELECTRANGE, FLAG_SKIPFACTOR, FLAG_SMOOTHING, FLAG_TEXTUREQUALITY, FLAG_TIMERANGE, FLAG_ZPOSITION, GRID_INSETS, ICON_LOCK, ICON_REMOVE, ICON_UNLOCK, LABEL_NONE, log_, MACRO_DATASOURCENAME, MACRO_DISPLAYNAME, MACRO_DISPLAYUNIT, MACRO_FHOUR, MACRO_FHOUR2, MACRO_LONGNAME, MACRO_POSITION, MACRO_RESOLUTION, MACRO_SHORTNAME, MACRO_STATION, MACRO_TIMESTAMP, MACRO_VALUE, NEAREST_NEIGHBOR, PREF_DISPLAYLIST_TEMPLATE, PREF_EXTRALABEL_TEMPLATE, PREF_LEGENDLABEL_TEMPLATE, PROP_REMOVED, SETTINGS_GROUP_DISPLAY, SETTINGS_GROUP_FLAGS, SHARE_CHOICES, SHARE_COLOR, SHARE_COLORSCALE, SHARE_COLORTABLE, SHARE_DISPLAYUNIT, SHARE_POSITION, SHARE_SELECTRANGE, SHARE_SKIPVALUE, SHARE_TRANSECT, SHARE_VISIBILITY, WEIGHTED_AVERAGEFields inherited from interface ucar.unidata.idv.DisplayControl
BOTTOM_LEGEND, DEFAULT_PROBEFORMAT, PREF_PREFIX, PREF_PROBEFORMAT, PREF_REMOVEONWINDOWCLOSE, PREF_SAMPLING_MODE, PREF_STANDALONE_REMOVEONCLOSE, PREF_STANDALONE_REMOVEONCLOSE_ASK, PROP_LEGENDICON, RASTERMODE_SHOWALL, RASTERMODE_SHOWNONRASTER, RASTERMODE_SHOWRASTER, SIDE_LEGEND -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.DisplayControlImpl(ControlContext controlContext) Create a DisplayControlImple from a ControlContext -
Method Summary
Modifier and TypeMethodDescriptionvoidactionPerformed(ActionEvent event) Process the actions of any of the controls created with the doMake...Control method calls.protected voidActivate each DisplayInfoprotected voidAdd the givenDisplayableto the list of attribute displayables.protected voidaddAttributedDisplayable(Displayable d, int attributeFlags) Add the givenDisplayableto the list of displayables.protected voidaddAttributedDisplayable(Displayable d, int attributeFlags, int notGlobalFlags) Add the given Displayable into the list of attributed displayables managed by this DisplayControl.protected voidaddAttributeFlags(int f) Add the given attribute flag (e.g., FLAG_COLORTABLE) to the attrbiute flag map.protected voidaddCheckBoxSettings(List comps, Hashtable methodNameToSettingsMap) Add checkbox type settings to the Properties panelbooleanAdd the givenDataChoiceto the list of data choices and return true if this is a new DataChoice.Add the givenDisplayableinto aViewManageraddDisplayable(Displayable theDisplay, int attributeFlag) A wrapper around addDisplayable (Displayable theDisplay, ViewDescriptor viewDescriptor), passing in the default LASTACTIVE ViewDescriptor.addDisplayable(Displayable theDisplay, ViewDescriptor viewDescriptor) Find theViewManagerdefined by the givenViewDescriptor.addDisplayable(Displayable theDisplay, ViewDescriptor viewDescriptor, int flag) addDisplayable(Displayable theDisplay, ViewManager viewManager) Add the givenDisplayableinto the givenViewManageraddDisplayable(Displayable theDisplay, ViewManager viewManager, int flag) Add the givenDisplayableinto the givenViewManagerprotected voidA sub-class can register any DisplayMaster-s created and managed by them.protected voidAdd property values for this DisplaySettingsDialogprotected voidaddLabelMacros(String template, List patterns, List values) Add any macro name/value pairs.protected voidaddNewData(List newChoices) Called when the user chooses new data for this displayprotected voidaddNoteText(JPanel mainPanel, JComponent noteWrapper) Insert the given noteWrapper (which holds the note text TextArea) into the guiprotected voidAdd tabs to the properties dialog.voidAdd a property change listener.voidaddRemovable(Removable removable) Add something to be removed on doRemovevoidA sub-class can register anySharableImpl-s created and managed by them.protected voidaddTimeModeWidget(List controlWidgets) Add in the time mode widget to the list of control widgetsprotected voidAdd to the control contextvoidaddToRangeMenu(ColorTableWidget cw, List items) A hook to add an entry into the range menuvoidaddToRangeMenu(RangeDialog selectRangeWidget, List items) A hook to add an entry into the range menuvoidaddToRangeMenu(RangeWidget rw, List items) A hook to add an entry into the range menuprotected voidA sub-class can register anyViewManager-s created and managed by them.voidappendDataChoices(List newDataChoices) Append the given list ofDataChoice-s to the myDataChoices listprotected voidUsed to apply all of the display attributes taht are active to theDisplayable-sprotected voidIf the color is non-null then apply it to theDisplayables in the displayables list that are flagged with the FLAG_COLORprotected voidIf the colorScaleInfo is non-null then apply it to theDisplayables in the displayables list that are flagged with the FLAG_COLORTABLEprotected voidIf the color table is non-null then apply it to theDisplayables in the displayables list that are flagged with the FLAG_COLORTABLEprotected voidIf the color unit (gotten from a call to getUnitForColor) is non-null then apply it to theDisplayables in the displayables list that are flagged with the FLAG_COLORUNITprotected voidIf the contourInfo is non-null then apply it to theDisplayables in the displayables list that are flagged with the FLAG_CONTOURvoidapplyDisplaySetting(DisplaySetting displaySetting) Apply a display setting to this controlprotected voidIf the color unit (gotten from a call to getUnitForColor) is non-null then apply it to theDisplayables in the displayables list that are flagged with the FLAG_DISPLAYUNITprotected StringapplyForecastHourMacro(String t, DateTime currentTime) Apply the forecast hour macroprotected voidApply the line width to the displayables with FLAG_LINEWIDTH setvoidApply preferences to this control.final booleanApply the properties from the dialogvoidapplyProperties(Hashtable properties) voidapplyPropertyValues(List props) Apply the property values in the listprotected voidApply the range it to theDisplayables in the displayables list that are flagged with the FLAG_COLORTABLEprotected voidApply the range it to theDisplayables in the displayables list that are flagged with the FLAG_SELECTRANGEprotected voidUse the value of the skip factor to subset the data.protected voidUse the value of the smoothing properties to set the value on the display.protected voidUse the value of the texture quality to set the value on the displayvoidCalled when we have set the time range.protected voidApply the z position to the displayables with FLAG_ZPOSITION setprotected booleanboundsClose(double a, double b) See if two values are closebooleanCan this be dockedprotected booleanDoes this control support progressive resolution? Subclasses should override.booleanCan this display control write out data.protected booleanSee if this can save data in cache.voidScreen snapshot of windowprotected voidIf this display has a dataprojection then center the view to itvoidChange the color unit.voidChange the display unit.protected voidCheck to see if the screen bounds have changedprotected booleancheckFlag(int f) Test if the given flag is set in the attrbiuteFlagsprotected booleanImplements the default check if the new DataInstance/DataChoice pair holds valid data.protected voidcheckImageSize(FieldImpl image) If image is bigger than threshold then set the skip valueprotected voidClear the DataInstancevoidClear the prototype (default) for this display controlprotected voidRuns through the list of ViewManager-s and tells each to destroy.voidclose()Close the window.protected voidcolorUnitChanged(Unit oldUnit, Unit newUnit) A hook that is called when the color unit is changed.voidcontrolChanged(ControlEvent event) Noop for the ControlListener interfaceconvertColorRange(Range rawRange, Unit rawUnit) Utility to convert the given raw data range into the display unitsconvertRange(Range rawRange, Unit rawUnit, Unit outUnit) Utility to convert the given raw data range into the display unitsprotected DisplayableDataMake the DisplayListDisplayableprotected IdvWindowCreate an IDV windowvoidImplementation ofDataChangeListener.protected voidDeActivate each DisplayInfovoidDebugvoidMove the displayable to the frontfinal voiddisplayChanged(DisplayEvent event) Noop for the DisplayListener interfacevoidMethod to do what needs to be done when the display control failed.protected voiddisplayUnitChanged(Unit oldUnit, Unit newUnit) A hook that is called when the display unit is changed.booleanApply the propertiesvoidCalled by ISL.protected voidDo the initial update legend and listprotected JComponentCreate and return the gui component which is used to display this DisplayControl in the "legend" area of its ViewManager.protected JMenuUtility to make the menu item for changing the color.protected JMenudoMakeChangeColorMenu(String name) Utility to make the menu item for changing the color.protected JMenuItemUtility to make the menu item for changing the data choiceA wrapper around doMakeColorControl (Color color), passing in null as the Color argument.doMakeColorControl(Color color) This creates a gui control for selecting a Color.protected voidActually create the color scalesprotected ContainerMake Gui contentsprotected DataInstancedoMakeDataInstance(DataChoice dataChoice) Creates and returns theDataInstancecorresponding to aDataChoice.protected JMenuBarMake the menu barprotected ListdoMakeMenuBarMenus(List menus) Make the menus to put in the menu barMake the point size widgetdoMakeRemoveControl(String tooltip) Create the gui control (a JButton) that allows the user to remove this DisplayControl.protected JComponentCreate and return the gui component which is used to display this DisplayControl in the "legend" area of its ViewManager.protected ComponentMake the skip factor slider.protected JComponentMake the smoothing widgetprotected JSliderMake a slider for the texture qualitydoMakeVisibilityControl(String label) Get the toggle button JCheckBox that is source for item listener events to toggle visibility of the display.protected JComponentA helper method for constructing the ui.protected voidCalled by the derived class init method to create the gui window.protected JComponentCreate the z position slider panelvoiddoRemove()Remove this DisplayControl.voidexportDisplayedData(String type) Export displayed data to fileprotected DisplayInfofindDisplayInfo(Displayable displayable) Find the DisplayInfo for a displayableprotected ListfindDisplays(String key) Find displays based on the keyprotected ListfindDisplays(String key, List displays) Find displays with the particular key in the list of displaysprotected voidFire a property change event.voidThis gets called by the view manager when it has rcvd its first frame_done event.protected StringFormat a real for the cursor readoutbooleanIs this control active, i.e., has this control not gotten removed yetGet the animationprotected AnimationgetAnimation(boolean createOurOwn) Get the Animation for this display.protected AnimationgetAnimation(boolean createOurOwn, RealType timeType) Get the Animation for this display.protected AnimationgetAnimation(RealType timeType) Create, if needed, and return the Animation to useGet the AnimationInfo property.Create, if needed, and return the AnimationWidgetprotected intReturn the attribute flag mapGet the cache of data.booleanUsed by the IDV to determine whether a control should be removed when the user does a remove all.Returns the list of data categories.protected StringA hook to allow derived classes to have their own label in the menu for the change data call.booleanGet the collapsed legend property.getColor()Get the color for the selector.floatGet the ColorDimness property.Get the contour information for any contoursGet theColorTableproperty.float[][]The default is to use the alpha color table.protected ColorTableGet the color table to use when applying to displayablesGet the ColorTableWidget using the specified range.protected UnitReturn the colorUnit The get and set methods here are protected so the XmlEncoder will not try to encode them.This is used for xml persistence.Return the label that is to be used for the color widget This allows derived classes to override this and provide their own name,Get the ComponentHolder property.protected ContainerGet the GUI contentsGet the contour information for any contoursprotected longThis returns the time to sleep, in milliseconds, between checks for finally handling control changed events.This is theIntegratedDataViewergetControlMenus(JComponent comp) Get the list of menus associated with this control.voidgetControlWidgets(List<ControlWidget> controlWidgets) Add into the given the widgets for the different attributesfinal ListgetCursorReadout(EarthLocation el, Real animationValue, int animationStep, List<ReadoutInfo> samples) Get the list of items for the cursor readoutprotected final ListgetCursorReadoutInner(EarthLocation el, Real animationValue, int animationStep) The getCursorReadout method that really does the workprotected ListgetCursorReadoutInner(EarthLocation el, Real animationValue, int animationStep, List<ReadoutInfo> samples) Get the list of items, subclasses should overridegetData(DataInstance dataInstance) A wrapper around dataInstance.getData but this calls updateDataInstance firstReturn the singleDataChoiceReturn the list of currentDataChoice-sGet the data for the display listWe have this here (in part) for xml persistencegetDataInstance(boolean forceCreation) We have this here (in part) for xml persistenceget MapProjection of data to displayGet the MapProjection for this data; if have a single point data object make synthetic map projection for locationprotected StringGet the data projection labelThis is used for xml persistence.Get the DataSources associated with this contolGet the DataTimeRange property.getDataTimeRange(boolean createIfNeeded) Get the DataTimeRange property.protected SetCollect the time animation set from the displayables.protected voidWhen we are iun debug mode this method gets called to add details htmlprotected ColorScaleInfoGet the default color scale infoprotected StringGet the default display list template for this control.protected UnitGet the default distance unitprotected booleanGet the default for fast renderingGet the perferred sampling mode.intGet the integer value of the default sampling modeReturn the name of the firstViewManagerfound in the list ofDisplayInfo-s.Return theViewDescriptorto use.Return the name of the firstViewManagerfound in the list ofDisplayInfo-s.protected StringGet the contents of the details htmlUtility method to get the altitude type of the displayThis is the category that is defined for this control.Get the center of the displayGet theDisplayConventionsto use.protected DataGet the DisplayedDataThe id of this control (from controls.xml) We have this here for xml persistenceReturn the list ofDisplayInfoobjects held by this control.Get the DisplayListColor property.protected DataAdd the data to the in display legendGet the displayable for the Display ListGet the DisplayListTemplate property.getDisplayMaster(Displayable displayable) A helper method for finding theDisplayMasterthat displays the givenDisplayableReturns the name of this display.floatGet the scaling factor for probes and such.Return the display unitprotected UnitgetDisplayUnit(Unit rawUnit) Returns the default display unit to be used.Get the name of the display unit (if non-null) This is used for xml persistence.booleanGet the visibility of the displaybooleanGet the DoCursorReadout property.getEditMenuItems(List items) Add the relevant edit menu items into the listprotected voidgetEditMenuItems(List items, boolean forMenuBar) Add the relevant edit menu items into the listbooleanGet the ExpandedInTabs property.Get the ExtraLabelTemplate property.protected JComponentgetExtraLegendComponent(int legendType) Assume that any display controls that have a color table widget will want the color table to show up in the legend.protected voidgetExtraMenus(List menus, boolean forMenuBar) Get any extra menus for this control.getFileMenuItems(List items) Add the relevant edit menu items into the listprotected voidgetFileMenuItems(List items, boolean forMenuBar) Add the relevant file menu items into the listprotected GraphicsConfigurationgetGraphicsConfiguration(boolean is3D, boolean useStereo) Get the graphics configurationgetGrid(GridDataInstance dataInstance) A wrapper around dataInstance.getGrid but this calls updateDataInstance firstgetGrid(GridDataInstance dataInstance, boolean copy) A wrapper around dataInstance.getGrid but this calls updateDataInstance firstbooleanGet the HadDataChoices property.booleanHas this control been initializedReturn the list of (String) java help idsprotected voidgetHelpMenuItems(List items, boolean forMenuBar) Add the help menu itemsgetId()Get the Id property.getIdv()Get the integraed data viewer that this is part ofgetImage()Get the imageGet the image of "what"Used to publicize the list of data choices for the persitence mechanism.protected ColorTableA hook so derived classes can return a colortable.protected booleanGet the initial fast rendering propertyprotected RangeHook method to allow derived classes to return a different initialRangeprotected doubleGet the initial Z positionprotected AnimationCreate if needed and return an Animationprotected AnimationgetInternalAnimation(RealType timeType) Create if needed and return an Animationboolean_more_booleanIs this a raster display?booleanGet the IsTimeDriver property.getLabel()Used by the idv classesprotected voidgetLastFileMenuItems(List items) Get last file menu items.ucar.unidata.geoloc.LatLonPoint[]getLatLonPoints(double[][] xyPoints) _more_getLegendButtons(int legendType) Set the legend buttonsgetLegendComponent(int legendType) Return the gui component used to display this DisplayControl within a ViewManager.getLegendLabel(int legendType) This is the main JLabel used in the legend.protected voidgetLegendLabels(List labels, int legendType) This method is used to get all of the labels (String) that are shown in the side legend.Get the LegendLabel property.protected StringReturn the tooltip text that is to be shown in the legend This method constructs html that shows the display name, choices, link to help, etc.intGet the line width property.Get the LineWidthWidgetReturn the label that is to be used for the line width widget This allows derived classes to override this and provide their own name,booleanGet the locking visibility of the displayprotected StringGet the long parameter nameprotected voidgetMacroNames(List names, List labels) Add any macro name/label pairsGet the component for the main panel of this DisplayControlImpl's contents.Get the main panel sizebooleanShould this control make its own window.Just calls getNavigatedDisplayA helper method for finding theMapViewManagerthis control displays in.Get the projection from the main display.booleanShould we match the display region for spatial boundsReturn the label used for the menues in the IDV.Return the list of currentDataChoice-s deprecated Use getDataChoicesA helper method for finding theNavigatedDisplayof this control'sMapViewManager.This is the value (String) of the note text area.Return the object store from the getControlContextbooleanGet whether it's okay to fire events to listeners.protected final ColorTableJust a utility for bundles that were created with the old code that saved off the color table name, not the color table.Get the name of the data choice, if there is one, when we are saving off without dataThe outer contents is the outermost component of the gui (i.e., it holds the menu bar and the mainPanel)floatGet the PointSize property.booleangetProperty(String name, boolean dflt) Wrapper around ControlContext.getProperty methodgetProperty(String name, String dflt) Wrapper around ControlContext.getProperty methodI forgot why there was this getter (with the "Property") heregetRange()Get the range for the parameterGet the range for the color table.Get the range to use to apply to displayablesGet the raw data unit.protected HashtableCreate (if null) and return the Hashtable that holds the extra request properties used in a getData call on theDataChoicegetSamplingModeName(int mode) Get the name of the sampling modeintGet the sampling modeintgetSamplingModeValue(String samplingMode) Get the integer value for the sampling mode suppliedprotected voidgetSaveMenuItems(List items, boolean forMenuBar) Add in the menu items for the save and export display templateGet the range for the databooleanGet the SelectRangeEnabled property.Get the SelectRangeWidget using the specified range.protected JPanelGet the settings panelprotected StringGet the short parameter namebooleanCan we do progresive resolution from this displaybooleanGet the ShowInDisplayList property.booleanGet the ShowInLegend property.booleanGet the ShowInTabs property.booleanIs this control currently showing the embedded note text area.intGet the skip value propertyReturn the label that is to be used for the skip widget This allows derived classes to override this and provide their own name,intGet the smoothing factorGet the smoothing typeGet some animation.getStore()Get the object storeGet the TemplateName property.intGet the texture qualityReturn the label that is to be used for the texture quality widget This allows derived classes to override this and provide their own name,Get the time setprotected StringgetTitle()Returns the window title.Find a property on the display control.protected UnitGet the unit used for coloring the displays.booleanGet the UseFastRendering property.booleanGet the UsesTimeDriver property.booleanGet the UseTimesInAnimation property.doubleGet the Version property.doublegetVerticalValue(double value) Get the vertical position for a constant map from a value in the range of -1.0 to 1.0.Get the Animation that is from the view manager for this controlA hack for now.We have this here (in part) for xml persistence This is usually theIntegratedDataViewerGet, from theControlContext, theViewManageridentified by theViewDescriptorreturned fromgetDefaultViewDescriptor()getViewManager(ViewDescriptor viewDescriptor) getViewManager(Displayable displayable) A helper method for finding the commonViewManagerwhich is displaying the given displayable.Get the ViewManagerClasses property.Allows a derived class to provide its own viewmanager wehn capturing an image of the display from islMethod to get a list of ViewManagers that are applicable to this DisplayControl.getViewMenuItems(List items) Add the relevant view menu items into the listprotected voidgetViewMenuItems(List items, boolean forMenuBar) Add the relevant view menu items into the listintGet the VisbilityAnimationPause property.protected booleanSee if we were unpersistedReturn the control's JFrameThis method is here (mostly) for xml unpersistencebooleanIs the window currently visibleintThis method is here (mostly) for xml unpersistenceintThis method is here (mostly) for xml unpersistencedoubleGet the ZPosition property.protected StringGet the label for the Z position slider.voidThis is called to inform this display control that its gui has been exported out of some other component (ex: the MultiDisplayControl).voidThis is called to inform this display control that its gui has been imported by some other idv component and it no longer is in a window.voidhandleDisplayChanged(DisplayEvent event) Allow sub-classes to get displayeventsprotected voidHandle the window closing.protected booleanCheck if the label string has a forecast hour macro in it.booleanDoes this display have a map projectionprotected booleanDoes this have a time macro string?protected booleanDo any of our displayables have timesprotected booleanCheck to see if we have any display properties.voidhide()Hide the windowvoidImplement the HyperLinkListener method to pass any link clicks off to theControlContextbooleanAre we in a Globe display?final voidinit(String displayId, List categories, List choices, ControlContext controlContext, String properties, DataSelection dataSelection) This init method is the one actually called by the IDV.final voidinit(String displayId, List categories, List choices, ControlContext controlContext, Hashtable properties, DataSelection dataSelection) This init method is the one actually called by the IDV.booleanInitialize this instance according to the firstDataChoicein aList.booleaninit(DataChoice choice) Initialize this instance according to a data choice.voidinitAfterUnPersistence(ControlContext vc, Hashtable properties) Called by theIntegratedDataViewerto initialize after this control has been unpersistedvoidinitAfterUnPersistence(ControlContext vc, Hashtable properties, List preSelectedDataChoices) Called by theIntegratedDataViewerto initialize after this control has been unpersistedvoidInitialize as a prototypevoidInitialize as a templatefinal voidThis init method is used to just initialize some basic properties of this display control.voidinitDone()Called after all initialization has been done.protected voidThis is called when this display is created from a template and does not have any data.voidinitWindow(IdvWindow window) A hook method to allow subclasses to initialize the dialog window, set the size of the dialog window, etc.booleanUtility method to determine if we are displaying in a 3d viewmanagerprotected booleanAllows for derived classes to define that the display unit is different then the color unit.protected booleanIs the GUI being shownbooleanCheck if initialization is donebooleanAre we displayed in a transect view managerbooleanDoes this control have displays in a view managervoiditemStateChanged(ItemEvent event) A no-op method to implement the ItemListener interface.protected voidMethod to calculate screen bounds to load new dataprotected ListAdd the list of menu items for changing the color to the component (usually a menu or popup menu)make the legend labelprotected JButtonCreate a lock button for the given display control.protected JButtonCreate an icon button for removing the given display control.voidmoveTo(ViewManager newViewManager) An implementation of the DisplayControl interface moveTo method.protected voidnotify views of changeprotected voidparseProperties(String properties) The given properties String is a ";" delimited list of name=value properties.voidShow the dialog window for this control.protected voidpopupDataDialog(String dialogMessage, Component from) Create and show the data choosing dialogprotected voidpopupDataDialog(String dialogMessage, Component from, boolean multiples) Popup a DataTreeDialogprotected voidpopupDataDialog(String dialogMessage, Component from, boolean multiples, List categories) Popup a DataTreeDialogprotected voidProcess request properties from a DataChoicevoidMethod to call if projection changes.voidHandle animation change eventsvoidputTransientProperty(Object key, Object value) Put a property on the display control.protected voidreallySetAttributeFlags(int f) Set the attribute flag map to the given value.voidreceiveShareData(Sharable from, Object dataId, Object[] data) Method called by other classes that share the the state.protected voidUsed to relayout the gui mainPanelvoidReload the data sourcesvoidreload the data source in a thread.voidrelocateDisplay(ucar.unidata.geoloc.LatLonRect originalBounds, ucar.unidata.geoloc.LatLonRect newBounds) When we relocate a bundle this gets called to relocate the display This method gets overwritten by the probe and cross section displays so they can move their selection points to a new locationvoidrelocateDisplay(ucar.unidata.geoloc.LatLonRect originalBounds, ucar.unidata.geoloc.LatLonRect newBounds, boolean useDataProjection) When we relocate a bundle this gets called to relocate the display This method gets overwritten by the probe and cross section displays so they can move their selection points to a new locationvoidremoveDataChoice(DataChoice dataChoice) Remove the givenDataChoicefrom the myDataChoices list.voidremoveDisplayable(Displayable displayable) Remove aDisplayableprotected voidIterates across the list ofDisplayInfo-s, telling them to removeDisplayable.protected voidremoveDisplayables(boolean andDestroyThem) Iterates across the list ofDisplayInfo-s, telling them to removeDisplayable.protected booleanShould the DisplayControl do a doRemove when the window closes.voidRemove property change listener.protected voidThis gets called when the control has received notification of a dataChange event.voidSet the color table dimness to the defaultvoidresetViewManager(String oldViewId, String newViewId) Reset the view managerprotected voidReset the color table to the initial color tableprotected voidrevertToDefaultColorTable(String whichColorTable) Revert to the defaultprotected voidReset the range to the initial rangeprotected voidrevertToDefaultRange(String whichColorTable) Revert to the defaultvoidSave this display control as a favorite display template.voidSave the state as parameter defaultsvoidSave this display as a prototype (default)voidSave this display control as a display template.voidSave the data choice into the cache data sourcevoidFind the first ViewManager in the list of DisplayInfo-s and have the ViewManager write its image to to given filename.voidWhen relocate display through ISL or RBB it will be good to save the projection otherwise, the home button will bring the view back to original viewprotected List<DataChoice> selectDataChoices(String dialogMessage, Component from, boolean multiples, List categories) Popup a DataTreeDialogvoidsetAnimationInfo(AnimationInfo value) Set the AnimationInfo property.protected voidsetAnimationSet(List dateTimes) A utility method to set the animation set from the given list of times of the animationprotected voidsetAttributeFlags(int f) Set the attribute flag map to the given value.voidsetCachedData(Hashtable cache) Set the data cache.voidsetCanDoRemoveAll(boolean v) Used by the IDV to determine whether a control should be removed when the user does a remove all.voidA set method so the categories list will get persisted.voidsetCollapseLegend(boolean value) Set the collapsed legend property.voidSet the color for the selector.voidSet the color brightervoidSet the color dimmervoidsetColorDimness(float value) Set the ColorDimness property.voidsetColorScaleInfo(ColorScaleInfo newInfo) Set the color scale parameters for any color scalevoidsetColorScaleVisible(boolean viz) Set the visibility of the color scale.voidsetColorTable(String whichColorTable, ColorTable newColorTable) Set the color table from the colortablewidgetvoidsetColorTable(ColorTable newColorTable) Set theColorTableproperty.voidThis method is for legacy bundles that used to save off the color table name instead of the color table.protected voidsetColorUnit(Unit unit) Set the colorUnitvoidsetColorUnitName(String name) This is used for xml persistence.voidSet the ComponentHolder property.protected voidSet the gui contentsvoidsetContourInfo(ContourInfo newInfo) Set the contour parameters for any contoursvoidUsed by the isl to override selective parameters in the default contourInfoprotected booleanGets called when the user has selected a new DataChoice.protected booleansetData(DataChoice dataChoice) Sets the data associated with this instance.voidsetDataChoices(List newList) Set the list of data choices to be the given listprotected voidsetDataInstance(DataInstance dataInstance) Set the data instance.voidSets the list ofDataInstancesfor this DisplayControl.voidsetDataSelection(DataSelection newDataSelection) This is used for xml persistence.voidsetDataTimeRange(DataTimeRange value) Set the DataTimeRange property.voidsetDefaultSamplingMode(String newMode) Set sampling mode.voidSet the name of the default view manager that displays are put into.protected voidsetDisplayableVisibility(Displayable d, boolean visible) Set the ultimate visibility of the particularDisplayable.protected voidsetDisplayableVisiblity(Displayable d, boolean visible) Deprecated, misspelled version of setDisplayVisibility.voidIf wasActive is true then set the display master to be active.voidThis api is called by ISL to set the spatial subset of the datasource to the Match Display Region, so the user doesn't need to save all data when saving the zidv bundle, if there is more than one view window it will do nothing since it will be too much book keeping to find out the region to subsetvoidsetDisplayCategory(String value) This is the category that is defined for this control.voidsetDisplayId(String theId) Set the id of this control (from controls.xml) We have this here for xml persistencevoidSet the display master to be inactive.voidsetDisplayListColor(Color newColor) Set the display list color property.protected voidsetDisplayListColor(Color newColor, boolean fromUser) Set the display list color property.protected voidSet the display list properties on the displayablevoidsetDisplayListTemplate(String value) Set the DisplayListTemplate property.voidsetDisplayListTimeZone(String timeZoneStr) Set the Time ZonevoidsetDisplayName(String displayName) What is the name of this control (e.g., "Plan view")protected voidsetDisplayUnit(Unit newUnit) Set the display unit.voidsetDisplayUnitName(String name) Set the name of the display unit.voidsetDisplayVisibility(boolean on) Set the visibility of the display and set the state of any visibility buttons we may have.voidsetDoCursorReadout(boolean value) Set the DoCursorReadout property.voidsetExpandedInTabs(boolean value) Set the ExpandedInTabs property.voidsetExtraLabelTemplate(String value) Set the ExtraLabelTemplate property.voidsetHadDataChoices(boolean value) Set the HadDataChoices property.voidsetHelpUrl(String helpUrl) Set the help URL for this DisplayControlvoidSet the Name property.voidUsed to publicize the list of data choices for the persistence mechanismvoidsetInitialSettings(List settings) Set the initial settingsvoidsetInitialViewManager(ViewManager viewManager) Set the view manager for this control to use.voidsetIsProgressiveResolution(boolean isPG) _more_voidsetIsRaster(boolean isRaster) Set IsRaster propertyvoidsetIsTimeDriver(boolean value) Set the IsTimeDriver property.voidsetLabelAsPreference(Object[] obj) Set the label as a preferencevoidSet the color to be used for the background in the bottom legendvoidSet the color to be used for the foreground in the bottom legendvoidsetLegendLabel(String label) A no-op so unpersisting old bundles won't flag a warning.voidsetLegendLabelTemplate(String value) Set the LegendLabel property.voidsetLineWidth(int value) Set the line width property.voidsetLockVisibilityToggle(boolean lockVisibilityToggle) Set the locking visibility of the displayprotected voidSet the main panel dimenstionsvoidSet the main panel sizevoidsetMakeWindow(boolean value) Should this control make its own window.voidsetMatchDisplayRegion(boolean useDR) Set whether we should match the display region for spatial boundsvoidSet the Name property.voidsetNameFromUser(String value) Set the NameFromUser property.protected booleansetNewColorUnit(Unit newUnit, boolean applyToDisplayable) The user has chosen a new unit for color.protected booleansetNewDisplayUnit(Unit newUnit, boolean applyToDisplayable) The user has chosen a new unit for display.voidSet the value of the note text area.voidsetOkToFireEvents(boolean v) Set whether it's okay to fire events to listeners.voidSet the name of the data choicevoidsetParamName(String paramName) The name of the parameter (initially from the DataChoice) displayed by this control.voidNo-op for legacy bundlesvoidsetPointSize(float value) Set the PointSize property.protected voidsetProjectionInView(boolean useViewPreference) Set the projection in the map view manager.protected voidsetProjectionInView(boolean useViewPreference, boolean maintainViewpoint) Set the projection in the map view manager.protected voidsetProjectionInView(MapViewManager mvm, boolean useViewPreference, boolean maintainViewpoint) Set the projection in the map view manager.protected voidsetProperty(String name, Object value) Wrapper around Misc.propertySetvoidSet the range (from the colortablewidget)voidSet the range for the color table.voidsetSelectRange(Range newRange) Set the range for the select data.voidsetSelectRangeEnabled(boolean value) Set the SelectRangeEnabled property.voidsetSettingsDisplayUnit(Unit newUnit) Set the display unit from the settingsvoidsetSharedColorScaleInfo(ColorScaleInfo newInfo) Set the shared color scale infovoidsetShowInDisplayList(boolean value) Set the ShowInDisplayList property.voidsetShowInLegend(boolean value) Set the ShowInLegend property.voidsetShowInTabs(boolean value) Set the ShowInTabs property.voidsetShowNoteText(boolean n) Used by the presistence/unpersistence to record whether this control is showing its note text areavoidsetSkipValue(int value) Set the skip value propertyvoidsetSmoothingFactor(int val) Set the smoothing factorvoidsetSmoothingType(String type) Set the smoothing typevoidsetTemplateName(String value) Set the TemplateName property.voidsetTextureQuality(int quality) Set the texture qualityvoidSet the title of the window if it has been created.protected voidsetUnitForColor(Unit newUnit) Set the unit to use for color.voidsetUseFastRendering(boolean value) Set the UseFastRendering property.voidsetUsesTimeDriver(boolean value) Set the UsesTimeDriver property.voidsetUseTimesInAnimation(boolean value) Set the UseTimesInAnimation property.voidsetVersion(double value) Set the Version property.voidsetViewer(ControlContext controlContext) We have this here (in part) for xml persistence This is usually theIntegratedDataViewervoidsetViewManagerClassNames(String value) Set the ViewManagerClasses property.voidsetVisbilityAnimationPause(int value) Set the VisbilityAnimationPause property.voidsetWindowSize(Dimension value) This method is here (mostly) for xml unpersistencevoidsetWindowVisible(boolean v) Set the local data memeber myWindowVisible.voidsetWindowX(int x) This method is here (mostly) for xml unpersistencevoidsetWindowY(int y) This method is here (mostly) for xml unpersistencevoidsetZPosition(double value) Set the ZPosition property.voidsetZPosition(double value, boolean fromSlider) Set the Z positionprotected booleanA hook to allow derived classes to tell us to add this as an animation listenerprotected booleanA hook to allow derived classes to tell us to add this as a control listenerprotected booleanA hook to allow derived classes to tell us to add this as a display listenerprotected booleanThis method can be overwritten by the derived classes that do not want the general application of the fast rendering flag.booleanShould this be dockedbooleanDoes this display control popup its window on creationvoidshow()SHow the windowbooleanShow the color control widget in the widgets if FLAG_COLOR is set.voidShow the color dialogvoidshowColorDialog(String methodName) Show the color dialog and invoke the named methodvoidPopup the color scale properties dialogprotected booleanshowColorScales(boolean show) Method to show allColorScalesassociated with this DisplayControl.protected voidshowColorSwatches(boolean on) Change the visiblity of all color swatchesvoidPopup the contour properties dialogvoidPopup the details windowvoidShow the DisplaySettingsDialogvoidshowHelp()This method will attempt to show the relevant javahelp for this display.protected voidshowLegendMenu(JComponent comp, MouseEvent event) Create and show the popup menu for the user's right click on the legend.voidA helper method to show the normal cursorvoidShow the properties dialogvoidPopup the time range dialogvoidA helper method to show the wait cursorprotected voidtimeChanged(Real time) Respond to a timeChange eventvoidtoFront()Move the control's window to the front.voidToggle the visibility of the noteTextArea.voidtoggleVisibilityForVectorGraphicsRendering(int rasterMode) Toggle the visibility for vector graphics renderingvoidHide or show the main windowtoString()The toString method.voidMethod called when a transect changes.protected voidUpdate the animation for the view managerprotected DataInstanceupdateDataInstance(DataInstance dataInstance) update the datainstance in preparation for a getData call.protected DataSelectionupdateDataSelection(DataSelection dataSelection) update the dataselection in preparation for a getData call.protected voidUpdate the display list dataprotected GridDataInstanceupdateGridDataInstance(GridDataInstance dataInstance) update the datainstance in preparation for a getData callprotected voidUpdate the legend labels and the display listprotected voidThis method is called to update the legend labels when some state has changed in this control that is reflected in the labels.protected voidupdateLockButton(JButton lockBtn) Change the icon in the lock button for the given display control.booleanShould we use the smoothing factor?protected booleanSee if the display supports Z positioning.voidviewManagerChanged(String property) Method called when a transect changes.voidviewManagerDestroyed(ViewManager viewManager) Called when a ViewManager which holds the display is destoryedvoidThis gets called when we have received a controlChanged event and have not received another one in some time deltavoidwriteTestArchive(String archiveName) Write out all screen imagesvoidxxxsetDisplayActive(boolean active) Set the display master to be active/inactive.voidzSliderChanged(double value) The z slider postion changedMethods inherited from class ucar.unidata.idv.control.DisplayControlBase
boxToEarth, boxToEarth, boxToEarth, boxToEarth, boxToEarth, boxToScreen, calculateRectangle, createStationTfo, earthToBox, earthToBox, earthToBoxTuple, earthToScreen, formatLevels, getLabeledReal, getLevelReal, getScreenCenter, getSelectedStation, getTmpProperty, isLeftButtonDown, logException, logException, makeEarthLocation, putTmpProperty, removeTmpProperty, screenToBox, screenToBox, screenToEarth, setStations, setStations, toBox, toEarth, userErrorMessage, userMessageMethods inherited from class ucar.unidata.collab.SharableImpl
applySharableProperties, doShare, doShare, doShareExternal, doShareInternal, getReceiveShareTime, getSharablePropertiesComponent, getShareGroup, getSharing, getUniqueId, initSharable, removeSharable, setReceiveShareTime, setShareGroup, setSharing, setUniqueId, showSharableDialogMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface ucar.unidata.idv.DisplayControl
getTmpProperty, putTmpProperty, removeTmpPropertyMethods inherited from interface ucar.unidata.collab.Sharable
getReceiveShareTime, getShareGroup, getSharing, getUniqueId, setReceiveShareTime
-
Field Details
-
version
protected double versionversion -
ZFUDGE
protected static final double ZFUDGEfudge factor for the Z position- See Also:
-
settingVisibility
protected boolean settingVisibilityA flag to check if this control is in the middle of toggling its visibility checkboxes. Used to keep us from having an infinite event loop. Infinity is a pretty cool concept but it doesn't work well in practice. -
DISPLAY_LIST_NAME
The name for the text type for the display list.- See Also:
-
displayUnit
The Unit (may be null) that is used to display data. We keep it at this level because this class handles the widget that is used to change the unit, etc. -
initNoteText
This is the initial text note text. We have this here so when this control is instantiated via persistence this value gets set. We then use it when we create the note TextArea -
noteTextArea
The text area widget used for the control text notes -
noteWrapper
The Container that holds the noteTextArea. We keep this around so we can add/remove the TextArea -
showNoteText
protected boolean showNoteTextDo we show the note text? -
resolutionReadout
The label to show the resolution readout in the side legend -
dataSelection
TheDataSelectionthat holds any data subsetting specifications (e.g., time). This is typically created by the IDV and passed into this DisplayControl. -
requestProperties
A hashtable that is used to hold extra properties that are passed to theDataChoicethrough the getData called. -
sharables
Contains a list of allSharableobjects (e.g., AnimationWidget) that are created by this control. We keep this around so when the display is removed we can tell each Sharable to remove itself. -
displayMasters
Holds theDisplayMaster-s that this control wholly owns (e.g., profile display master). -
defaultViewManager
This can be used to temporarily set a ViewManager that is to be used. TBD. -
viewManagers
Holds theViewManager-s that this control has created. -
defaultView
The name of the ViewManager that any displays should be added to -
contourInfo
Used to hold contour information if this control is enabled for it. -
contourInfoParams
Used by the isl to override selective parameters in the default contourInfo -
displayListUsesColor
protected boolean displayListUsesColorA boolean to see if the display list got it's color from the display. -
ctw
This is the color table gui widget for controls enabled for color tables -
colorScales
This is the color scale widget for a display -
displayListTable
This is the table of the view manager display list displayables -
contourWidget
This is the contour info gui widget for controls enabled for contours -
selectRangeWidget
This is the contour info gui widget for controls enabled for contours -
helpUrl
The url to show help for this control. Typically set through controls.xml -
paramName
The name of the parameter (if there is one) -
instantiatedWithNoData
protected boolean instantiatedWithNoDataThis gets set to track when we have been re-instantiated from a bundle without any data. -
categories
This is the list of DataCategory-s that were defined for this DisplayControl by the idv/controls.properties and ControlDescriptor code. -
colorScaleInfo
Holds the color scale information -
controlContext
This is the context in whcih this display control exists (typically an instance of the IntegratedDataViewer but we use the ControlContext interface to keep us honest and not sloppy). -
skipSlider
slider for setting skip values -
isProgressiveResolution
public boolean isProgressiveResolutionFlag for progressive resolution. -
reloadFromBounds
public boolean reloadFromBoundsFlag for reloading from bounds -
matchDisplayRegion
public boolean matchDisplayRegionFlag for matching the display region
-
-
Constructor Details
-
DisplayControlImpl
public DisplayControlImpl()Default constructor. This is called when the control is unpersisted through theXmlEncodermechanism. -
DisplayControlImpl
Create a DisplayControlImple from a ControlContext- Parameters:
controlContext- context to use
-
-
Method Details
-
initBasic
This init method is used to just initialize some basic properties of this display control. It is intended that this control has not been created for normal display purposes but has been created for other purposes (e.g., Testing valid help ids).- Specified by:
initBasicin interfaceDisplayControl- Parameters:
displayId- The identifier of this control. Taken from controls.xmlcategories- The list ofDataCategoryies for this controlproperties- Any properties (usually defined in controls.xml)
-
init
public final void init(String displayId, List categories, List choices, ControlContext controlContext, String properties, DataSelection dataSelection) throws VisADException, RemoteException This init method is the one actually called by the IDV. The default is to turn around and call init with the first element in the dataChoice array.- Specified by:
initin interfaceDisplayControl- Parameters:
displayId- The identifier of this control. Taken from controls.xmlcategories- The list ofDataCategoryies for this controlchoices- The list ofDataChoice-s (usually only one) for this controlcontrolContext- The context in which this control is in (usually a reference to theIntegratedDataViewerproperties- Any properties (usually defined in controls.xml)dataSelection- Holds any specifications of subsets of the data (e.g., times)- Throws:
VisADException- the VisAD exceptionRemoteException- the remote exception deprecated use init that takes a properties Hashtable
-
init
public final void init(String displayId, List categories, List choices, ControlContext controlContext, Hashtable properties, DataSelection dataSelection) throws VisADException, RemoteException This init method is the one actually called by the IDV. The default is to turn around and call init with the first element in the dataChoice array.- Specified by:
initin interfaceDisplayControl- Parameters:
displayId- The identifier of this control. Taken from controls.xmlcategories- The list ofDataCategoryies for this controlchoices- The list ofDataChoice-s (usually only one) for this controlcontrolContext- The context in which this control is in (usually a reference to theIntegratedDataViewerproperties- Any properties (usually defined in controls.xml)dataSelection- Holds any specifications of subsets of the data (e.g., times)- Throws:
VisADException- the VisAD exceptionRemoteException- the remote exception
-
doInitialUpdateLegendAndList
protected void doInitialUpdateLegendAndList()Do the initial update legend and list -
addToControlContext
protected void addToControlContext()Add to the control context -
initAsTemplate
public void initAsTemplate()Initialize as a template- Specified by:
initAsTemplatein interfaceDisplayControl
-
initAsPrototype
public void initAsPrototype()Initialize as a prototype- Specified by:
initAsPrototypein interfacePrototypable
-
initAfterUnPersistence
Called by theIntegratedDataViewerto initialize after this control has been unpersisted- Specified by:
initAfterUnPersistencein interfaceDisplayControl- Parameters:
vc- The context in which this control existsproperties- Properties that may hold things
-
initAfterUnPersistence
public void initAfterUnPersistence(ControlContext vc, Hashtable properties, List preSelectedDataChoices) Called by theIntegratedDataViewerto initialize after this control has been unpersisted- Specified by:
initAfterUnPersistencein interfaceDisplayControl- Parameters:
vc- The context in which this control existsproperties- Properties that may hold thingspreSelectedDataChoices- set of preselected data choices
-
init
Initialize this instance according to the firstDataChoicein aList. This implementation invokesinit(DataChoice)to perform the initialization. If the list isnullor empty, then the argument toinit(DataChoice)isnull.- Parameters:
choices- A list of data choices ornull.- Returns:
trueif and only if this instance was correctly initialized by the data choice.- Throws:
VisADException- if a VisAD Failure occurs.RemoteException- if a Java RMI failure occurs.
-
init
Initialize this instance according to a data choice. Subclasses should override this method. Overridding methods should probably invoke
setData(DataChoice)as part of their initialization procedure -- although it is unclear when this is actually necessary.This implementation simply returns
true.- Parameters:
choice- A data choice ornull.- Returns:
trueif and only if this instance was correctly initialized by the data choice.- Throws:
VisADException- if a VisAD Failure occurs.RemoteException- if a Java RMI failure occurs.
-
initDone
public void initDone()Called after all initialization has been done. A hook that allows derived classes to do any further initialization. -
addPropertyChangeListener
Add a property change listener.- Parameters:
listener- the listener to add
-
removePropertyChangeListener
Remove property change listener.- Parameters:
listener- listener to remove
-
firePropertyChangeEvent
Fire a property change event.- Parameters:
event- event to propagate
-
hasTimeMacro
Does this have a time macro string?- Parameters:
t- the string to check- Returns:
- true if there is a time macro
-
shouldAddAnimationListener
protected boolean shouldAddAnimationListener()A hook to allow derived classes to tell us to add this as an animation listener- Returns:
- Add as animation listener
-
shouldAddDisplayListener
protected boolean shouldAddDisplayListener()A hook to allow derived classes to tell us to add this as a display listener- Returns:
- Add as display listener
-
shouldAddControlListener
protected boolean shouldAddControlListener()A hook to allow derived classes to tell us to add this as a control listener- Returns:
- Add as control listener
-
getHaveInitialized
public boolean getHaveInitialized()Has this control been initialized- Returns:
- Is this control initialized
-
getGraphicsConfiguration
Get the graphics configuration- Parameters:
is3D- use Java 3DuseStereo- use stereo (id3D must be true)- Returns:
- the GraphicsConfiguration for DisplayImpl's
-
applyAttributesToDisplayables
Used to apply all of the display attributes taht are active to theDisplayable-s- Throws:
VisADException- the VisAD exceptionRemoteException- the remote exception
-
addAttributeFlags
protected void addAttributeFlags(int f) Add the given attribute flag (e.g., FLAG_COLORTABLE) to the attrbiute flag map.- Parameters:
f- The flag (e.g., FLAG_COLORTABLE)
-
setAttributeFlags
protected void setAttributeFlags(int f) Set the attribute flag map to the given value. Note: this really should just set the flags but instead it OR's the attributeFlags with the given set of flags in the f parameter. Lets keep this logic because changing it now breaks lotsof things. If you want to actually set the flags call reallySetAttributeFlags- Parameters:
f- The value of the attribute flag map
-
reallySetAttributeFlags
protected void reallySetAttributeFlags(int f) Set the attribute flag map to the given value.- Parameters:
f- THe value of the attribute flag map
-
checkFlag
protected boolean checkFlag(int f) Test if the given flag is set in the attrbiuteFlags- Parameters:
f- The flag to check- Returns:
- Is the given flag set
-
getAttributeFlags
protected int getAttributeFlags()Return the attribute flag map- Returns:
- The attributeFlags
-
addAttributedDisplayable
Add the givenDisplayableto the list of attribute displayables. Use this object's attributeFlags data member as the attribute attributeFlags to use.- Parameters:
d- TheDisplayableto add
-
addAttributedDisplayable
Add the givenDisplayableto the list of displayables. This is simply a wrapper that passes in notGlobalFlags="0"- Parameters:
d- TheDisplayableto addattributeFlags- The set of attributes for this displayable
-
addAttributedDisplayable
Add the given Displayable into the list of attributed displayables managed by this DisplayControl. An "attributed displayable" is one which there is one (or more) gui widgets created for defining the graphic attributes of the displayable (e.g., color table, param range, color, etc) defined by the bitmask attributeFlags. The notGlobalFlags are used to define the attribute for this displayable but not used for creating the gui, etc.- Parameters:
d- TheDisplayableto addattributeFlags- The set of attributes for this displayablenotGlobalFlags- Attribute flags for this displayable but don't let them effect the gui.
-
applyContourInfo
If the contourInfo is non-null then apply it to theDisplayables in the displayables list that are flagged with the FLAG_CONTOUR- Throws:
VisADException- the VisAD exceptionRemoteException- the remote exception
-
applyColorScaleInfo
If the colorScaleInfo is non-null then apply it to theDisplayables in the displayables list that are flagged with the FLAG_COLORTABLE- Throws:
RemoteException- problem with remote displayVisADException- problem with local display
-
colorUnitChanged
A hook that is called when the color unit is changed. Allows derived classes to act accordingly.- Parameters:
oldUnit- The old color unitnewUnit- The new color unit
-
applyColorUnit
If the color unit (gotten from a call to getUnitForColor) is non-null then apply it to theDisplayables in the displayables list that are flagged with the FLAG_COLORUNIT- Throws:
VisADException- the VisAD exceptionRemoteException- the remote exception
-
displayUnitChanged
A hook that is called when the display unit is changed. Allows derived classes to act accordingly.- Parameters:
oldUnit- The old color unitnewUnit- The new color unit
-
getRawDataUnit
Get the raw data unit.- Returns:
- null
-
applyDisplayUnit
If the color unit (gotten from a call to getUnitForColor) is non-null then apply it to theDisplayables in the displayables list that are flagged with the FLAG_DISPLAYUNIT- Throws:
VisADException- the VisAD exceptionRemoteException- the remote exception
-
getColorTableToApply
Get the color table to use when applying to displayables- Returns:
- The color table
-
applyColorTable
If the color table is non-null then apply it to theDisplayables in the displayables list that are flagged with the FLAG_COLORTABLE- Throws:
VisADException- the VisAD exceptionRemoteException- the remote exception
-
resetDimness
public void resetDimness()Set the color table dimness to the default -
setColorDimmer
Set the color dimmer- Throws:
RemoteException- On badnessVisADException- On badness
-
setColorBrighter
Set the color brighter- Throws:
RemoteException- On badnessVisADException- On badness
-
applyColor
If the color is non-null then apply it to theDisplayables in the displayables list that are flagged with the FLAG_COLOR- Throws:
VisADException- the VisAD exceptionRemoteException- the remote exception
-
applyRange
Apply the range it to theDisplayables in the displayables list that are flagged with the FLAG_COLORTABLE- Throws:
VisADException- the VisAD exceptionRemoteException- the remote exception
-
applySelectRange
Apply the range it to theDisplayables in the displayables list that are flagged with the FLAG_SELECTRANGE- Throws:
VisADException- the VisAD exceptionRemoteException- the remote exception
-
applyZPosition
Apply the z position to the displayables with FLAG_ZPOSITION set- Throws:
RemoteException- When bad things happenVisADException- When bad things happen
-
applyLineWidth
Apply the line width to the displayables with FLAG_LINEWIDTH set- Throws:
RemoteException- When bad things happenVisADException- When bad things happen
-
getColorTableForDisplayable
The default is to use the alpha color table. We use this so derived classes can override it before applying the color table to the Displayable-s- Parameters:
ct- The original color table- Returns:
- A 2D float array that is the actual color table
-
addToRangeMenu
A hook to add an entry into the range menu- Parameters:
rw- Range widgetitems- List of menu items
-
addToRangeMenu
A hook to add an entry into the range menu- Parameters:
cw- the color table widgetitems- List of menu items deprecated use #addToRangeMenu(RangeWidget)
-
addToRangeMenu
A hook to add an entry into the range menu- Parameters:
selectRangeWidget- the range dialog that has the itemsitems- List of menu items deprecated use #addToRangeMenu(RangeWidget)
-
parseProperties
The given properties String is a ";" delimited list of name=value properties. This method processes this string, calling setProperty for each property.- Parameters:
properties- Specification of the name=value properties.
-
setInitialSettings
Set the initial settings- Parameters:
settings- the display settings
-
applyProperties
- Parameters:
properties- Specification of the name=value properties.
-
applyDisplaySetting
Apply a display setting to this control- Parameters:
displaySetting- the settings to apply- Throws:
Exception- problem setting settings
-
applyPropertyValues
Apply the property values in the list- Parameters:
props- list of property values- Throws:
Exception- problem setting property values
-
getCanDoRemoveAll
public boolean getCanDoRemoveAll()Used by the IDV to determine whether a control should be removed when the user does a remove all. This is overwritten by the TextDisplayControl to return false.- Specified by:
getCanDoRemoveAllin interfaceDisplayControl- Returns:
- Should this control be removed
-
setCanDoRemoveAll
public void setCanDoRemoveAll(boolean v) Used by the IDV to determine whether a control should be removed when the user does a remove all.- Parameters:
v- The value
-
getShowNoteText
public boolean getShowNoteText()Is this control currently showing the embedded note text area.- Returns:
- Is showing notes
-
setShowNoteText
public void setShowNoteText(boolean n) Used by the presistence/unpersistence to record whether this control is showing its note text area- Parameters:
n- The value for the show note text flag
-
getNoteText
This is the value (String) of the note text area.- Returns:
- The note text
-
setNoteText
Set the value of the note text area.- Parameters:
n- The note text
-
toggleNoteTextArea
public void toggleNoteTextArea()Toggle the visibility of the noteTextArea. -
redoGuiLayout
protected void redoGuiLayout()Used to relayout the gui mainPanel -
isInTransectView
public boolean isInTransectView()Are we displayed in a transect view manager- Returns:
- Is in transect view
-
addNoteText
Insert the given noteWrapper (which holds the note text TextArea) into the gui- Parameters:
mainPanel- Where to add the noteWrappernoteWrapper- Holds the note text TextArea
-
setProperty
Wrapper around Misc.propertySet- Parameters:
name- Property namevalue- Property value
-
addDisplayMaster
A sub-class can register any DisplayMaster-s created and managed by them. When this DisplayControl is removed it runs through all of theDisplayMaster-s and calls destroy on them.- Parameters:
s- TheDisplayMasterto add
-
addViewManager
A sub-class can register anyViewManager-s created and managed by them. When this DisplayControl is removed it runs through all of the ViewManager-s and calls destroy on them.- Parameters:
s- TheViewManagerto add
-
clearViewManagers
protected void clearViewManagers()Runs through the list of ViewManager-s and tells each to destroy. Creates a new viewManagers list. -
addSharable
A sub-class can register anySharableImpl-s created and managed by them. When this DisplayControl is removed it runs through all of the SharableImpl-s and calls removeSharable on them.- Parameters:
s- TheSharableImplto add
-
initializeWithNewData
protected void initializeWithNewData()This is called when this display is created from a template and does not have any data. It is meant as a hook for derived classes to clear out state that may not be in sync with the newly chosen data -
displayChanged
Noop for the DisplayListener interface- Specified by:
displayChangedin interfaceDisplayListener- Parameters:
event- The event
-
handleDisplayChanged
Allow sub-classes to get displayevents- Parameters:
event- The event
-
boundsClose
protected boolean boundsClose(double a, double b) See if two values are close- Parameters:
a- first valueb- second value- Returns:
- true if they are close
-
controlChanged
Noop for the ControlListener interface- Specified by:
controlChangedin interfaceControlListener- Parameters:
event- The event
-
checkBoundsChange
protected void checkBoundsChange()Check to see if the screen bounds have changed -
getControlChangeSleepTime
protected long getControlChangeSleepTime()This returns the time to sleep, in milliseconds, between checks for finally handling control changed events.- Returns:
- milliseconds to sleep for control change events.
-
viewpointChanged
public void viewpointChanged()This gets called when we have received a controlChanged event and have not received another one in some time delta -
loadDataFromViewBounds
protected void loadDataFromViewBounds()Method to calculate screen bounds to load new data -
propertyChange
Handle animation change events- Specified by:
propertyChangein interfacePropertyChangeListener- Parameters:
evt- The event
-
firstFrameDone
public void firstFrameDone()This gets called by the view manager when it has rcvd its first frame_done event. We have this here for those displays (e.g., station model) that need state from the view manager that is only valid when there has been a display.- Specified by:
firstFrameDonein interfaceDisplayControl
-
getDataChoices
Return the list of currentDataChoice-s- Specified by:
getDataChoicesin interfaceDisplayControl- Returns:
- List of data choices
-
getMyDataChoices
Return the list of currentDataChoice-s deprecated Use getDataChoices- Returns:
- List of data choices
-
getInitDataChoices
Used to publicize the list of data choices for the persitence mechanism. This is the list ofDataChoice-s that this control was originally create with- Returns:
- List of original data choices
-
setInitDataChoices
Used to publicize the list of data choices for the persistence mechanism- Parameters:
l- List of original data choices
-
setPersistedVisadData
No-op for legacy bundles- Parameters:
l- List of data deprecated
-
addDataChoice
Add the givenDataChoiceto the list of data choices and return true if this is a new DataChoice.- Parameters:
c- The data choice to add- Returns:
- Was this data choice added. (It won't be added if it is already in the list).
-
removeDataChoice
Remove the givenDataChoicefrom the myDataChoices list. Tell the DataChoice to remove this object as aDataChangeListener- Parameters:
dataChoice- The data choice to remove
-
setDataChoices
Set the list of data choices to be the given list- Parameters:
newList- New list of data choices.
-
appendDataChoices
Append the given list ofDataChoice-s to the myDataChoices list- Parameters:
newDataChoices- List to append
-
getDataChoice
Return the singleDataChoice- Specified by:
getDataChoicein interfaceDisplayControl- Returns:
- The data choice
-
dataChanged
public void dataChanged()Implementation ofDataChangeListener.- Specified by:
dataChangedin interfaceDataChangeListener
-
resetData
This gets called when the control has received notification of a dataChange event. By default it turns around and calls setData with the current list of data choices.- Throws:
RemoteException- Java RMI problemVisADException- VisAD problem
-
addNewData
Called when the user chooses new data for this display- Parameters:
newChoices- List of newDataChoice-s- Throws:
RemoteException- Java RMI problemVisADException- VisAD problem
-
setData
Gets called when the user has selected a new DataChoice. By default this method extracts the first DataChoice from the list of choices and calls setData (DataChoice dataChoice) {return true;}This returns whether the data setting was successfull or not.
- Parameters:
newChoices- List of newDataChoice-s- Returns:
- Was this successful
- Throws:
RemoteException- Java RMI problemVisADException- problem creating VisAD object
-
checkIfDataOk
Implements the default check if the new DataInstance/DataChoice pair holds valid data. The default DataInstance.dataOk method does a getData call (which may be expensive) and returns whether the Data object is non-null. Sub-classes can override this method. For example, the ImageSequence control overridess this to do nothing because it wants to display a progress bar.- Parameters:
di- TheDataInstanceto check- Returns:
- Is the data held by this data instance ok (typically is it non-null)
- Throws:
VisADException- the VisAD exceptionRemoteException- the remote exception
-
setData
Sets the data associated with this instance. This method gets called at initialization or when the user has selected a new
DataChoicethrough the data selector control.In order to implement subclasses of this class that behave correctly, you should know that this implementation uses overridable methods of this class in the following way:
- Gets a
DataInstanceobject by invokingdoMakeDataInstance(DataChoice)with the given data choice argument. If the object isnull, then this implementation immediately returnsfalse. - Invokes
setDataInstance(DataInstance)with theDataInstanceobject from the previous step. - Invokes
setTitle(String)with the return value fromgetTitle(). - If
checkFlag(int)withDisplayControlBase.FLAG_CONTOURreturnstrue, thensetContourInfo(ContourInfo)is invoked with the return value fromgetContourInfo(). - If
checkFlag(int)withDisplayControlBase.FLAG_COLORTABLEreturnstrue, then- If
getRange()returnsnullorgetHaveInitialized()returnstrue, thensetRange(Range)is invoked with the return value fromgetInitialRange()if it is non-null. - If
getHaveInitialized()returnstrueand the private fieldcolorTableis non-null, thensetColorTable(ColorTable)is invoked with the private field (there doesn't appear to be any way to obtain the private field); otherwise, invokessetColorTable(ColorTable)on the return value fromgetInitialColorTable()when givenparamName.
- If
- Parameters:
dataChoice- TheDataChoiceto use.- Returns:
- Was this setData call successful
- Throws:
VisADException- the VisAD exceptionRemoteException- the remote exception
- Gets a
-
getInitialRange
Hook method to allow derived classes to return a different initialRange- Returns:
- The initial range to use
- Throws:
RemoteException- Java RMI problemVisADException- VisAD problem
-
getInitialColorTable
A hook so derived classes can return a colortable. This method uses theDisplayConventionsto get the color table based on the paramName- Returns:
- The color table to use
-
revertToDefaultColorTable
protected void revertToDefaultColorTable()Reset the color table to the initial color table -
revertToDefaultRange
protected void revertToDefaultRange()Reset the range to the initial range -
getOldColorTableOrInitialColorTable
Just a utility for bundles that were created with the old code that saved off the color table name, not the color table.- Returns:
- The color table
-
setCategories
A set method so the categories list will get persisted.- Parameters:
c- The list ofDataCategorys
-
getCategories
Returns the list of data categories.- Specified by:
getCategoriesin interfaceDisplayControl- Returns:
- The list of
DataCategorys
-
showWaitCursor
public void showWaitCursor()A helper method to show the wait cursor -
showNormalCursor
public void showNormalCursor()A helper method to show the normal cursor -
setDisplayName
What is the name of this control (e.g., "Plan view")- Parameters:
displayName- The name to use for display purposes
-
getPropertyDisplayName
I forgot why there was this getter (with the "Property") here- Returns:
- The display name
-
getDisplayName
Returns the name of this display. Initially, the name of the display is "Display", but it can be set by thesetDisplayName(String)method.- Returns:
- The name of this display.
-
getDisplayId
The id of this control (from controls.xml) We have this here for xml persistence- Specified by:
getDisplayIdin interfaceDisplayControl- Returns:
- The id
-
setDisplayId
Set the id of this control (from controls.xml) We have this here for xml persistence- Parameters:
theId- The id
-
clearDataInstance
protected void clearDataInstance()Clear the DataInstance -
setDataInstance
Set the data instance. Protected so it does not get persisted.- Parameters:
dataInstance- The data instance used by this control
-
getDataInstance
We have this here (in part) for xml persistence- Returns:
- The data instance used by this control
-
getDataInstance
We have this here (in part) for xml persistence- Parameters:
forceCreation- if true, force it.- Returns:
- The data instance used by this control
-
getData
A wrapper around dataInstance.getData but this calls updateDataInstance first- Parameters:
dataInstance- the dataInstance- Returns:
- dataInstance.getData();
- Throws:
RemoteException- Java RMI problemVisADException- VisAD problem
-
getGrid
A wrapper around dataInstance.getGrid but this calls updateDataInstance first- Parameters:
dataInstance- the dataInstance- Returns:
- dataInstance.getGrid();
- Throws:
RemoteException- Java RMI problemVisADException- VisAD problem
-
getGrid
public FieldImpl getGrid(GridDataInstance dataInstance, boolean copy) throws VisADException, RemoteException A wrapper around dataInstance.getGrid but this calls updateDataInstance first- Parameters:
dataInstance- the dataInstancecopy- make a copy of the field- Returns:
- dataInstance.getGrid(copy);
- Throws:
RemoteException- Java RMI problemVisADException- VisAD problem
-
updateGridDataInstance
protected GridDataInstance updateGridDataInstance(GridDataInstance dataInstance) throws VisADException, RemoteException update the datainstance in preparation for a getData call- Parameters:
dataInstance- the grid data instance- Returns:
- the new instance
- Throws:
RemoteException- Java RMI problemVisADException- VisAD problem
-
updateDataInstance
protected DataInstance updateDataInstance(DataInstance dataInstance) throws VisADException, RemoteException update the datainstance in preparation for a getData call. This will set the timeDriverTimes if enabled- Parameters:
dataInstance- the dataInstance to update- Returns:
- the updated dataInstance
- Throws:
RemoteException- Java RMI problemVisADException- VisAD problem
-
updateDataSelection
protected DataSelection updateDataSelection(DataSelection dataSelection) throws VisADException, RemoteException update the dataselection in preparation for a getData call. This will set the timeDriverTimes if enabled- Parameters:
dataSelection- the dataSelection to update- Returns:
- the new DataSelection
- Throws:
RemoteException- Java RMI problemVisADException- VisAD problem
-
setDisplayAreaSubset
This api is called by ISL to set the spatial subset of the datasource to the Match Display Region, so the user doesn't need to save all data when saving the zidv bundle, if there is more than one view window it will do nothing since it will be too much book keeping to find out the region to subset- Parameters:
n- _more_
-
setParamName
The name of the parameter (initially from the DataChoice) displayed by this control.- Parameters:
paramName- The parameter name
-
getViewer
We have this here (in part) for xml persistence This is usually theIntegratedDataViewer- Returns:
- The context in which this control exists
-
setViewer
We have this here (in part) for xml persistence This is usually theIntegratedDataViewer- Parameters:
controlContext- The control context
-
getViewContext
A hack for now. The controlContext is really the IDV which also serves as the ViewContext- Returns:
- The context in which view managers exist
-
getControlContext
This is theIntegratedDataViewer- Returns:
- The context in which this control exists
-
getIdv
Get the integraed data viewer that this is part of- Returns:
- the
IntegratedDataViewer
-
getDisplayConventions
Get theDisplayConventionsto use.- Returns:
- The display conventions
-
getLabel
Used by the idv classes- Specified by:
getLabelin interfaceDisplayControl- Returns:
- The label that describes this control
-
toString
The toString method. -
getWindow
Return the control's JFrame- Specified by:
getWindowin interfaceDisplayControl- Returns:
- The JFrame
-
getTitle
Returns the window title. This implementation invokes thegetDisplayName()method.- Returns:
- The window title.
-
setTitle
Set the title of the window if it has been created.- Parameters:
title- The title
-
updateLegendLabel
protected void updateLegendLabel()This method is called to update the legend labels when some state has changed in this control that is reflected in the labels. -
updateLegendAndList
protected void updateLegendAndList()Update the legend labels and the display list -
updateDisplayList
protected void updateDisplayList()Update the display list data -
getDataForDisplayList
Get the data for the display list- Specified by:
getDataForDisplayListin interfaceDisplayControl- Returns:
- the dat for the display list
-
getDisplayListData
Add the data to the in display legend- Returns:
- the data for the display list displayable
-
getDisplayListDisplayable
Get the displayable for the Display List- Specified by:
getDisplayListDisplayablein interfaceDisplayControl- Parameters:
view- the view that it will go into- Returns:
- the appropriate displayable
-
setDisplayListProperties
protected void setDisplayListProperties(DisplayableData d, ViewManager view) throws VisADException, RemoteException Set the display list properties on the displayable- Parameters:
d- the displayableview- the view manager- Throws:
RemoteException- a Java RMI Exception occuredVisADException- unable to set properties
-
getLegendButtons
Set the legend buttons- Specified by:
getLegendButtonsin interfaceDisplayControl- Parameters:
legendType- type of legend- Returns:
- component containing buttons
-
getShortParamName
Get the short parameter name- Returns:
- The String to be used for the short parameter name
-
getLongParamName
Get the long parameter name- Returns:
- The String to be used for the long parameter name
-
getDataSources
Get the DataSources associated with this contol- Returns:
- list of data sources
-
addLabelMacros
Add any macro name/value pairs.- Parameters:
template- template for the labelpatterns- The macro namesvalues- The macro values
-
getLegendLabels
This method is used to get all of the labels (String) that are shown in the side legend.- Parameters:
labels- A list that the labels are inserted intolegendType- The type of legend, BOTTOM_LEGEND or SIDE_LEGEND
-
applyForecastHourMacro
Apply the forecast hour macro- Parameters:
t- label stringcurrentTime- first time- Returns:
- modified string
-
hasForecastHourMacro
Check if the label string has a forecast hour macro in it.- Parameters:
t- the string to check- Returns:
- true if it does
-
getMenuLabel
Return the label used for the menues in the IDV. Implements the method in theDisplayControlinterface- Specified by:
getMenuLabelin interfaceDisplayControl- Returns:
- The menu label
-
toFront
public void toFront()Move the control's window to the front.- Specified by:
toFrontin interfaceDisplayControl
-
removeOnWindowClose
protected boolean removeOnWindowClose()Should the DisplayControl do a doRemove when the window closes.- Returns:
- Whether to remove this control on a window close.
-
guiImported
public void guiImported()This is called to inform this display control that its gui has been imported by some other idv component and it no longer is in a window. -
guiExported
public void guiExported()This is called to inform this display control that its gui has been exported out of some other component (ex: the MultiDisplayControl). -
createIdvWindow
Create an IDV window- Returns:
- the window
-
createDisplayListDisplayable
protected DisplayableData createDisplayListDisplayable(ViewManager view) throws VisADException, RemoteException Make the DisplayListDisplayable- Parameters:
view- the view that this will be in- Returns:
- The displayable data object
- Throws:
RemoteException- Java RMI ExceptionVisADException- VisAD problem
-
doMakeWindow
Called by the derived class init method to create the gui window.- Throws:
VisADException- the VisAD exceptionRemoteException- the remote exception
-
isGuiShown
protected boolean isGuiShown()Is the GUI being shown- Returns:
- true if it is
-
doMakeMenuBar
Make the menu bar- Returns:
- The menu bar
-
captureWindow
public void captureWindow()Screen snapshot of window -
setMainPanelDimensions
Set the main panel dimenstions- Throws:
Exception- problem setting the dimensions
-
getImage
Get the image- Returns:
- the image
- Throws:
Exception- problem getting image
-
getViewManagerForCapture
Allows a derived class to provide its own viewmanager wehn capturing an image of the display from isl- Parameters:
what- The specification of the viewmanager (from the isl)- Returns:
- the viewmanager or null
- Throws:
Exception- on badness
-
getImage
Get the image of "what"- Parameters:
what- description of what to get- Returns:
- the image
- Throws:
Exception- problem getting image
-
doMakeMenuBarMenus
Make the menus to put in the menu bar- Parameters:
menus- List to add to- Returns:
- The menus list
-
getStore
Get the object store- Returns:
- the store
-
handleWindowClosing
protected void handleWindowClosing()Handle the window closing. -
getOuterContents
The outer contents is the outermost component of the gui (i.e., it holds the menu bar and the mainPanel)- Returns:
- Gui contents
-
getMainPanel
Get the component for the main panel of this DisplayControlImpl's contents.- Returns:
- GUI contents
-
setMakeWindow
public void setMakeWindow(boolean value) Should this control make its own window. This method is here (mostly) for xml unpersistence- Parameters:
value- The make window flag
-
getMakeWindow
public boolean getMakeWindow()Should this control make its own window. This method is here (mostly) for xml unpersistence- Returns:
- The flag
-
setWindowSize
This method is here (mostly) for xml unpersistence- Parameters:
value- The size of the window
-
getWindowSize
This method is here (mostly) for xml unpersistence- Returns:
- The size of the window (if non-null) else null
-
getMainPanelSize
Get the main panel size- Returns:
- the main panel size
-
setMainPanelSize
Set the main panel size- Parameters:
s- the dimensions of the panel
-
setWindowX
public void setWindowX(int x) This method is here (mostly) for xml unpersistence- Parameters:
x- The x location of the window
-
getWindowX
public int getWindowX()This method is here (mostly) for xml unpersistence- Returns:
- The x location of the window
-
setWindowY
public void setWindowY(int y) This method is here (mostly) for xml unpersistence- Parameters:
y- The y location of the window
-
getWindowY
public int getWindowY()This method is here (mostly) for xml unpersistence- Returns:
- The y location of the window
-
show
public void show()SHow the window- Specified by:
showin interfaceDisplayControl
-
toggleWindow
public void toggleWindow()Hide or show the main window- Specified by:
toggleWindowin interfaceDisplayControl
-
hide
public void hide()Hide the window -
initWindow
A hook method to allow subclasses to initialize the dialog window, set the size of the dialog window, etc.- Parameters:
window- The control's window
-
getWindowVisible
public boolean getWindowVisible()Is the window currently visible- Returns:
- Window visibility
-
shouldWindowBeVisible
public boolean shouldWindowBeVisible()Does this display control popup its window on creation- Returns:
- Should the window be visible
-
setWindowVisible
public void setWindowVisible(boolean v) Set the local data memeber myWindowVisible. If myWindow is non-null then set its visiblity as well. This method is mostly used in the XmlEncoder persistence mechanism.- Parameters:
v- Window visibility
-
getChangeParameterLabel
A hook to allow derived classes to have their own label in the menu for the change data call.- Returns:
- Menu label for the change data call.
-
hyperlinkUpdate
Implement the HyperLinkListener method to pass any link clicks off to theControlContext- Specified by:
hyperlinkUpdatein interfaceHyperlinkListener- Parameters:
e- The event
-
hasMapProjection
public boolean hasMapProjection()Does this display have a map projection- Returns:
- Has map projection
-
reloadDataSource
Reload the data sources- Throws:
RemoteException- Java RMI problemVisADException- VisAD problem
-
reloadDataSourceInThread
reload the data source in a thread.- Throws:
RemoteException- Java RMI problemVisADException- VisAD problem
-
getLastFileMenuItems
Get last file menu items.- Parameters:
items- the last items in the file menu.
-
getSaveMenuItems
Add in the menu items for the save and export display template- Parameters:
items- List of menu items to add intoforMenuBar- if this is for the menubar
-
getEditMenuItems
Add the relevant edit menu items into the list- Parameters:
items- List of menu items- Returns:
- the list with the new items
-
getFileMenuItems
Add the relevant edit menu items into the list- Parameters:
items- List of menu items- Returns:
- the list with the new items
-
getViewMenuItems
Add the relevant view menu items into the list- Parameters:
items- List of menu items- Returns:
- the list with the new items
-
getEditMenuItems
Add the relevant edit menu items into the list- Parameters:
items- List of menu itemsforMenuBar- Is this for the menu in the window's menu bar or for a popup menu in the legend
-
haveParameterDefaults
protected boolean haveParameterDefaults()Check to see if we have any display properties.- Returns:
- true if we have properties for parameter defaults.
-
getTimeSet
Get the time set- Specified by:
getTimeSetin interfaceDisplayControl- Returns:
- the Set for times
- Throws:
RemoteException- RMI exceptionVisADException- Couldn't create time set
-
getDataTimeSet
Collect the time animation set from the displayables. If none found then return null.- Returns:
- Animation set
- Throws:
RemoteException- On badnessVisADException- On badness
-
haveDataTimes
protected boolean haveDataTimes()Do any of our displayables have times- Returns:
- Have times
-
findDisplays
Find displays based on the key- Parameters:
key- the key- Returns:
- List of appropriate display
-
findDisplays
Find displays with the particular key in the list of displays- Parameters:
key- key to look fordisplays- list of displays- Returns:
- the displays for that key
-
showProperties
public void showProperties()Show the properties dialog -
addPropertiesComponents
Add tabs to the properties dialog.- Parameters:
jtp- the JTabbedPane to add to
-
setDisplayListTimeZone
Set the Time Zone- Parameters:
timeZoneStr- the new time zone name
-
addDisplaySettings
Add property values for this DisplaySettingsDialog- Parameters:
dsd- the display settings dialog
-
setLabelAsPreference
Set the label as a preference- Parameters:
obj- list of objects defining the label
-
showDisplaySettingsDialog
public void showDisplaySettingsDialog()Show the DisplaySettingsDialog -
getSettingsPanel
Get the settings panel- Returns:
- the panel for settings
-
addCheckBoxSettings
Add checkbox type settings to the Properties panel- Parameters:
comps- list of checkbox componentsmethodNameToSettingsMap- hashtable of methods to checkbox
-
applyProperties
public final boolean applyProperties()Apply the properties from the dialog- Returns:
- true if successful
-
doApplyProperties
public boolean doApplyProperties()Apply the properties- Returns:
- true if successful
-
showContourPropertiesDialog
public void showContourPropertiesDialog()Popup the contour properties dialog -
showColorScaleDialog
public void showColorScaleDialog()Popup the color scale properties dialog -
getMacroNames
Add any macro name/label pairs- Parameters:
names- List of macro nameslabels- List of macro labels
-
doExport
Called by ISL. Write out some data defined by the what parameter to the given file. This method throws an UnimplementedException. Derived classes need to overwrite this to write out the appropriate data- Parameters:
what- What is to be written outfilename- To what file- Throws:
Exception- problem exporting
-
saveAsParameterDefaults
public void saveAsParameterDefaults()Save the state as parameter defaults -
saveAsFavorite
public void saveAsFavorite()Save this display control as a favorite display template. -
saveAsTemplate
public void saveAsTemplate()Save this display control as a display template. -
saveAsPrototype
public void saveAsPrototype()Save this display as a prototype (default) -
clearPrototype
public void clearPrototype()Clear the prototype (default) for this display control -
displayableToFront
public void displayableToFront()Move the displayable to the front -
getViewMenuItems
Add the relevant view menu items into the list- Parameters:
items- List of menu itemsforMenuBar- Is this for the menu in the window's menu bar or for a popup menu in the legend
-
getDataProjectionLabel
Get the data projection label- Returns:
- the data projection label
-
getFileMenuItems
Add the relevant file menu items into the list- Parameters:
items- List of menu itemsforMenuBar- Is this for the menu in the window's menu bar or for a popup menu in the legend
-
saveDataChoiceInCache
public void saveDataChoiceInCache()Save the data choice into the cache data source -
getExtraMenus
Get any extra menus for this control. Subclasses should override to add more menus- Parameters:
menus- list of menus to populateforMenuBar- Is this for the menu in the window's menu bar or for a popup menu in the legend
-
getHelpMenuItems
Add the help menu items- Parameters:
items- List of menu itemsforMenuBar- Is this for the menu in the window's menu bar or for a popup menu in the legend
-
showDetails
public void showDetails()Popup the details window -
getHelpIds
Return the list of (String) java help ids- Returns:
- List of help ids
-
showHelp
public void showHelp()This method will attempt to show the relevant javahelp for this display. It successively tries to show the helpUrl attribute, the "idv.controls.displayId" and then each "idv.controls.classname"If there is no help available it will popup a message to the user.
- Specified by:
showHelpin interfaceDisplayControl
-
isInViewManager
public boolean isInViewManager()Does this control have displays in a view manager- Returns:
- Does this control have displays in a view manager
-
saveImage
Find the first ViewManager in the list of DisplayInfo-s and have the ViewManager write its image to to given filename.- Specified by:
saveImagein interfaceDisplayControl- Parameters:
filename- The file to write the image to
-
writeTestArchive
Write out all screen images- Specified by:
writeTestArchivein interfaceDisplayControl- Parameters:
archiveName- The name of the archive we are writing to
-
projectionChanged
public void projectionChanged()Method to call if projection changes. Subclasses that are worried about such events should implement this.- Specified by:
projectionChangedin interfaceDisplayControl
-
transectChanged
public void transectChanged()Method called when a transect changes.- Specified by:
transectChangedin interfaceDisplayControl
-
viewManagerChanged
Method called when a transect changes.- Specified by:
viewManagerChangedin interfaceDisplayControl- Parameters:
property- The property that changed
-
getDataProjectionForMenu
Get the MapProjection for this data; if have a single point data object make synthetic map projection for location- Returns:
- MapProjection for the data
-
getDataProjection
get MapProjection of data to display- Specified by:
getDataProjectionin interfaceDisplayControl- Returns:
- The native projection of the data
-
getDisplayCenter
Get the center of the display- Returns:
- center point or null if not a navigated display
- Throws:
RemoteException- On badnessVisADException- On badness
-
setProjectionInView
protected void setProjectionInView(boolean useViewPreference) Set the projection in the map view manager.- Parameters:
useViewPreference- if true, will let the view decide if preference to reset data is used or not
-
setProjectionInView
protected void setProjectionInView(boolean useViewPreference, boolean maintainViewpoint) Set the projection in the map view manager.- Parameters:
useViewPreference- if true, will let the view decide if preference to reset data is used or notmaintainViewpoint- keep the same viewpoint
-
setProjectionInView
protected void setProjectionInView(MapViewManager mvm, boolean useViewPreference, boolean maintainViewpoint) Set the projection in the map view manager.- Parameters:
useViewPreference- if true, will let the view decide if preference to reset data is used or notmaintainViewpoint- keep the same viewpoint
-
centerOnDisplay
protected void centerOnDisplay()If this display has a dataprojection then center the view to it -
getMapViewProjection
Get the projection from the main display.- Returns:
- map projection for this display's map view manager or null
-
activateDisplays
Activate each DisplayInfo- Throws:
VisADException- the VisAD exceptionRemoteException- the remote exception
-
deactivateDisplays
DeActivate each DisplayInfo- Throws:
VisADException- the VisAD exceptionRemoteException- the remote exception
-
findDisplayInfo
Find the DisplayInfo for a displayable- Parameters:
displayable- the displayable to search for- Returns:
- the associated
DisplayInfo
-
removeDisplayable
Remove aDisplayable- Parameters:
displayable- displayable to remove- Throws:
RemoteException- Java RMI problemVisADException- Problem in VisAD
-
removeDisplayables
Iterates across the list ofDisplayInfo-s, telling them to removeDisplayable.- Throws:
VisADException- the VisAD exceptionRemoteException- the remote exception
-
removeDisplayables
Iterates across the list ofDisplayInfo-s, telling them to removeDisplayable.- Parameters:
andDestroyThem- true to destroy them- Throws:
VisADException- the VisAD exceptionRemoteException- the remote exception
-
viewManagerDestroyed
Called when a ViewManager which holds the display is destoryed- Specified by:
viewManagerDestroyedin interfaceDisplayControl- Parameters:
viewManager- The view manager that was destroyed- Throws:
RemoteException- Java RMI errorVisADException- VisAD error
-
addRemovable
Add something to be removed on doRemove- Parameters:
removable- the removeable
-
doRemove
Remove this DisplayControl. Tells theControlContextto removeDisplayControl. Removes all Displayable-s from their ViewManager-s, remove this object from its Sharable group, and sets the visibility of the dialog window to false.- Specified by:
doRemovein interfaceDisplayControl- Throws:
VisADException- the VisAD exceptionRemoteException- the remote exception
-
getActive
public boolean getActive()Is this control active, i.e., has this control not gotten removed yet- Specified by:
getActivein interfaceDisplayControl- Returns:
- Is active
-
doMakeContents
Make Gui contents- Returns:
- User interface contents
- Throws:
VisADException- the VisAD exceptionRemoteException- the remote exception
-
setContents
Set the gui contents- Parameters:
c- The user interface contents
-
getContents
Get the GUI contents- Returns:
- the contents
-
resetViewManager
Reset the view manager- Parameters:
oldViewId- old view idnewViewId- new view id
-
setDefaultView
Set the name of the default view manager that displays are put into.- Parameters:
s- The default view
-
getCursorReadout
public final List getCursorReadout(EarthLocation el, Real animationValue, int animationStep, List<ReadoutInfo> samples) throws Exception Get the list of items for the cursor readout- Specified by:
getCursorReadoutin interfaceDisplayControl- Parameters:
el- location of cursoranimationValue- animation valueanimationStep- animation stepsamples- The list of samples returned- Returns:
- list of strings for readout
- Throws:
Exception- problem getting at the data
-
getCursorReadoutInner
protected List getCursorReadoutInner(EarthLocation el, Real animationValue, int animationStep, List<ReadoutInfo> samples) throws Exception Get the list of items, subclasses should override- Parameters:
el- location of cursoranimationValue- animation valueanimationStep- animation stepsamples- The list of samples returned- Returns:
- list of strings for readout
- Throws:
Exception- problem getting at the data
-
getCursorReadoutInner
protected final List getCursorReadoutInner(EarthLocation el, Real animationValue, int animationStep) The getCursorReadout method that really does the work- Parameters:
el- the locationanimationValue- the animation valueanimationStep- the animation step- Returns:
- the list of readout strings
-
formatForCursorReadout
Format a real for the cursor readout- Parameters:
r- the real- Returns:
- the formatted string
- Throws:
RemoteException- Java RMI errorVisADException- VisAD error
-
setInitialViewManager
Set the view manager for this control to use. Note: This is only for use when some code is directly creating a display control and wants to place it in a specific viewmanager. Use this after the control has been created but before the init method has been called- Parameters:
viewManager- The viewmanager to use
-
getDefaultView
Return the name of the firstViewManagerfound in the list ofDisplayInfo-s.- Returns:
- The name of the default view
-
getDefaultViewManager
Return the name of the firstViewManagerfound in the list ofDisplayInfo-s.- Specified by:
getDefaultViewManagerin interfaceDisplayControl- Returns:
- The name of the default view
-
getDefaultViewDescriptor
Return theViewDescriptorto use. This allows the IDV to find a ViewManager identified by this descriptor- Returns:
- The view descriptor
-
addDisplayable
Add the givenDisplayableinto aViewManager- Parameters:
d- The displayable to add- Returns:
- The
ViewManagerthis Displayable is added into
-
addDisplayable
A wrapper around addDisplayable (Displayable theDisplay, ViewDescriptor viewDescriptor), passing in the default LASTACTIVE ViewDescriptor.- Parameters:
theDisplay- TheDisplayableto addattributeFlag- The attribute flag (e.g, FLAG_COLOR|FLAG_COLORTABLE)- Returns:
- The
ViewManagerthis Displayable is added into
-
addDisplayable
Add the givenDisplayableinto the givenViewManager- Parameters:
theDisplay- The displayable to addviewManager- The ViewManagerflag- The attribute flag (e.g., FLAG_COLORTABLE) for this Displayable- Returns:
- The
ViewManagerthis Displayable is added into
-
addDisplayable
- Parameters:
theDisplay- The displayable to addviewDescriptor- The descriptorflag- The attribute flag (e.g., FLAG_COLORTABLE) for this Displayable- Returns:
- The
ViewManagerthis Displayable is added into
-
addDisplayable
Find theViewManagerdefined by the givenViewDescriptor. Create a newDisplayInfothat holds this DisplayControl, the givenDisplayableand the looked up ViewManager. Add the DisplayInfo to the list of DisplayInfo-s- Parameters:
theDisplay- The displayable to addviewDescriptor- Describes the ViewManager in which to add the Displayable- Returns:
- The ViewManager
-
addDisplayable
Add the givenDisplayableinto the givenViewManager- Parameters:
theDisplay- The Displayable to addviewManager- The ViewManager in which the display is added- Returns:
- the DisplayInfo for the displayable.
-
getDisplayInfos
Return the list ofDisplayInfoobjects held by this control.- Returns:
- List of display infos
-
doMakeWidgetComponent
A helper method for constructing the ui. This fills up a list ofControlWidget(e.g., ColorTableWidget) and creates a gridded ui with them.- Returns:
- The ui for the widgets
-
zSliderChanged
public void zSliderChanged(double value) The z slider postion changed- Parameters:
value- slider value
-
doMakeTextureSlider
Make a slider for the texture quality- Returns:
- the slider
-
doMakeZPositionSlider
Create the z position slider panel- Returns:
- The panel that shows the z position slider
-
getZPositionSliderLabel
Get the label for the Z position slider.- Returns:
- label
-
getControlWidgets
public void getControlWidgets(List<ControlWidget> controlWidgets) throws VisADException, RemoteException Add into the given the widgets for the different attributes- Parameters:
controlWidgets- List ofControlWidgets to add into- Throws:
VisADException- the VisAD exceptionRemoteException- the remote exception
-
addTimeModeWidget
Add in the time mode widget to the list of control widgets- Parameters:
controlWidgets- List to add to
-
getColorWidgetLabel
Return the label that is to be used for the color widget This allows derived classes to override this and provide their own name,- Returns:
- Label used for the color widget
-
getLineWidthWidgetLabel
Return the label that is to be used for the line width widget This allows derived classes to override this and provide their own name,- Returns:
- Label used for the line width widget
-
getSkipWidgetLabel
Return the label that is to be used for the skip widget This allows derived classes to override this and provide their own name,- Returns:
- Label used for the line width widget
-
isDisplayUnitAlsoColorUnit
protected boolean isDisplayUnitAlsoColorUnit()Allows for derived classes to define that the display unit is different then the color unit. This is used when we are setting the display and color units.- Returns:
- Color unit same as display unit?
-
setNewDisplayUnit
The user has chosen a new unit for display.- Parameters:
newUnit- The new display unitapplyToDisplayable- Should we call applyDisplayUnit();- Returns:
- Did this succeed
-
setNewColorUnit
The user has chosen a new unit for color.- Parameters:
newUnit- The new color unitapplyToDisplayable- Apply this to the Displayables?- Returns:
- Return true if there was no error, false if there was an error
-
getDisplayUnit
Returns the default display unit to be used. TheDisplayConventionsclass is used to fidn out what unit to use.- Parameters:
rawUnit- The raw data unit- Returns:
- The default Unit to use for displays
-
getDisplayUnit
Return the display unit- Returns:
- The display unit
-
setSettingsDisplayUnit
Set the display unit from the settings- Parameters:
newUnit- the new unit
-
setDisplayUnit
Set the display unit. This is protected so the display unit itself is not persisted.- Parameters:
newUnit- The new display unit
-
getDisplayUnitName
Get the name of the display unit (if non-null) This is used for xml persistence.- Returns:
- Name of display unit
-
setDisplayUnitName
Set the name of the display unit. Try to create the actual displayUnit based on this name This is used for xml persistence.- Parameters:
name- The name to use
-
getDefaultDistanceUnit
Get the default distance unit- Returns:
- the default distance unit from the IDV preferences
-
setUnitForColor
Set the unit to use for color. If the display unit is also the color unit (as determined by a call to isDisplayUnitAlsoColorUnit()) then also set the display unit.- Parameters:
newUnit- The new color unit
-
getUnitForColor
Get the unit used for coloring the displays. If the colorUnit member is null and the color unit is the same as the displayUnit then return the displayUnit.- Returns:
- The color unit
-
getColorUnit
Return the colorUnit The get and set methods here are protected so the XmlEncoder will not try to encode them.- Returns:
- The color unit
-
setColorUnit
Set the colorUnit- Parameters:
unit- The color unit
-
getColorUnitName
This is used for xml persistence.- Returns:
- Name of the colorUnit
-
setColorUnitName
This is used for xml persistence.- Parameters:
name- The name of the colorUnit. Try to create the unit.
-
showTimeRangeDialog
public void showTimeRangeDialog()Popup the time range dialog -
applyTimeRange
public void applyTimeRange()Called when we have set the time range. Allows derived classes to do their thang. -
popupDataDialog
Create and show the data choosing dialog- Parameters:
dialogMessage- The message to displayfrom- What component clicked
-
popupDataDialog
Popup a DataTreeDialog- Parameters:
dialogMessage- message for the dialogfrom- the component that it is onmultiples- can handle multiple selections
-
popupDataDialog
protected void popupDataDialog(String dialogMessage, Component from, boolean multiples, List categories) Popup a DataTreeDialog- Parameters:
dialogMessage- message for the dialogfrom- the component that it is onmultiples- can handle multiple selectionscategories- List of data categories. If
-
selectDataChoices
protected List<DataChoice> selectDataChoices(String dialogMessage, Component from, boolean multiples, List categories) Popup a DataTreeDialog- Parameters:
dialogMessage- message for the dialogfrom- the component that it is onmultiples- can handle multiple selectionscategories- List of data categories. If- Returns:
- List of selected data choices or null if none selected
-
getDataSelection
This is used for xml persistence.- Returns:
- The dataSelection member
-
setDataSelection
This is used for xml persistence.- Parameters:
newDataSelection- The new dataSelection member
-
doMakeDataInstance
protected DataInstance doMakeDataInstance(DataChoice dataChoice) throws RemoteException, VisADException Creates and returns the
DataInstancecorresponding to aDataChoice. Returnsnullif theDataInstancewas somehow invalid.This method is invoked by the overridable method
setData(DataChoice).- Parameters:
dataChoice- TheDataChoicefrom which to create aDataInstance.- Returns:
- The created
DataInstanceornull. - Throws:
VisADException- if a VisAD Failure occurs.RemoteException- if a Java RMI failure occurs.
-
getRequestProperties
Create (if null) and return the Hashtable that holds the extra request properties used in a getData call on theDataChoice- Returns:
- Request properties
-
processRequestProperties
protected void processRequestProperties()Process request properties from a DataChoice -
timeChanged
Respond to a timeChange event- Parameters:
time- new time
-
getLegendLabel
This is the main JLabel used in the legend.- Specified by:
getLegendLabelin interfaceDisplayControl- Parameters:
legendType- type of legend- Returns:
- legend label
-
getLegendComponent
Return the gui component used to display this DisplayControl within a ViewManager. Note: as of now we only have one legend component per DisplayControl. This will fail when we have a DisplayControl that displays into more than one ViewManagers.- Specified by:
getLegendComponentin interfaceDisplayControl- Parameters:
legendType- type of legend- Returns:
- legend component
-
doMakeSideLegendComponent
Create and return the gui component which is used to display this DisplayControl in the "legend" area of its ViewManager. This creates a JButton to popup the DisplayControl's window and other elements.- Returns:
- Side legend component
-
makeLegendLabel
make the legend label- Specified by:
makeLegendLabelin interfaceDisplayControl- Returns:
- legend label
-
makeChangeColorMenuItems
Add the list of menu items for changing the color to the component (usually a menu or popup menu)- Returns:
- component with the change color menu items
-
showLegendMenu
Create and show the popup menu for the user's right click on the legend.- Parameters:
comp- The component the user clicked onevent- The mouse event
-
getControlMenus
Get the list of menus associated with this control.- Specified by:
getControlMenusin interfaceDisplayControl- Parameters:
comp- the component to place the menus near- Returns:
- The menus
-
changeDisplayUnit
public void changeDisplayUnit()Change the display unit. -
changeColorUnit
public void changeColorUnit()Change the color unit. -
doMakeChangeColorMenu
Utility to make the menu item for changing the color.- Returns:
- The menu item
-
doMakeChangeColorMenu
Utility to make the menu item for changing the color.- Parameters:
name- name for the menu- Returns:
- The menu item
-
doMakeChangeParameterMenuItem
Utility to make the menu item for changing the data choice- Returns:
- The menu item
-
getLegendToolTip
Return the tooltip text that is to be shown in the legend This method constructs html that shows the display name, choices, link to help, etc.- Returns:
- The tooltip
-
getDetailsContents
Get the contents of the details html- Returns:
- The contents of the details
-
debug
Debug- Parameters:
msg- the message
-
getDebugDetails
When we are iun debug mode this method gets called to add details html- Parameters:
sb- Buffer to append to.
-
doMakeBottomLegendComponent
Create and return the gui component which is used to display this DisplayControl in the "legend" area of its ViewManager. This creates a JButton to popup the DisplayControl's window and other elements.- Returns:
- Bottom legend component
-
showColorScales
protected boolean showColorScales(boolean show) Method to show allColorScalesassociated with this DisplayControl.- Parameters:
show- true to show.- Returns:
- true if successful, false if it failed
-
doMakeColorScales
Actually create the color scales- Throws:
VisADException- the VisAD exceptionRemoteException- the remote exception
-
getDefaultColorScaleInfo
Get the default color scale info- Returns:
- default ColorScaleInfo
-
moveTo
An implementation of the DisplayControl interface moveTo method. This is called when the user has dragged-and-dropped the display control (well, really the legend component) from one ViewManager to another. This nulls out the legendComponent member and iterates through all of the DisplayInfo-s, telling them to set their ViewManager to the given viewManager.- Specified by:
moveToin interfaceDisplayControl- Parameters:
newViewManager- newViewManagerto move to
-
setLegendForeground
Set the color to be used for the foreground in the bottom legend- Specified by:
setLegendForegroundin interfaceDisplayControl- Parameters:
fg- The new color
-
setLegendBackground
Set the color to be used for the background in the bottom legend- Specified by:
setLegendBackgroundin interfaceDisplayControl- Parameters:
bg- The new color
-
showColorSwatches
protected void showColorSwatches(boolean on) Change the visiblity of all color swatches- Parameters:
on- Visibility on or off
-
notifyViewManagersOfChange
protected void notifyViewManagersOfChange()notify views of change -
setShowInDisplayList
public void setShowInDisplayList(boolean value) Set the ShowInDisplayList property.- Parameters:
value- The new value for ShowInDisplayList
-
getShowInDisplayList
public boolean getShowInDisplayList()Get the ShowInDisplayList property.- Specified by:
getShowInDisplayListin interfaceDisplayControl- Returns:
- The ShowInDisplayList
-
getLockVisibilityToggle
public boolean getLockVisibilityToggle()Get the locking visibility of the display- Specified by:
getLockVisibilityTogglein interfaceDisplayControl- Returns:
- true if locking visibility on
-
setLockVisibilityToggle
public void setLockVisibilityToggle(boolean lockVisibilityToggle) Set the locking visibility of the display- Specified by:
setLockVisibilityTogglein interfaceDisplayControl- Parameters:
lockVisibilityToggle- true to set locking visibility on
-
getDisplayVisibility
public boolean getDisplayVisibility()Get the visibility of the display- Specified by:
getDisplayVisibilityin interfaceDisplayControl- Returns:
- true if visibility on
-
toggleVisibilityForVectorGraphicsRendering
Toggle the visibility for vector graphics rendering- Specified by:
toggleVisibilityForVectorGraphicsRenderingin interfaceDisplayControl- Parameters:
rasterMode- the toggle mode- Throws:
Exception- problem toggling
-
getIsRaster
public boolean getIsRaster()Is this a raster display?- Returns:
- true if raster
-
setIsRaster
public void setIsRaster(boolean isRaster) Set IsRaster property- Parameters:
isRaster- the value
-
setDisplayVisibility
public void setDisplayVisibility(boolean on) Set the visibility of the display and set the state of any visibility buttons we may have.- Specified by:
setDisplayVisibilityin interfaceDisplayControl- Parameters:
on- true to set visibility on
-
setDisplayableVisiblity
protected void setDisplayableVisiblity(Displayable d, boolean visible) throws RemoteException, VisADException Deprecated, misspelled version of setDisplayVisibility. deprecated- Parameters:
d- dvisible- visible- Throws:
VisADException- the VisAD exceptionRemoteException- the remote exception
-
canSaveDataInCache
protected boolean canSaveDataInCache()See if this can save data in cache.- Returns:
- true if allowable
-
setDisplayableVisibility
protected void setDisplayableVisibility(Displayable d, boolean visible) throws RemoteException, VisADException Set the ultimate visibility of the particularDisplayable. Used for maintaining the visibility of individual displayables if there are multiple.- Parameters:
d-Displayablein questionvisible- true if it should be visible when the visibility of the entire control is true.- Throws:
RemoteException- some RMI exception occuredVisADException- error setting the visibility in VisAD
-
itemStateChanged
A no-op method to implement the ItemListener interface.- Specified by:
itemStateChangedin interfaceItemListener- Parameters:
event- The event
-
displayControlFailed
public void displayControlFailed()Method to do what needs to be done when the display control failed. -
close
public void close()Close the window. If this display control is not shown in any ViewManager-s then call doRemove -
popup
Show the dialog window for this control.- Parameters:
src- Component that we popup the window near. May be null.
-
actionPerformed
Process the actions of any of the controls created with the doMake...Control method calls.- Specified by:
actionPerformedin interfaceActionListener- Parameters:
event- The action event
-
inGlobeDisplay
public boolean inGlobeDisplay()Are we in a Globe display?- Returns:
- true if we're in the globe
-
getMapDisplay
Just calls getNavigatedDisplay- Returns:
- The NavigatedDisplay that this control displays in.
-
isDisplay3D
public boolean isDisplay3D()Utility method to determine if we are displaying in a 3d viewmanager- Returns:
- Is the display 3d
-
getDisplayAltitudeType
Utility method to get the altitude type of the display- Returns:
- Altitude type of the display
-
setDisplayInactive
public void setDisplayInactive()Set the display master to be inactive. Return whether it was active at first. -
setDisplayActive
public void setDisplayActive()If wasActive is true then set the display master to be active. -
xxxsetDisplayActive
Set the display master to be active/inactive.- Parameters:
active- Active or inactive- Throws:
RemoteException- some RMI exception occuredVisADException- error setting the visibility in VisAD
-
getMapViewManager
A helper method for finding theMapViewManagerthis control displays in. This method iterates through the list of DisplayInfo-s, finding the first one that holds an instance of a MapViewManager. If not found this returns the default MapViewManager- Returns:
- A MapViewManager
-
getDisplayMaster
A helper method for finding theDisplayMasterthat displays the givenDisplayable- Parameters:
displayable- The displayable to look for- Returns:
- The DisplayMaster the displayable is in
-
getViewManager
A helper method for finding the commonViewManagerwhich is displaying the given displayable.- Parameters:
displayable- The displayable to look for- Returns:
- The ViewManager the displayable is in
-
getViewManager
Get, from theControlContext, theViewManageridentified by theViewDescriptorreturned fromgetDefaultViewDescriptor()- Specified by:
getViewManagerin interfaceDisplayControl- Returns:
- The view manager
-
getViewManager
- Parameters:
viewDescriptor- The view descriptor that identifies the view manager we want- Returns:
- The view manager
-
doMakeVisibilityControl
Get the toggle button JCheckBox that is source for item listener events to toggle visibility of the display.- Specified by:
doMakeVisibilityControlin interfaceDisplayControl- Parameters:
label- The label to use when creating the JCheckBox- Returns:
- JCheckBox the toggle button
-
doMakeRemoveControl
Create the gui control (a JButton) that allows the user to remove this DisplayControl. This object is added as an ActionListener to the button with the action command CMD_REMOVE.- Parameters:
tooltip- tooltip for the button- Returns:
- button
-
showColorDialog
public void showColorDialog()Show the color dialog -
showColorDialog
Show the color dialog and invoke the named method- Parameters:
methodName- the method name to invoke
-
setColor
Set the color for the selector. Used by persistence.- Parameters:
c- color to use- Throws:
RemoteException- some RMI exception occuredVisADException- error setting the color in VisAD
-
getColor
Get the color for the selector. Used by persistence.- Returns:
- color being used.
-
getRangeToApply
Get the range to use to apply to displayables- Returns:
- the range for displayables
- Throws:
RemoteException- On badnessVisADException- On badness
-
getRange
Get the range for the parameter- Returns:
- range being used
- Throws:
RemoteException- some RMI exception occuredVisADException- error getting the range in VisAD
-
getSelectRange
Get the range for the data- Returns:
- range of data
- Throws:
RemoteException- some RMI exception occuredVisADException- error getting the range in VisAD
-
getRangeForColorTable
Get the range for the color table.- Returns:
- range being used
- Throws:
RemoteException- some RMI exception occuredVisADException- error getting the range in VisAD
-
setRange
Set the range (from the colortablewidget)- Parameters:
whichColortable- Defines which color table to use. Default is the main one.newRange- The value- Throws:
RemoteException- On badnessVisADException- On badness
-
setColorTable
public void setColorTable(String whichColorTable, ColorTable newColorTable) throws RemoteException, VisADException Set the color table from the colortablewidget- Parameters:
whichColorTable- Defines which color table to use. Default is the main one.newColorTable- The new colortable- Throws:
RemoteException- On badnessVisADException- On badness
-
revertToDefaultColorTable
Revert to the default- Parameters:
whichColorTable- Which one. Default is the main one.
-
revertToDefaultRange
Revert to the default- Parameters:
whichColorTable- Which one. Default is the main one.
-
setRange
Set the range for the color table.- Parameters:
newRange- range to use- Throws:
RemoteException- some RMI exception occuredVisADException- error setting the range in VisAD
-
setSelectRange
Set the range for the select data.- Parameters:
newRange- range to use- Throws:
RemoteException- some RMI exception occuredVisADException- error setting the range in VisAD
-
setColorTableName
This method is for legacy bundles that used to save off the color table name instead of the color table.- Parameters:
n- The name of the color table
-
setColorTable
Set theColorTableproperty.- Parameters:
newColorTable- The new value for ColorTable- Throws:
RemoteException- some RMI exception occuredVisADException- error setting the color table in VisAD
-
getColorTable
Get theColorTableproperty.- Returns:
- The ColorTable
-
setDisplayListColor
Set the display list color property.- Parameters:
newColor- The new color- Throws:
RemoteException- some RMI exception occuredVisADException- error setting the color in VisAD
-
setDisplayListColor
protected void setDisplayListColor(Color newColor, boolean fromUser) throws RemoteException, VisADException Set the display list color property.- Parameters:
newColor- The new colorfromUser- true if this is from the user- Throws:
RemoteException- some RMI exception occuredVisADException- error setting the color in VisAD
-
getDisplayListColor
Get the DisplayListColor property.- Returns:
- The display list color
-
getExtraLegendComponent
Assume that any display controls that have a color table widget will want the color table to show up in the legend.- Parameters:
legendType- type of legend- Returns:
- The extra JComponent to use in legend
-
getColorTableWidget
Get the ColorTableWidget using the specified range.- Parameters:
r- range for the color table- Returns:
- widget
- Throws:
RemoteException- some RMI exception occuredVisADException- error setting the color table range in VisAD
-
getSelectRangeWidget
Get the SelectRangeWidget using the specified range.- Parameters:
r- range for the color table- Returns:
- widget
- Throws:
RemoteException- some RMI exception occuredVisADException- error setting the color table range in VisAD
-
getLineWidthWidget
Get the LineWidthWidget- Returns:
- widget
- Throws:
RemoteException- some RMI exception occuredVisADException- error setting the color table range in VisAD
-
doMakeColorControl
A wrapper around doMakeColorControl (Color color), passing in null as the Color argument.- Returns:
- color selector component
- See Also:
-
doMakeColorControl
This creates a gui control for selecting a Color. It uses the list of Colors defined by the idv.DisplayConventions class. If the color argument is non-null then the corresponding String name of the color is retrieved from idv.DisplayConventions. If found the name is used to set the selected item on the JComboBox.- Parameters:
color- default- Returns:
- color selector component
-
getVerticalValue
public double getVerticalValue(double value) Get the vertical position for a constant map from a value in the range of -1.0 to 1.0.- Parameters:
value- value to scale to vertical coordinates- Returns:
- scaled value in vertical coordinates
-
setHelpUrl
Set the help URL for this DisplayControl- Parameters:
helpUrl- URL for the help.
-
getProperty
Wrapper around ControlContext.getProperty method- Parameters:
name- property namedflt- default value- Returns:
- The boolean value of the given property or the dflt if undefined
-
getProperty
Wrapper around ControlContext.getProperty method- Parameters:
name- property namedflt- default value- Returns:
- The String value of the given property or the dflt if undefined
-
getObjectStore
Return the object store from the getControlContext- Returns:
- The object store to use.
-
setOkToFireEvents
public void setOkToFireEvents(boolean v) Set whether it's okay to fire events to listeners.- Parameters:
v- true if okay.
-
getOkToFireEvents
public boolean getOkToFireEvents()Get whether it's okay to fire events to listeners.- Returns:
- true if okay.
-
setContourInfoParams
Used by the isl to override selective parameters in the default contourInfo- Parameters:
s- The param string.
-
setContourInfo
Set the contour parameters for any contours- Parameters:
newInfo- the new contour information- Throws:
RemoteException- some RMI exception occuredVisADException- error setting the contour info in VisAD
-
getContourInfo
Get the contour information for any contours- Returns:
- the contour information
-
setColorScaleInfo
Set the color scale parameters for any color scale- Parameters:
newInfo- the new contour information- Throws:
RemoteException- some RMI exception occuredVisADException- error setting the contour info in VisAD
-
getColorScaleInfo
Get the contour information for any contours- Returns:
- the contour information
-
getCachedData
Get the cache of data. Not being used now.- Returns:
- Data cache
-
setCachedData
Set the data cache. Not being used now.- Parameters:
cache- Data cache
-
setDataInstances
Sets the list ofDataInstancesfor this DisplayControl. May be null.- Parameters:
l-ListofDataInstances
-
getDisplayScale
Get the scaling factor for probes and such. The scaling is the parameter that gets passed to TextControl.setSize() and ShapeControl.setScale().- Returns:
- ratio of the current matrix scale factor to the saved matrix scale factor.
- Throws:
VisADException- problem determining scaleRemoteException- problem determining scale for remote display
-
getDefaultSamplingMode
Get the perferred sampling mode.- Returns:
- sampling mode (WEIGHTED_AVERAGE, NEAREST_NEIGHBOR)
-
setDefaultSamplingMode
Set sampling mode.- Parameters:
newMode- String name of sampling mode
-
getSamplingModeValue
public int getSamplingModeValue()Get the sampling mode- Returns:
- sampling mode
-
getSamplingModeValue
Get the integer value for the sampling mode supplied- Parameters:
samplingMode- String name of sampling mode- Returns:
- value to use in resampling
-
getSamplingModeName
Get the name of the sampling mode- Parameters:
mode- String name of sampling mode- Returns:
- value to use in resampling
-
getDefaultSamplingModeValue
public int getDefaultSamplingModeValue()Get the integer value of the default sampling mode- Returns:
- integer value of default sampling mode
-
setDisplayCategory
This is the category that is defined for this control. It is mostly used by the legend guis to organise the presentation of the display controls.- Specified by:
setDisplayCategoryin interfaceDisplayControl- Parameters:
value- The new value for the display category.
-
getDisplayCategory
This is the category that is defined for this control. It is mostly used by the legend guis to organise the presentation of the display controls.- Specified by:
getDisplayCategoryin interfaceDisplayControl- Returns:
- The display category.
-
getViewManagers
Method to get a list of ViewManagers that are applicable to this DisplayControl.- Returns:
Listof view managers associated with this DisplayControl's Displayables.
-
setColorScaleVisible
Set the visibility of the color scale.- Parameters:
viz- true for color scales to be visible- Throws:
RemoteException- On badnessVisADException- On badness
-
setHadDataChoices
public void setHadDataChoices(boolean value) Set the HadDataChoices property.- Parameters:
value- The new value for HadDataChoices
-
getHadDataChoices
public boolean getHadDataChoices()Get the HadDataChoices property.- Returns:
- The HadDataChoices
-
setOriginalDataChoicesLabel
Set the name of the data choice- Parameters:
s- the name
-
getOriginalDataChoicesLabel
Get the name of the data choice, if there is one, when we are saving off without data- Returns:
- datachoice name
-
setTemplateName
Set the TemplateName property.- Parameters:
value- The new value for TemplateName
-
getTemplateName
Get the TemplateName property.- Returns:
- The TemplateName
-
setNameFromUser
Set the NameFromUser property. This is kept around for legacy bundles- Parameters:
value- The new value for NameFromUser
-
setName
Set the Name property. Keep around for legacy bundles.- Parameters:
value- The new value for Name
-
setId
Set the Name property.- Parameters:
value- The new value for Name
-
getId
Get the Id property.- Returns:
- The Id
-
setCollapseLegend
public void setCollapseLegend(boolean value) Set the collapsed legend property.- Specified by:
setCollapseLegendin interfaceDisplayControl- Parameters:
value- The new value for collapsedLegend
-
getCollapseLegend
public boolean getCollapseLegend()Get the collapsed legend property.- Specified by:
getCollapseLegendin interfaceDisplayControl- Returns:
- The collapsed legend property
-
getTransientProperty
Find a property on the display control. These properties are not saved.- Specified by:
getTransientPropertyin interfaceDisplayControl- Parameters:
key- The key- Returns:
- The value
-
putTransientProperty
Put a property on the display control. These properties are not saved.- Specified by:
putTransientPropertyin interfaceDisplayControl- Parameters:
key- The keyvalue- The value
-
applyPreferences
public void applyPreferences()Apply preferences to this control. Subclasses should override if needed.- Specified by:
applyPreferencesin interfaceDisplayControl
-
setZPosition
Set the ZPosition property.- Parameters:
value- The new value for ZPosition- Throws:
RemoteException- When bad things happenVisADException- When bad things happen
-
setZPosition
Set the Z position- Parameters:
value- the valuefromSlider- true if from slider- Throws:
RemoteException- When bad things happenVisADException- When bad things happen
-
setLineWidth
Set the line width property.- Parameters:
value- The new value for line width- Throws:
RemoteException- When bad things happenVisADException- When bad things happen
-
getLineWidth
public int getLineWidth()Get the line width property.- Returns:
- The line width
-
getInitialZPosition
protected double getInitialZPosition()Get the initial Z position- Returns:
- the position in Z space
-
getZPosition
public double getZPosition()Get the ZPosition property.- Returns:
- The ZPosition
-
updateAnimation
protected void updateAnimation()Update the animation for the view manager -
getSomeAnimation
Get some animation.- Returns:
- The animation
- Throws:
RemoteException- On BadnessVisADException- On Badness
-
getAnimation
Get the animation- Returns:
- The animation
- Throws:
RemoteException- On BadnessVisADException- On Badness
-
getAnimation
Get the Animation for this display.- Parameters:
createOurOwn- If true then we create our own. Else we get it from the ViewManager we are displayed in.- Returns:
- The Animation
- Throws:
RemoteException- On BadnessVisADException- On Badness
-
getAnimation
Create, if needed, and return the Animation to use- Parameters:
timeType- The time type- Returns:
- The Animation
- Throws:
RemoteException- On BadnessVisADException- On Badness
-
getAnimation
protected Animation getAnimation(boolean createOurOwn, RealType timeType) throws VisADException, RemoteException Get the Animation for this display.- Parameters:
createOurOwn- If true then we create our own. Else we get it from the ViewManager we are displayed in.timeType- Time type- Returns:
- The Animation
- Throws:
RemoteException- On BadnessVisADException- On Badness
-
getViewAnimation
Get the Animation that is from the view manager for this control- Returns:
- The Animation
- Throws:
RemoteException- On BadnessVisADException- On Badness
-
getInternalAnimation
Create if needed and return an Animation- Returns:
- The Animation
- Throws:
RemoteException- On BadnessVisADException- On Badness
-
getInternalAnimation
Create if needed and return an Animation- Parameters:
timeType- The realtype of the time set- Returns:
- The Animation
- Throws:
RemoteException- On BadnessVisADException- On Badness
-
getAnimationWidget
Create, if needed, and return the AnimationWidget- Returns:
- The animation widget
- Throws:
RemoteException- On BadnessVisADException- On Badness
-
isInitDone
public boolean isInitDone()Check if initialization is done- Specified by:
isInitDonein interfaceDisplayControl- Returns:
- true if done
-
setShowInLegend
public void setShowInLegend(boolean value) Set the ShowInLegend property.- Parameters:
value- The new value for ShowInLegend
-
getShowInLegend
public boolean getShowInLegend()Get the ShowInLegend property.- Specified by:
getShowInLegendin interfaceDisplayControl- Returns:
- The ShowInLegend
-
shouldApplyFastRendering
protected boolean shouldApplyFastRendering()This method can be overwritten by the derived classes that do not want the general application of the fast rendering flag.- Returns:
- Should fast rendering logic be used.
-
getDefaultFastRendering
protected boolean getDefaultFastRendering()Get the default for fast rendering- Returns:
- true to use fast rendering
-
getInitialFastRendering
protected boolean getInitialFastRendering()Get the initial fast rendering property- Returns:
- the initial fast rendering property
-
setUseFastRendering
public void setUseFastRendering(boolean value) Set the UseFastRendering property.- Parameters:
value- The new value for UseFastRendering
-
getUseFastRendering
public boolean getUseFastRendering()Get the UseFastRendering property.- Returns:
- The UseFastRendering
-
setAnimationSet
A utility method to set the animation set from the given list of times of the animation- Parameters:
dateTimes- List of DateTime objects- Throws:
RemoteException- On badnessVisADException- On badness
-
setAnimationInfo
Set the AnimationInfo property.- Parameters:
value- The new value for AnimationInfo
-
getAnimationInfo
Get the AnimationInfo property.- Returns:
- The AnimationInfo
-
makeLockButton
Create a lock button for the given display control.- Returns:
- The button used to lock the toggling of visibility
-
updateLockButton
Change the icon in the lock button for the given display control.- Parameters:
lockBtn- The button.
-
makeRemoveButton
Create an icon button for removing the given display control.- Returns:
- The button used to lock the toggling of visibility
-
setViewManagerClassNames
Set the ViewManagerClasses property.- Parameters:
value- The new value for ViewManagerClasses
-
getViewManagerClassNames
Get the ViewManagerClasses property.- Returns:
- The ViewManagerClasses
-
setColorDimness
public void setColorDimness(float value) Set the ColorDimness property.- Parameters:
value- The new value for ColorDimness
-
getColorDimness
public float getColorDimness()Get the ColorDimness property.- Returns:
- The ColorDimness
-
setDataTimeRange
Set the DataTimeRange property.- Parameters:
value- The new value for DataTimeRange
-
getDataTimeRange
Get the DataTimeRange property.- Returns:
- The DataTimeRange
-
getDataTimeRange
Get the DataTimeRange property.- Parameters:
createIfNeeded- If true then create it- Returns:
- The date time range
-
setUseTimesInAnimation
public void setUseTimesInAnimation(boolean value) Set the UseTimesInAnimation property.- Parameters:
value- The new value for UseTimesInAnimation
-
getUseTimesInAnimation
public boolean getUseTimesInAnimation()Get the UseTimesInAnimation property.- Returns:
- The UseTimesInAnimation
-
convertColorRange
Utility to convert the given raw data range into the display units- Parameters:
rawRange- Raw data rangerawUnit- the raw unit for the range- Returns:
- Converted range
-
convertRange
Utility to convert the given raw data range into the display units- Parameters:
rawRange- Raw data rangerawUnit- the raw unit for the rangeoutUnit- the converted unit- Returns:
- Converted range
-
setExpandedInTabs
public void setExpandedInTabs(boolean value) Set the ExpandedInTabs property.- Specified by:
setExpandedInTabsin interfaceDisplayControl- Parameters:
value- The new value for ExpandedInTabs
-
getExpandedInTabs
public boolean getExpandedInTabs()Get the ExpandedInTabs property.- Specified by:
getExpandedInTabsin interfaceDisplayControl- Returns:
- The ExpandedInTabs
-
setShowInTabs
public void setShowInTabs(boolean value) Set the ShowInTabs property.- Specified by:
setShowInTabsin interfaceDisplayControl- Parameters:
value- The new value for ShowInTabs
-
getShowInTabs
public boolean getShowInTabs()Get the ShowInTabs property.- Specified by:
getShowInTabsin interfaceDisplayControl- Returns:
- The ShowInTabs
-
shouldBeDocked
public boolean shouldBeDocked()Should this be docked- Specified by:
shouldBeDockedin interfaceDisplayControl- Returns:
- true if should be docked
-
canBeDocked
public boolean canBeDocked()Can this be docked- Specified by:
canBeDockedin interfaceDisplayControl- Returns:
- true if can be docked
-
setVersion
public void setVersion(double value) Set the Version property.- Parameters:
value- The new value for Version
-
getVersion
public double getVersion()Get the Version property.- Returns:
- The Version
-
getWasUnPersisted
protected boolean getWasUnPersisted()See if we were unpersisted- Returns:
- true if we were
-
setDisplayListTemplate
Set the DisplayListTemplate property.- Parameters:
value- The new value for DisplayListTemplate
-
getDisplayListTemplate
Get the DisplayListTemplate property.- Returns:
- The DisplayListTemplate
-
getDefaultDisplayListTemplate
Get the default display list template for this control. Subclasses can override- Returns:
- the default template
-
setLegendLabelTemplate
Set the LegendLabel property.- Parameters:
value- The new value for LegendLabel
-
getLegendLabelTemplate
Get the LegendLabel property.- Returns:
- The LegendLabel
-
setLegendLabel
A no-op so unpersisting old bundles won't flag a warning.- Parameters:
label- The label
-
setExtraLabelTemplate
Set the ExtraLabelTemplate property.- Parameters:
value- The new value for ExtraLabelTemplate
-
getExtraLabelTemplate
Get the ExtraLabelTemplate property.- Returns:
- The ExtraLabelTemplate
-
setSelectRangeEnabled
public void setSelectRangeEnabled(boolean value) Set the SelectRangeEnabled property.- Parameters:
value- The new value for SelectRangeEnabled
-
getSelectRangeEnabled
public boolean getSelectRangeEnabled()Get the SelectRangeEnabled property.- Returns:
- The SelectRangeEnabled
-
canExportData
public boolean canExportData()Can this display control write out data.- Returns:
- true if it can
-
getDisplayedData
Get the DisplayedData- Returns:
- the data or null
- Throws:
RemoteException- problem getting remote dataVisADException- problem getting local data
-
exportDisplayedData
Export displayed data to file- Parameters:
type- type of data
-
useZPosition
protected boolean useZPosition()See if the display supports Z positioning.- Returns:
- true if z positioning is supported
-
applySkipFactor
protected void applySkipFactor()Use the value of the skip factor to subset the data. -
setSkipValue
public void setSkipValue(int value) Set the skip value property- Parameters:
value- new skip value
-
getSkipValue
public int getSkipValue()Get the skip value property- Returns:
- the current skip value
-
doMakeSkipFactorSlider
Make the skip factor slider.- Returns:
- slider for setting skip factor
-
checkImageSize
If image is bigger than threshold then set the skip value- Parameters:
image- The image
-
setComponentHolder
Set the ComponentHolder property.- Parameters:
value- The new value for ComponentHolder
-
getComponentHolder
Get the ComponentHolder property.- Returns:
- The ComponentHolder
-
showColorControlWidget
public boolean showColorControlWidget()Show the color control widget in the widgets if FLAG_COLOR is set.- Returns:
- false subclasses should override
-
setDoCursorReadout
public void setDoCursorReadout(boolean value) Set the DoCursorReadout property.- Parameters:
value- The new value for DoCursorReadout
-
getDoCursorReadout
public boolean getDoCursorReadout()Get the DoCursorReadout property.- Returns:
- The DoCursorReadout
-
setTextureQuality
public void setTextureQuality(int quality) Set the texture quality- Parameters:
quality- 1=high, > 1 lower
-
getTextureQuality
public int getTextureQuality()Get the texture quality- Returns:
- the texture quality
-
getTextureQualityLabel
Return the label that is to be used for the texture quality widget This allows derived classes to override this and provide their own name,- Returns:
- Label used for the color widget
-
applyTextureQuality
Use the value of the texture quality to set the value on the display- Throws:
RemoteException- Java RMI errorVisADException- VisAD error
-
applySmoothing
Use the value of the smoothing properties to set the value on the display. Subclasses need to implement.- Throws:
RemoteException- Java RMI errorVisADException- VisAD error
-
doMakeSmoothingWidget
Make the smoothing widget- Returns:
- the smoothing widget
-
useSmoothingFactor
public boolean useSmoothingFactor()Should we use the smoothing factor?- Returns:
- true if it's a smoothing type that uses a factor
-
getSmoothingFactor
public int getSmoothingFactor()Get the smoothing factor- Returns:
- the smoothing factor
-
getSmoothingType
Get the smoothing type- Returns:
- the smoothing factor
-
setSmoothingFactor
public void setSmoothingFactor(int val) Set the smoothing factor- Parameters:
val- the new smoothing factor
-
setSmoothingType
Set the smoothing type- Parameters:
type- the new smoothing type
-
setPointSize
public void setPointSize(float value) Set the PointSize property.- Parameters:
value- The new value for PointSize
-
getPointSize
public float getPointSize()Get the PointSize property.- Returns:
- The PointSize
-
doMakePointSizeWidget
Make the point size widget- Returns:
- the point size widget
-
setVisbilityAnimationPause
public void setVisbilityAnimationPause(int value) Set the VisbilityAnimationPause property.- Parameters:
value- The new value for VisbilityAnimationPause
-
getVisbilityAnimationPause
public int getVisbilityAnimationPause()Get the VisbilityAnimationPause property.- Specified by:
getVisbilityAnimationPausein interfaceDisplayControl- Returns:
- The VisbilityAnimationPause
-
setIsTimeDriver
public void setIsTimeDriver(boolean value) Set the IsTimeDriver property.- Parameters:
value- The new value for IsTimeDriver
-
getIsTimeDriver
public boolean getIsTimeDriver()Get the IsTimeDriver property.- Specified by:
getIsTimeDriverin interfaceDisplayControl- Returns:
- The IsTimeDriver
-
setUsesTimeDriver
public void setUsesTimeDriver(boolean value) Set the UsesTimeDriver property.- Parameters:
value- The new value for UsesTimeDriver
-
getUsesTimeDriver
public boolean getUsesTimeDriver()Get the UsesTimeDriver property.- Returns:
- The UsesTimeDriver
-
relocateDisplay
public void relocateDisplay(ucar.unidata.geoloc.LatLonRect originalBounds, ucar.unidata.geoloc.LatLonRect newBounds) When we relocate a bundle this gets called to relocate the display This method gets overwritten by the probe and cross section displays so they can move their selection points to a new location- Parameters:
originalBounds- The original bounds of the datasourcenewBounds- The relocated bounds of the datasource
-
relocateDisplay
public void relocateDisplay(ucar.unidata.geoloc.LatLonRect originalBounds, ucar.unidata.geoloc.LatLonRect newBounds, boolean useDataProjection) When we relocate a bundle this gets called to relocate the display This method gets overwritten by the probe and cross section displays so they can move their selection points to a new location- Parameters:
originalBounds- The original bounds of the datasourcenewBounds- The relocated bounds of the datasource
-
getLatLonPoints
public ucar.unidata.geoloc.LatLonPoint[] getLatLonPoints(double[][] xyPoints) _more_- Parameters:
xyPoints- _more_- Returns:
- _more_
-
getShoulDoProgressiveResolution
public boolean getShoulDoProgressiveResolution()Can we do progresive resolution from this display- Returns:
- true if display and view supports it
-
canDoProgressiveResolution
protected boolean canDoProgressiveResolution()Does this control support progressive resolution? Subclasses should override.- Returns:
- false
-
getIsProgressiveResolution
public boolean getIsProgressiveResolution()_more_- Returns:
- _more_
-
setIsProgressiveResolution
public void setIsProgressiveResolution(boolean isPG) _more_- Parameters:
isPG- _more_
-
getMatchDisplayRegion
public boolean getMatchDisplayRegion()Should we match the display region for spatial bounds- Returns:
- true if match display region
-
setMatchDisplayRegion
public void setMatchDisplayRegion(boolean useDR) Set whether we should match the display region for spatial bounds- Parameters:
useDR- true if match display region
-
saveProjection
public void saveProjection()When relocate display through ISL or RBB it will be good to save the projection otherwise, the home button will bring the view back to original view
-