ucar.unidata.idv
Class ViewManager

java.lang.Object
  extended by ucar.unidata.collab.SharableImpl
      extended by ucar.unidata.idv.ViewManager
All Implemented Interfaces:
ActionListener, ItemListener, EventListener, Sharable, ControlListener, DisplayListener
Direct Known Subclasses:
CrossSectionViewManager, HodographViewManager, HovmollerViewManager, NavigatedViewManager, SoundingViewManager, TimeHeightViewManager

public class ViewManager
extends SharableImpl
implements ActionListener, ItemListener, ControlListener, DisplayListener

A wrapper around a DisplayMaster. Provides an interface for managing user interactions, gui creation, etc.

Author:
IDV development team

Nested Class Summary
static class ViewManager.MatrixCommand
          Class MatrixCommand manages changes to the viewpoint matrix
 
Field Summary
protected  JComponent animationHolder
          The panel that holds the animation widget
protected  JMenu animationMenu
          This holds the visibility toggle animation commands.
static Color borderHighlightColor
          border hightlight color
static int borderWidth
          border width
protected  boolean clickToFocus
          Do we focus on this one only when the user clicks
protected  Rectangle displayBounds
          The bounds of the display_
protected  JFrame fullScreenWindow
          The window for full screen
protected static Border highlightBorder
          highlight border
protected  JComponent innerContents
          The inner gui
protected  boolean lastActive
          Is the the currently active VM
protected  long lastTimeActivated
          Keeps track of the last time this VM was set as the active VM
protected static TwoFacedObject[] logoPoses
          logo positions
protected  JLabel nameLabel
          name label
protected static Border normalBorder
          normal border
static String PREF_3DCLIP
          Preference for clipping at 3d box_
static String PREF_ANIREADOUT
          Preference for showing the time string in the display
static String PREF_BGCOLOR
          For the bg color
static String PREF_BORDERCOLOR
          For the currently selected panel.
static String PREF_CONTOUR_LABELALIGN
          for the contour label Font
static String PREF_CONTOUR_LABELFONT
          for the contour label Font
static String PREF_CONTOUR_LABELSIZE
          for the contour label size
static String PREF_DIMENSION
          Preference for 3d or 2d _
static String PREF_DISPLAYLISTCOLOR
          For the display list color
static String PREF_DISPLAYLISTFONT
          For the display list font
static String PREF_FGCOLOR
          For the foreground color
static String PREF_LOGO
          for the logo
static String PREF_LOGO_POSITION_OFFSET
          for the logo position
static String PREF_LOGO_SCALE
          for the logo scale
static String PREF_LOGO_VISIBILITY
          for the logo visibility
static String PREF_PREFIX
          Prefix used for preference String ids
static String PREF_SHAREVIEWS
          Preference for sharing view points
static String PREF_SHOWANIMATIONBOXES
          Show the bottom legend
static String PREF_SHOWBOTTOMLEGEND
          Show the bottom legend
static String PREF_SHOWCURSOR
          Preference for showing cursor readout
static String PREF_SHOWDISPLAYLIST
          Preference for showing cursor readout
static String PREF_SHOWSCALES
          Preference for showing the wireframe box
static String PREF_SHOWSIDELEGEND
          Show the side legend
static String PREF_SHOWTOOLBAR
          For hiding/showing components of the toolbar
static String PREF_SHOWTRANSECTSCALES
          Preference for showing the wireframe box
static String PREF_TOOLBARSFLOATABLE
          are the toolbars floatable
static String PREF_TOPBAR_VISIBLE
          For the visibility of the top compenent
static String PREF_WAITMSG
          For the visibility of the please wait message
static String PREF_WIREFRAME
          Preference for showing the wireframe box
static String PROP_COMPONENT_RESIZED
          Property id for component resizing
protected  boolean showControlLegend
          Do we show the control legends
protected  boolean showControlMenu
          Do we show the control menu
static String TAG_COLORPAIR
          Xml tag for the color pair
static String TAG_COLORPAIRS
          Xml tag for the color pairs xml
protected  List toolbarIds
          List of the ids (String), one for each component in the toolbars list We keep this around so the user could have a preference to show or not show toolbar components.
protected  List toolbarNames
          List of the names (String), one for each component in the toolbars list We keep this around so the user could have a preference to show or not show toolbar components.
protected  List toolbars
          List of Components that are shown in the left side, vertical tool bar
protected  Rectangle windowBounds
          We keep the window bounds around for persisting/unpersisting this ViewManager.
 
Constructor Summary
ViewManager()
          A parameter-less ctor for the XmlEncoder based decoding.
ViewManager(ViewContext viewContext)
          Create this ViewManager
ViewManager(ViewContext viewContext, AnimationInfo info)
          Instantiate this ViewManager with the given AnimationInfo
ViewManager(ViewContext viewContext, DisplayMaster master, ViewDescriptor viewDescriptor, String properties)
          Create this ViewManager
ViewManager(ViewContext viewContext, ViewDescriptor viewDescriptor, String properties)
          Instantiate this ViewManager with the given AnimationInfo
ViewManager(ViewContext viewContext, ViewDescriptor viewDescriptor, String properties, AnimationInfo info)
          Instantiate this ViewManager with the given AnimationInfo
 
Method Summary
 void actionPerformed(ActionEvent event)
          Required interface for ActionEvents, to implement ActionListener for the UI objects such as JButton-s and MenuItem-s
protected  void addBooleanProperty(BooleanProperty bp)
          Add in the BooleanProperty into the list of properties.
protected  void addCommand(Command cmd)
          Add the command to the command manager.
 void addContextMenuItems(List menuItems)
          Add items to the context menu.
 boolean addDisplayInfo(DisplayInfo displayInfo)
          Add the DisplayInfo to the list of DisplayInfo-s If I have a DisplayMaster then set the master to be inactive and add the displayable held by the displayInfo into the displayMaster.
 void addDisplayInfos(List<DisplayInfo> displayInfos)
          Add the display infos
 void addDisplayListener(DisplayListener listener)
          Adds the given display listener to the DisplayMaster
protected  void addPropertiesComponents(JTabbedPane tabbedPane)
          Add a JTabbedPane to the properties component
 void addRemovable(Removable removable)
          Add a removeable object
protected  void addToolBar(Component component, String id, String name)
          Add the given component into the list of toolbar components.
 void addViewDescriptor(ViewDescriptor vd)
          Add the view descriptor
 void animationDriverChanged()
          Handle the time set from the animation widget changing
 boolean animationOk()
          Should this ViewManager create an animation object/widget.
protected  void animationTimeChanged()
          The time changed
 void applyPreferences()
          Some user preferences have changed.
 boolean applyProperties()
          Apply properties
 void aspectSliderChanged(int value)
          Handle an aspect slider change.
 void brighter()
          Make the lights brighter
 boolean canBe(ViewManager that)
          Can this view manager be used in exchange for the given view manager
protected  boolean checkForKmlImageCapture()
          Check if its ok to capture a kmz file
 void checkToolBarVisibility()
          Turn on/off the toolbar components based on the user preferences.
 void clearDisplays()
          This removes all of the display controls
 void clearImageGrabber(ImageSequenceGrabber grabber)
          The given grabber is done.
 void controlChanged(ControlEvent e)
          This is the default method (no-op) for the ControlListener interface
 void controlMoved(DisplayControl control)
          This gets called when a display control has been moved to this viewmanager
protected  JCheckBoxMenuItem createCBMI(JMenu menu, String id)
          A helper to create a check box menu item from the id for a BooleanProperty.
 void destroy()
          Destroy this view manager.
 void displayChanged(DisplayEvent de)
          An implementation of the the DisplayListener interface.
 void displayControlChanged(DisplayControl displayControl)
          Called when the dispay category or other state of the display control has changed.
 void displayControlVisibilityChanged(DisplayControl displayControl)
          handle when the display control has changed
 void displayDataChanged(DisplayControl displayControl)
          Handle the display data changing
protected  void doClose()
          Called when the window is closed.
 void doDrop(Object object)
          Handle the drop action
protected  Container doMakeContents()
          Create the main GUI contents.
protected  DisplayMaster doMakeDisplayMaster()
          Make the DisplayMaster for this ViewManger.
protected  JMenuBar doMakeMenuBar()
          Create and return the menu bar.
 ArrayList doMakeMenuList()
          Return a list of components that are used to create the menubar.
 ViewState doMakeViewState()
          Make a ViewState
protected  void doneFirstFrame()
          We have received the very first framedone event.
 void doPrintImage()
          Print an image
 void doPublishImage()
          Hook into the publishing interface to "publish" the screen image.
 void doPublishImage(String props)
          Hook into the publishing interface to "publish" the screen image.
 void doSaveImage()
          User has requested saving display as an image.
 void doSaveImage(boolean andSaveBundle)
          Save the image (and the bundle that does with it);
 void doSaveImageInThread()
          User has requested saving display as an image.
 void doSaveState()
          Save this state of this view manager.
 void ensureOnlyOneTimeDriver(DisplayControl displayControl)
          Ensure that there is only one time driver for this view THERE CAN BE ONLY ONE! - Highlander
protected  void fillLegends()
          This is called when the list of display controls has changed.
protected  void fillLegendsInner()
          actually fill the legends and update the display list
 void fillLegendsLater()
          Wait until there have been no calls to fillLegends for a little bit and then fill the legends
protected  TwoFacedObject findLoc(String loc)
          Find the appropriate combobox item from the string
 void firstInitializeViewMenu(JMenu viewMenu)
          Initialize the view menu.
 List getAliases()
          Get the Aliases property.
 Animation getAnimation()
          Return the Animation that is used.
 AnimationInfo getAnimationInfo()
          Get the AnimationInfo property.
 boolean getAnimationStringVisible()
          Deprecated. Use getAniReadout now
 DateTime[] getAnimationTimes()
          Get the array of animation times
 AnimationWidget getAnimationWidget()
          Return the AnimationWidget that is used.
 boolean getAniReadout()
          Get the animation readout flag
protected  JComponent getAspectPropertiesComponent()
          Get the aspect properties component
 double[] getAspectRatio()
          Get the AspectRatio property.
 Color getBackground()
          Get the background color or black if it is null
 Hashtable getBooleanPropertiesForPersistence()
          Get the BooleanPropertiesForPersistence property.
protected  BooleanProperty getBooleanProperty(String propertyId)
          Find, or create, the BooleanProperty identified with the given id
protected  BooleanProperty getBooleanProperty(String propertyId, boolean dflt)
          Get a BooleanProperty
protected  boolean getBp(String propertyId)
          Get the value of the BooleanProperty
protected  boolean getBp(String propertyId, boolean dflt)
          Get a BooleanProperty (local implementation)
 boolean getClickToFocus()
          Get the click to focus property.
 CommandManager getCommandManager()
          Create, if needed, and return the command manager
 JComponent getComponent()
          Return the GUI component from the DisplayMaster
 Container getContents()
          Return the full GUI contents.
protected  Border getContentsBorder()
          Get the border for the contents
 List getControls()
          Return the list of DisplayControls displayed in this ViewManager.
 List getControlsForLegend()
          Return the list of DisplayControls displayed in this ViewManager that are meant to be shown in a legend
protected  Color getDefaultBackground()
          Get the default background color
protected  Color getDefaultForeground()
          Get the default foreground color
 Rectangle getDisplayBounds()
          Get the DisplayBounds property.
 DisplayConventions getDisplayConventions()
          A wrapper around IdvBase.getDisplayConventions()
 CoordinateSystem getDisplayCoordinateSystem()
          Get the display side coordinate system, subclasses should implement if there is one.
protected  List<DisplayInfo> getDisplayInfos()
          Get a copy of the list of DisplayInfo-s
 Color getDisplayListColor()
          Get the display list color property.
 Font getDisplayListFont()
          Get the display list font property.
 double[] getDisplayMatrix()
          Get the display matrix array
 DisplayRenderer getDisplayRenderer()
          get the display renderer
 IdvWindow getDisplayWindow()
          We call this getDisplayWindow instead of getWindow so the window is not treated as a persistable property.
 Animation getExternalAnimation()
          Get the ExternalAnimation property.
 AnimationWidget getExternalAnimationWidget()
          Get the ExternalAnimationWidget property.
 Color getForeground()
          Get the foreground color or white if it is null
 int getFullScreenHeight()
          Get the FullScreenHeight property.
 int getFullScreenWidth()
          Get the FullScreenWidth property.
 boolean getHasWindow()
          Getter method for xml persistence.
protected  boolean getHaveInitialized()
          have we initialized
static Border getHighlightBorder()
          Get the border to use when this ViewManager is the currently selected ViewManager
 IntegratedDataViewer getIdv()
          Get the IDV
 IdvUIManager getIdvUIManager()
          Get the IdvUIManager to use.
protected  boolean getInitDone()
          Have we finished initializing
protected  void getInitialBooleanProperties(List props)
          Get the intial BooleanProperties
 String getInitViewStateName()
          Get the intial ViewState name
 JComponent getInnerContents()
          This is meant to be overrode by a derived class to return the contents (typically the display master's component) that is the "abbreviated" gui.
 boolean getIsActive()
          Is the DisplayMaster currently active.
 boolean getIsDestroyed()
          Has this ViewManager been destroyed.
 boolean getIsShared()
          Get the IsShared property.
 long getLastFrameDoneTime()
          Get the last time we've seen a FRAME_DONE event
 long getLastTimeActivated()
          Get the time that this was last the active VM
 boolean getLegendOnLeft()
          Get the LegendOnLeft property.
protected  List<IdvLegend> getLegends()
          Get the legends
 String getLegendState()
          Get the LegendState property.
 List<ucar.unidata.java3d.LightInfo> getLights()
          Get the Lights property.
protected  String getLogoFile()
          Get the logo
 String getLogoPosition()
          Get the logo position on the screen
 float getLogoScale()
          Get the logo scale
 boolean getLogoVisibility()
          Get the logo visibility
protected  JComponent getMainPropertiesComponent()
          Get main properties component
 DisplayMaster getMaster()
          Get the DisplayMaster.
 Dimension getMySize()
          Get the default size of the DisplayMaster held by this view.
 String getName()
          Get the Name property.
static Border getNormalBorder()
          Get the normal border
 boolean getPerspectiveView()
          Get whether this is in a perspective view or not
 ProjectionControl getProjectionControl()
          Get the projection control
 List getProjectionList()
          Get the list of Projections available.
 Hashtable getProperties()
          Get the Properties property.
 JComponent getPropertiesComponent()
          Get the component for setting properties on the display.
 Object getProperty(Object key)
          get a property.
 PublishManager getPublishManager()
          Get the PublishManager to use.
 boolean getReallyHasWindow()
          This returns the value of the hasWindow member which was set when unpersisting.
 IdvResourceManager getResourceManager()
          Get the IdvResourceManager to use.
 boolean getShareViews()
          Get the share view state flag
 boolean getShowAnimationBoxes()
          Should we show the animation widget boxes
 boolean getShowBottomLegend()
          Should we show the bottom legend that holds the list of display controls.
 boolean getShowControlLegend()
          Get whether we should show any of the display control legends.
 boolean getShowDisplayList()
          Get the show display list flag
 boolean getShowScales()
          Get the show display scale flag
 boolean getShowSideLegend()
          Should we show the side legend that holds the list of display controls.
protected  JComponent getSideComponent(JComponent sideLegend)
          Get the component that might hold the sideLegend By default this just returns the side legend component.
 int getSideDividerLocation()
          Get the location of the side legend or -1 if there is no side legend
 SideLegend getSideLegend()
          Get the SideLegend property.
 JSplitPane getSideLegendContainer()
          Deprecated. No longer called sideLegendContainer
 Hashtable getSkinProperties()
          Get the SkinProperties property.
 String getSkinProperty(String name)
          Get the named property for the skin
 int getSplitPaneLocation()
          Get the SplitPaneLocation property.
 StateManager getStateManager()
          Get the StateManager to use.
 XmlObjectStore getStore()
          Wrapper around IdvBase.getStore()
 List<DateTime> getTimeDriverTimes()
          Get the list of times from the control that is flagged as the time driver
 JComponent getTimelineComponent()
          make the timeline gui
 boolean getToolbarsFloatable()
          are the toolbars floatable
 boolean getTopBarVisible()
          Get the top component visibility.
 String getTypeName()
          What type of view is this
 String getUniqueId()
          Override the base class method to return a (hopefully) unique id.
 boolean getUseFastRendering(boolean b)
          This is called by display controls and allows us to force fast rendering
 ViewDescriptor getViewDescriptor()
          Get the ViewDescriptor.
 ViewManager getViewManager()
          Get the view manager
 GeoLocationInfo getVisibleGeoBounds()
          Does this viewmanager have any bounds that are visible.
 VMManager getVMManager()
          Get the VMManager to use.
 boolean getWaitMessageVisible()
          Get the please wait visible state flag
 boolean getWireframe()
          Get the show wireframe box flag
 void guiInitializationDone()
          This gets called when the initial guis (windows, etc) have been created and shown
protected  void handleBooleanPropertyChange(String id, boolean value)
          The BooleanProperty identified byt he given id has changed.
protected  void handleControlChanged(ControlEvent e)
          Handle a control changed.
protected  boolean hasBooleanProperty(String propertyId)
          Check to see if this view manager has the property
 boolean hasDisplayMaster()
          See if this has a display master
protected  void init()
          Initialize.
 void initAfterUnPersistence(IntegratedDataViewer idv)
          Called after this object has been unpersisted from xml.
protected  void initBooleanProperties()
          Create the set of BooleanPropertys.
 void initColorMenu(JMenu colorMenu)
          Dynamically add the menu items into the color menu
 void initDisplayMenu(JMenu displayMenu)
          This is called when the list of display controls has changed to update the display menu.
 void initFromSkin(Element skinNode)
          Initialize from a skin
protected  void initializeBooleanProperty(BooleanProperty bp)
          Initialize a BooleanProperty
 void initializeViewMenu(JMenu viewMenu)
          Dynamically initialize the view menu
 void initPreferences(IdvPreferenceManager preferenceManager)
          A hook so derived classes can add in their own preference widgets.
protected  void initToolBars()
          A hook so derived classes can add in their toolbar components
protected  void initUI()
          Create the ui
 void initViewState(ViewState viewState)
          Initialize the ViewState
 void initViewStateMenu(JMenu viewStateMenu)
          Initialize the View State menu
 void initWith(ViewManager that)
          Initialize this ViewManager with the state in the that ViewManager
 void initWith(ViewManager that, boolean ignoreWindow)
          Initialize this ViewManager with the state in the that ViewManager.
 void initWith(ViewState viewState)
          Init with a view state
protected  void initWithInner(ViewManager that, boolean ignoreWindow)
          Initialize this ViewManager with the state in the that ViewManager.
protected  void insertSideLegend()
          Place the side legend where it belongs
 boolean isClassOk(ViewDescriptor vd)
          If the given view descriptor has one or more class names is the class name of this ViewManager in the list
 boolean isCompatibleWith(ViewManager vm)
          Is this compatible with the other ViewManager
 boolean isCompatibleWith(ViewState viewState)
          Is this ViewState appropriate for me?
 boolean isDefinedBy(ViewDescriptor vd)
          Does this view manager have the given view descriptor
protected  boolean isFullScreen()
          Are we in full screen mode.
 boolean isInteractive()
          Is this an interactive session
static boolean isVectorGraphicsFile(String filename)
          Check to see if the file is a vector graphics file
 void itemStateChanged(ItemEvent e)
          Responds to ItemEvents handled by an ItemListener; in this class, from JCheckBoxes.
 void keyWasTyped(KeyEvent keyEvent)
          Process sthe key event
 void logException(String msg, Throwable exc)
          Helper to log errors
 JMenu makeColorMenu()
          make the color set menu
 DropPanel makeDropPanel(JComponent contents, boolean doBorder)
          Make a dnd panel
 void makeFrames()
          Make frames
protected  String makeLogoPosition(String pos, String offset)
          Make a logo position from the position and offset
protected  JMenu makeSavedViewsMenu()
          Make the saved views menu
protected  JMenu makeShowMenu()
          Create and return the show menu.
 JMenu makeViewMenu()
          Create and return the view menu.
protected  void makeViewStateMenu(JMenu viewStateMenu)
          Make the view state menu
protected  void notifyDisplayControls(String property)
          Tell the display controls that the projection has changed.
 boolean okToImportDisplay(DisplayControl control)
          Can this view manager import the given display control.
 int paintDisplayList(Graphics2D graphics, List<DisplayControl> displayControls, int width, int height, boolean bottom, Color color, Font font)
          Paint the display list in a 2D graphics
protected  String[] parseLogoPosition(String position)
          Parse the logo position
 void parseProperties(String properties)
          Parse and apply the properties in the semi-colon delimited list of name=value pairs.
 void printAspect(String msg)
          Print the aspect
 void putProperty(Object key, Object value)
          Set a property.
protected  void reallyFillLegends()
          tell the legends to fill themselves
 void removeColorPair(String name)
          Remove the named color pair from the users xml
 void removeDisplayInfo(DisplayInfo displayInfo)
          This removes the given DisplayInfo.
 void resetAspectSliders()
          Reset the aspect sliders.
 void resetFullScreen()
          Go back to normal screen
protected  void resetProjectionControl()
          Reset the projection control
 void setAliases(List value)
          Set the Aliases property.
 void setAnimatedVisibility(boolean state)
          Turn on/off the display control visibility toggling animation
 void setAnimationInfo(AnimationInfo value)
          Set the AnimationInfo property.
 void setAnimationStringVisible(boolean visible)
          Deprecated. Use setAniReadout now
 void setAniReadout(boolean value)
          Set the show animation readout flag
 void setAspectRatio(double[] value)
          Set the AspectRatio property.
 void setBackground(Color c)
          Set the background color
protected  void setBooleanProperties(ViewManager vm)
          Set the different boolean flags from thise held by the given view manager.
 void setBooleanPropertiesForPersistence(Hashtable value)
          Set the BooleanPropertiesForPersistence property.
protected  void setBp(String propertyId, boolean value)
          Helper to set the value of a BooleanProperty
 void setClickToFocus(boolean value)
          Set the click to focus property.
 void setColors(Color foreground, Color background)
          Set the foreground and background colors in the display.
 void setContentsBorder(Border b)
          Set the contents boreder
 void setCursorInDisplay(Cursor c)
          Set the cursor in the component of the main display
 void setDisplayBounds(Rectangle value)
          Set the DisplayBounds property.
 void setDisplayListColor(Color value)
          Set the display list color property.
 void setDisplayListFont(Font value)
          Set the display list font property.
protected  void setDisplayMaster(DisplayMaster master)
          Set the DisplayMaster
 void setDisplayMatrix(double[] newMatrix)
          Set the display matrix array
 void setExternalAnimation(Animation value, AnimationWidget widget)
          Set the ExternalAnimation property.
 void setForeground(Color c)
          Set the foreground color
 void setFullScreen()
          Go to full screen mode
 void setFullScreenHeight(int value)
          Set the FullScreenHeight property.
 void setFullScreenWidth(int value)
          Set the FullScreenWidth property.
 void setHasWindow(boolean value)
          Setter method for xml persistence.
static void setHighlightBorder(Color c)
          Sets the color used to denote the currently selected panel.
 void setIdv(IntegratedDataViewer idv)
          This is here to set the IDV when this object has been unpersisted.
 void setInitialSplitPaneLocation(double value)
          Set the InitialSplitPaneLocation property.
 void setInitViewStateName(String s)
          Set the initial ViewState name
 void setIsShared(boolean value)
          Set the IsShared property.
 void setLastActive(boolean b)
          Set whether this view manager is the last one active.
 void setLegendOnLeft(boolean value)
          Set the LegendOnLeft property.
 void setLegendState(IdvLegend legend, String state)
          Set the state of the legend
 void setLegendState(String value)
          Set the LegendState property.
 void setLights(List<ucar.unidata.java3d.LightInfo> value)
          Set the Lights property.
 void setLogoFile(String logo)
          Set the logo file or URL
 void setLogoPosition(String logop)
          Set the logo position on the screen
 void setLogoScale(float scale)
          Set the logo scale
 void setLogoVisibility(boolean on)
          Set the logo visibility
 void setMasterActive()
          Set the DisplayMaster active if there are no more outstanind mast active calls.
 void setMasterActive(boolean force)
          Set the DisplayMaster active if there are no more outstanind mast active calls.
 void setMasterInactive()
          Set the DisplayMaster inactive.
 void setName(String value)
          Set the Name property.
 void setProperties(Hashtable value)
          Set the Properties property.
 boolean setProperty(String name, String value, boolean ignoreError)
          Apply the given named property.
 void setShareViews(boolean value)
          Set the share view state flag
 void setShowControlLegend(boolean b)
          Set whether we should show any of the display control legends
 void setShowDisplayList(boolean value)
          Set the show display list flag
 void setShowScales(boolean value)
          Set the show display scale flag
 void setShowToolBars(boolean v)
          Turn on/off the showing of the toolbars
 void setSideDividerLocation(int l)
          Set the location of the side legend.
 void setSideLegend(SideLegend value)
          Set the SideLegend property.
 void setSideLegendPosition(String state)
          Set the position state of the side legend
 void setSize(Dimension d)
          Set the default size of the DisplayMaster held by this view.
 void setSkinProperties(Hashtable value)
          Set the SkinProperties property.
 void setSplitPaneLocation(int value)
          Set the SplitPaneLocation property.
 void setTopBarVisible(boolean visible)
          Toggle the top component visibility.
 void setView(String view)
          Set the view
 void setViewDescriptor(ViewDescriptor vd)
          Deprecated. Use addViewDescriptor
 void setWaitMessageVisible(boolean value)
          Set the please wait visible state flag
 void setWindow(IdvWindow w)
          Set the window that this ViewManager is shown in.
 void setWindowBounds(Rectangle r)
          Setter method for xml persistence
 void setWireframe(boolean value)
          Set the show wireframe flag
 boolean shouldDoThingsRightAway()
          A hack for when we are running isl and don't want to update the display incrementally This just returns true for now but is a hook for later
 void showColorPairDialog()
          Show the dialog that allows the user to change the foreground/background colors
 boolean showHighlight()
          Should we show the highlight border
 void showLegend()
          Show (float) all legends
 void showPropertiesDialog()
          Show the properties dialog
 void showTimeline()
          show the timeline window
 void showWindow()
          show the window I am in
 void startImageCapture()
          Start the image capture if we are not currently doing that.
 void toFront()
          Bring the window that contains this ViewManager to the front
 void toggleFullScreen()
          Toggle full screen
 String toString()
          Return the string representation of this object
 void turnOnOffAllDisplays(boolean on)
          This turns off the visiblity toggle animation and sets the visibility of all unlocked display controls to the given value.
protected  void updateAnnotations()
          Update the annotations
 void updateDisplayIfNeeded()
          Update display if needed
 void updateDisplayList()
          Populate the display list
protected  void updateNameLabel()
          Update the name label
 boolean useDisplay()
          Do we use the display
 void useImages()
          Use the images
 void useImages(List images, boolean andShow)
          Use the images
 void writeImage(File file)
          Create a screen image and write it to the given file
 void writeImage(File file, boolean block)
          Create a screen image and write it to the given file
 void writeImage(File file, boolean block, boolean sync)
          Create a screen image and write it to the given file
 void writeImage(File file, boolean block, float quality)
          Create a screen image and write it to the given file
 void writeImage(String fileName)
          Create a screen image and write it to the given file
 void writeImage(String fileName, boolean block)
          Create a screen image and write it to the given file
 void writeImage(String fileName, boolean block, float quality)
          Create a screen image and write it to the given file
 void writeTestArchive(String archivePath)
          This shows and brings to the front the display window, sleeps for a bit and then makes a screen snapshot and writes it out using the given archive path (which is a directory with a file root)
 
Methods inherited from class ucar.unidata.collab.SharableImpl
applySharableProperties, doShare, doShare, doShareExternal, doShareInternal, getReceiveShareTime, getSharablePropertiesComponent, getShareGroup, getSharing, initSharable, receiveShareData, removeSharable, setReceiveShareTime, setShareGroup, setSharing, setUniqueId, showSharableDialog
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PREF_3DCLIP

public static final String PREF_3DCLIP
Preference for clipping at 3d box_

See Also:
Constant Field Values

PREF_ANIREADOUT

public static final String PREF_ANIREADOUT
Preference for showing the time string in the display

See Also:
Constant Field Values

PREF_BGCOLOR

public static final String PREF_BGCOLOR
For the bg color

See Also:
Constant Field Values

PREF_BORDERCOLOR

public static final String PREF_BORDERCOLOR
For the currently selected panel.

See Also:
Constant Field Values

PREF_CONTOUR_LABELALIGN

public static final String PREF_CONTOUR_LABELALIGN
for the contour label Font

See Also:
Constant Field Values

PREF_CONTOUR_LABELFONT

public static final String PREF_CONTOUR_LABELFONT
for the contour label Font

See Also:
Constant Field Values

PREF_CONTOUR_LABELSIZE

public static final String PREF_CONTOUR_LABELSIZE
for the contour label size

See Also:
Constant Field Values

PREF_DIMENSION

public static final String PREF_DIMENSION
Preference for 3d or 2d _

See Also:
Constant Field Values

PREF_DISPLAYLISTCOLOR

public static final String PREF_DISPLAYLISTCOLOR
For the display list color

See Also:
Constant Field Values

PREF_DISPLAYLISTFONT

public static final String PREF_DISPLAYLISTFONT
For the display list font

See Also:
Constant Field Values

PREF_FGCOLOR

public static final String PREF_FGCOLOR
For the foreground color

See Also:
Constant Field Values

PREF_LOGO

public static final String PREF_LOGO
for the logo

See Also:
Constant Field Values

PREF_LOGO_POSITION_OFFSET

public static final String PREF_LOGO_POSITION_OFFSET
for the logo position

See Also:
Constant Field Values

PREF_LOGO_SCALE

public static final String PREF_LOGO_SCALE
for the logo scale

See Also:
Constant Field Values

PREF_LOGO_VISIBILITY

public static final String PREF_LOGO_VISIBILITY
for the logo visibility

See Also:
Constant Field Values

PREF_PREFIX

public static final String PREF_PREFIX
Prefix used for preference String ids

See Also:
Constant Field Values

PREF_SHAREVIEWS

public static final String PREF_SHAREVIEWS
Preference for sharing view points

See Also:
Constant Field Values

PREF_SHOWANIMATIONBOXES

public static final String PREF_SHOWANIMATIONBOXES
Show the bottom legend

See Also:
Constant Field Values

PREF_SHOWBOTTOMLEGEND

public static final String PREF_SHOWBOTTOMLEGEND
Show the bottom legend

See Also:
Constant Field Values

PREF_SHOWCURSOR

public static final String PREF_SHOWCURSOR
Preference for showing cursor readout

See Also:
Constant Field Values

PREF_SHOWDISPLAYLIST

public static final String PREF_SHOWDISPLAYLIST
Preference for showing cursor readout

See Also:
Constant Field Values

PREF_SHOWSCALES

public static final String PREF_SHOWSCALES
Preference for showing the wireframe box

See Also:
Constant Field Values

PREF_SHOWSIDELEGEND

public static final String PREF_SHOWSIDELEGEND
Show the side legend

See Also:
Constant Field Values

PREF_SHOWTOOLBAR

public static final String PREF_SHOWTOOLBAR
For hiding/showing components of the toolbar

See Also:
Constant Field Values

PREF_SHOWTRANSECTSCALES

public static final String PREF_SHOWTRANSECTSCALES
Preference for showing the wireframe box

See Also:
Constant Field Values

PREF_TOOLBARSFLOATABLE

public static final String PREF_TOOLBARSFLOATABLE
are the toolbars floatable

See Also:
Constant Field Values

PREF_TOPBAR_VISIBLE

public static final String PREF_TOPBAR_VISIBLE
For the visibility of the top compenent

See Also:
Constant Field Values

PREF_WAITMSG

public static final String PREF_WAITMSG
For the visibility of the please wait message

See Also:
Constant Field Values

PREF_WIREFRAME

public static final String PREF_WIREFRAME
Preference for showing the wireframe box

See Also:
Constant Field Values

PROP_COMPONENT_RESIZED

public static final String PROP_COMPONENT_RESIZED
Property id for component resizing

See Also:
Constant Field Values

TAG_COLORPAIR

public static final String TAG_COLORPAIR
Xml tag for the color pair

See Also:
Constant Field Values

TAG_COLORPAIRS

public static final String TAG_COLORPAIRS
Xml tag for the color pairs xml

See Also:
Constant Field Values

borderWidth

public static final int borderWidth
border width

See Also:
Constant Field Values

borderHighlightColor

public static Color borderHighlightColor
border hightlight color


logoPoses

protected static TwoFacedObject[] logoPoses
logo positions


highlightBorder

protected static Border highlightBorder
highlight border


normalBorder

protected static Border normalBorder
normal border


clickToFocus

protected boolean clickToFocus
Do we focus on this one only when the user clicks


lastActive

protected boolean lastActive
Is the the currently active VM


lastTimeActivated

protected long lastTimeActivated
Keeps track of the last time this VM was set as the active VM


toolbars

protected List toolbars
List of Components that are shown in the left side, vertical tool bar


toolbarNames

protected List toolbarNames
List of the names (String), one for each component in the toolbars list We keep this around so the user could have a preference to show or not show toolbar components.


toolbarIds

protected List toolbarIds
List of the ids (String), one for each component in the toolbars list We keep this around so the user could have a preference to show or not show toolbar components.


showControlMenu

protected boolean showControlMenu
Do we show the control menu


showControlLegend

protected boolean showControlLegend
Do we show the control legends


animationHolder

protected JComponent animationHolder
The panel that holds the animation widget


animationMenu

protected JMenu animationMenu
This holds the visibility toggle animation commands.


displayBounds

protected Rectangle displayBounds
The bounds of the display_


fullScreenWindow

protected JFrame fullScreenWindow
The window for full screen


innerContents

protected JComponent innerContents
The inner gui


nameLabel

protected JLabel nameLabel
name label


windowBounds

protected Rectangle windowBounds
We keep the window bounds around for persisting/unpersisting this ViewManager.

Constructor Detail

ViewManager

public ViewManager()
A parameter-less ctor for the XmlEncoder based decoding.


ViewManager

public ViewManager(ViewContext viewContext)
Create this ViewManager

Parameters:
viewContext - As a hack this really better be an IntegratedDataViewer

ViewManager

public ViewManager(ViewContext viewContext,
                   AnimationInfo info)
Instantiate this ViewManager with the given AnimationInfo

Parameters:
viewContext - As a hack this really better be an IntegratedDataViewer
info - The initial animation info

ViewManager

public ViewManager(ViewContext viewContext,
                   ViewDescriptor viewDescriptor,
                   String properties)
Instantiate this ViewManager with the given AnimationInfo

Parameters:
viewContext - As a hack this really better be an IntegratedDataViewer
viewDescriptor - the view descriptor
properties - a list of semi-colon separated properties

ViewManager

public ViewManager(ViewContext viewContext,
                   DisplayMaster master,
                   ViewDescriptor viewDescriptor,
                   String properties)
            throws VisADException,
                   RemoteException
Create this ViewManager

Parameters:
master - The DisplayMaster to use
viewContext - As a hack this really better be an IntegratedDataViewer
viewDescriptor - This describes this ViewManager. Mostly just a name.
properties - semi-colon separated list of name=value properties. We apply these properties to this object using reflection- looking for public set methods with the given name. We use reflection on the argument to the set method to coerce the String value in the properties to the correct type.
Throws:
RemoteException
VisADException

ViewManager

public ViewManager(ViewContext viewContext,
                   ViewDescriptor viewDescriptor,
                   String properties,
                   AnimationInfo info)
Instantiate this ViewManager with the given AnimationInfo

Parameters:
viewContext - As a hack this really better be an IntegratedDataViewer
viewDescriptor - the view descriptor
properties - a list of semi-colon separated properties
info - The initial animation info
Method Detail

init

protected void init()
             throws VisADException,
                    RemoteException
Initialize.

Throws:
RemoteException
VisADException

getAnimationTimes

public DateTime[] getAnimationTimes()
Get the array of animation times

Returns:
times

getTimeDriverTimes

public List<DateTime> getTimeDriverTimes()
                                  throws VisADException,
                                         RemoteException
Get the list of times from the control that is flagged as the time driver

Returns:
list of times from the time driver control or null
Throws:
RemoteException - Java RMI problem
VisADException - VisAD problem

getHaveInitialized

protected boolean getHaveInitialized()
have we initialized

Returns:
Has init been called

getInitDone

protected boolean getInitDone()
Have we finished initializing

Returns:
finished initializing

initFromSkin

public void initFromSkin(Element skinNode)
Initialize from a skin

Parameters:
skinNode - the XML node

doDrop

public void doDrop(Object object)
Handle the drop action

Parameters:
object - object being dropped

initUI

protected void initUI()
Create the ui


setSideLegendPosition

public void setSideLegendPosition(String state)
Set the position state of the side legend

Parameters:
state - float, hidden, etc

insertSideLegend

protected void insertSideLegend()
Place the side legend where it belongs


makeDropPanel

public DropPanel makeDropPanel(JComponent contents,
                               boolean doBorder)
Make a dnd panel

Parameters:
contents - contents to show
doBorder - draw a border
Returns:
the drop panel

okToImportDisplay

public boolean okToImportDisplay(DisplayControl control)
Can this view manager import the given display control. e.g., from a drag-and-drop

Parameters:
control - control
Returns:
can import

setContentsBorder

public void setContentsBorder(Border b)
Set the contents boreder

Parameters:
b - the border

getContentsBorder

protected Border getContentsBorder()
Get the border for the contents

Returns:
the border

showPropertiesDialog

public void showPropertiesDialog()
Show the properties dialog


getPropertiesComponent

public JComponent getPropertiesComponent()
Get the component for setting properties on the display.

Returns:
the component

getMainPropertiesComponent

protected JComponent getMainPropertiesComponent()
Get main properties component

Returns:
the component

findLoc

protected TwoFacedObject findLoc(String loc)
Find the appropriate combobox item from the string

Parameters:
loc - the string location
Returns:
the corresponding TFO

parseLogoPosition

protected String[] parseLogoPosition(String position)
Parse the logo position

Parameters:
position - the string representation
Returns:
the position and offset

makeLogoPosition

protected String makeLogoPosition(String pos,
                                  String offset)
Make a logo position from the position and offset

Parameters:
pos - the position
offset - the offset
Returns:
the logo position string

addPropertiesComponents

protected void addPropertiesComponents(JTabbedPane tabbedPane)
Add a JTabbedPane to the properties component

Parameters:
tabbedPane - the pane to add

aspectSliderChanged

public void aspectSliderChanged(int value)
Handle an aspect slider change.

Parameters:
value - the new value

resetAspectSliders

public void resetAspectSliders()
Reset the aspect sliders.


brighter

public void brighter()
Make the lights brighter


getAspectPropertiesComponent

protected JComponent getAspectPropertiesComponent()
Get the aspect properties component

Returns:
the component

applyProperties

public boolean applyProperties()
Apply properties

Returns:
true if successful

updateAnnotations

protected void updateAnnotations()
Update the annotations


initAfterUnPersistence

public void initAfterUnPersistence(IntegratedDataViewer idv)
                            throws VisADException,
                                   RemoteException
Called after this object has been unpersisted from xml.

Parameters:
idv - the IDV associated with this.
Throws:
RemoteException - Java RMI exception
VisADException - Couldn't create the VisAD display

initWith

public void initWith(ViewState viewState)
              throws Exception
Init with a view state

Parameters:
viewState - the view state
Throws:
Exception - problem initializing

initWith

public final void initWith(ViewManager that)
Initialize this ViewManager with the state in the that ViewManager

Parameters:
that - The other view manager

initWith

public final void initWith(ViewManager that,
                           boolean ignoreWindow)
Initialize this ViewManager with the state in the that ViewManager. This is just a wrapper around initWithInner so we can handle exceptions cohesively.

Parameters:
that - The other view manager
ignoreWindow - If false then we set the window bounds of this ViewManager to the bounds held in that ViewManager.

initWithInner

protected void initWithInner(ViewManager that,
                             boolean ignoreWindow)
                      throws VisADException,
                             RemoteException
Initialize this ViewManager with the state in the that ViewManager.

Parameters:
that - The other view manager
ignoreWindow - If false then we set the window bounds of this ViewManager to the bounds held in that ViewManager.
Throws:
RemoteException - Java RMI exception
VisADException - Couldn't create the VisAD display

guiInitializationDone

public void guiInitializationDone()
This gets called when the initial guis (windows, etc) have been created and shown


setIdv

public void setIdv(IntegratedDataViewer idv)
This is here to set the IDV when this object has been unpersisted.

Parameters:
idv - The IDV

getIdv

public IntegratedDataViewer getIdv()
Get the IDV

Returns:
The IDV

setBooleanProperties

protected void setBooleanProperties(ViewManager vm)
                             throws VisADException,
                                    RemoteException
Set the different boolean flags from thise held by the given view manager.

Parameters:
vm - The ViewManager to get state from
Throws:
RemoteException
VisADException

handleBooleanPropertyChange

protected void handleBooleanPropertyChange(String id,
                                           boolean value)
                                    throws Exception
The BooleanProperty identified byt he given id has changed. Apply the change to the display.

Parameters:
id - Id of the changed BooleanProperty
value - Its new value
Throws:
Exception - problem handeling the change

showTimeline

public void showTimeline()
show the timeline window


animationTimeChanged

protected void animationTimeChanged()
The time changed


getTimelineComponent

public JComponent getTimelineComponent()
make the timeline gui

Returns:
timeline

updateDisplayList

public void updateDisplayList()
Populate the display list


getPerspectiveView

public boolean getPerspectiveView()
Get whether this is in a perspective view or not

Returns:
false, subclasses should override if necessary

getInitialBooleanProperties

protected void getInitialBooleanProperties(List props)
Get the intial BooleanProperties

Parameters:
props - the properties

initBooleanProperties

protected void initBooleanProperties()
Create the set of BooleanPropertys. These hold all of the different flag based display state.


initializeBooleanProperty

protected void initializeBooleanProperty(BooleanProperty bp)
Initialize a BooleanProperty

Parameters:
bp - the property

hasBooleanProperty

protected boolean hasBooleanProperty(String propertyId)
Check to see if this view manager has the property

Parameters:
propertyId - property id
Returns:
true if it has this property

getBooleanProperty

protected BooleanProperty getBooleanProperty(String propertyId)
Find, or create, the BooleanProperty identified with the given id

Parameters:
propertyId - Identifies the BooleanProperty
Returns:
The BooleanProperty

getBooleanProperty

protected BooleanProperty getBooleanProperty(String propertyId,
                                             boolean dflt)
Get a BooleanProperty

Parameters:
propertyId - the property
dflt - the default value
Returns:
the property

setBp

protected void setBp(String propertyId,
                     boolean value)
Helper to set the value of a BooleanProperty

Parameters:
propertyId - Identifies the BooleanProperty
value - The value to set

getBp

protected boolean getBp(String propertyId)
Get the value of the BooleanProperty

Parameters:
propertyId - Identifies the BooleanProperty
Returns:
The value

getBp

protected boolean getBp(String propertyId,
                        boolean dflt)
Get a BooleanProperty (local implementation)

Parameters:
propertyId - the id
dflt - the default value
Returns:
the value

setShareViews

public void setShareViews(boolean value)
Set the share view state flag

Parameters:
value - The value

getShareViews

public boolean getShareViews()
Get the share view state flag

Returns:
The flag value

setShowDisplayList

public void setShowDisplayList(boolean value)
Set the show display list flag

Parameters:
value - The flag value

getShowDisplayList

public boolean getShowDisplayList()
Get the show display list flag

Returns:
The flag value

setWaitMessageVisible

public void setWaitMessageVisible(boolean value)
Set the please wait visible state flag

Parameters:
value - The value

getWaitMessageVisible

public boolean getWaitMessageVisible()
Get the please wait visible state flag

Returns:
The flag value

addBooleanProperty

protected void addBooleanProperty(BooleanProperty bp)
Add in the BooleanProperty into the list of properties.

Parameters:
bp - The new BooleanProperty

setBooleanPropertiesForPersistence

public void setBooleanPropertiesForPersistence(Hashtable value)
Set the BooleanPropertiesForPersistence property.

Parameters:
value - The new value for BooleanPropertiesForPersistence

getBooleanPropertiesForPersistence

public Hashtable getBooleanPropertiesForPersistence()
Get the BooleanPropertiesForPersistence property.

Returns:
The BooleanPropertiesForPersistence

createCBMI

protected JCheckBoxMenuItem createCBMI(JMenu menu,
                                       String id)
A helper to create a check box menu item from the id for a BooleanProperty.

Parameters:
menu - The menu to add the checkbox menu item into
id - Identifies the boolean property that this cbmi controls
Returns:
The new check box menu item

setWireframe

public void setWireframe(boolean value)
Set the show wireframe flag

Parameters:
value - The value

getWireframe

public boolean getWireframe()
Get the show wireframe box flag

Returns:
The flag value

setShowScales

public void setShowScales(boolean value)
Set the show display scale flag

Parameters:
value - The value

getShowScales

public boolean getShowScales()
Get the show display scale flag

Returns:
The flag value

getSideLegendContainer

public JSplitPane getSideLegendContainer()
Deprecated. No longer called sideLegendContainer

Get the component that holds the side legend

Returns:
side legend container

getSideComponent

protected JComponent getSideComponent(JComponent sideLegend)
Get the component that might hold the sideLegend By default this just returns the side legend component. This allows derived classes to add their own stuff to the side.

Parameters:
sideLegend - The side legend
Returns:
The side legend.

setInitialSplitPaneLocation

public void setInitialSplitPaneLocation(double value)
Set the InitialSplitPaneLocation property.

Parameters:
value - The new value for InitialSplitPaneLocation

setLegendState

public void setLegendState(IdvLegend legend,
                           String state)
Set the state of the legend

Parameters:
legend - The legend
state - its state, e.g., hidden, shown, floating

applyPreferences

public void applyPreferences()
Some user preferences have changed.


checkToolBarVisibility

public void checkToolBarVisibility()
Turn on/off the toolbar components based on the user preferences.


setHasWindow

public void setHasWindow(boolean value)
Setter method for xml persistence. Does this ViewManager have a window.

Parameters:
value - Does it have a window

getHasWindow

public boolean getHasWindow()
Getter method for xml persistence. Does this ViewManager have a window.

Returns:
Is the myWindow member non-null.

getReallyHasWindow

public boolean getReallyHasWindow()
This returns the value of the hasWindow member which was set when unpersisting.

Returns:
hasWindow

setWindowBounds

public void setWindowBounds(Rectangle r)
Setter method for xml persistence

Parameters:
r - The bounds of the window

setWindow

public void setWindow(IdvWindow w)
Set the window that this ViewManager is shown in. This adds this object as a WindowListener and sets the bounds of the window if the windowBounds is non-null.

Parameters:
w - The window

getLegends

protected List<IdvLegend> getLegends()
Get the legends

Returns:
List of legends

doClose

protected void doClose()
Called when the window is closed. This method closes any open legends.


showLegend

public void showLegend()
Show (float) all legends


getDisplayWindow

public IdvWindow getDisplayWindow()
We call this getDisplayWindow instead of getWindow so the window is not treated as a persistable property.

Returns:
The window

setSize

public void setSize(Dimension d)
Set the default size of the DisplayMaster held by this view.

Parameters:
d - The default size

getMySize

public Dimension getMySize()
Get the default size of the DisplayMaster held by this view.

Returns:
The default size

initPreferences

public void initPreferences(IdvPreferenceManager preferenceManager)
A hook so derived classes can add in their own preference widgets.

Parameters:
preferenceManager - The preference manager

getStore

public XmlObjectStore getStore()
Wrapper around IdvBase.getStore()

Returns:
The XmlObjectStore to use for preferences.

getProjectionList

public List getProjectionList()
Get the list of Projections available.

Returns:
The list of projections

getResourceManager

public IdvResourceManager getResourceManager()
Get the IdvResourceManager to use.

Returns:
The resource manager from the IDV.

getStateManager

public StateManager getStateManager()
Get the StateManager to use.

Returns:
The state manager from the IDV.

getPublishManager

public PublishManager getPublishManager()
Get the PublishManager to use.

Returns:
The publish manager from the IDV.

getIdvUIManager

public IdvUIManager getIdvUIManager()
Get the IdvUIManager to use.

Returns:
The UI manager from the IDV.

getVMManager

public VMManager getVMManager()
Get the VMManager to use.

Returns:
The view manager manager from the IDV.

parseProperties

public void parseProperties(String properties)
Parse and apply the properties in the semi-colon delimited list of name=value pairs.

Parameters:
properties - The list of properties

setProperty

public boolean setProperty(String name,
                           String value,
                           boolean ignoreError)
Apply the given named property. This uses (Object, String, String) to set the property on this object via reflection.

Parameters:
name - Name of property
value - Its value
ignoreError - true to ignore error
Returns:
true if successful

getIsActive

public boolean getIsActive()
Is the DisplayMaster currently active.

Returns:
Is display master active

setMasterInactive

public void setMasterInactive()
Set the DisplayMaster inactive.


setMasterActive

public void setMasterActive()
Set the DisplayMaster active if there are no more outstanind mast active calls.


setMasterActive

public void setMasterActive(boolean force)
Set the DisplayMaster active if there are no more outstanind mast active calls.

Parameters:
force - if true, force it active

getSideDividerLocation

public int getSideDividerLocation()
Get the location of the side legend or -1 if there is no side legend

Returns:
Side legend location

setSideDividerLocation

public void setSideDividerLocation(int l)
Set the location of the side legend. This really just saves it as an attribute which is used later.

Parameters:
l - Side legend location

addCommand

protected void addCommand(Command cmd)
Add the command to the command manager. Use this for undo/redo commands.

Parameters:
cmd - The command

keyWasTyped

public void keyWasTyped(KeyEvent keyEvent)
Process sthe key event

Parameters:
keyEvent - The key event

setAnimatedVisibility

public void setAnimatedVisibility(boolean state)
Turn on/off the display control visibility toggling animation

Parameters:
state - Turn on or off.

turnOnOffAllDisplays

public void turnOnOffAllDisplays(boolean on)
This turns off the visiblity toggle animation and sets the visibility of all unlocked display controls to the given value.

Parameters:
on - Visiblity on or off

notifyDisplayControls

protected void notifyDisplayControls(String property)
Tell the display controls that the projection has changed.

Parameters:
property - Identifes the change type.

addToolBar

protected void addToolBar(Component component,
                          String id,
                          String name)
Add the given component into the list of toolbar components. The id and name are used for the user preferences for shoing/not showing toolbar components.

Parameters:
component - The GUI component
id - Its id
name - Its name

initToolBars

protected void initToolBars()
A hook so derived classes can add in their toolbar components


getShowBottomLegend

public boolean getShowBottomLegend()
Should we show the bottom legend that holds the list of display controls.

Returns:
Should show bottom legend

getShowSideLegend

public boolean getShowSideLegend()
Should we show the side legend that holds the list of display controls.

Returns:
Should show side legend

getShowAnimationBoxes

public boolean getShowAnimationBoxes()
Should we show the animation widget boxes

Returns:
Should show anime boxes

setShowControlLegend

public void setShowControlLegend(boolean b)
Set whether we should show any of the display control legends

Parameters:
b - Should show legend

getShowControlLegend

public boolean getShowControlLegend()
Get whether we should show any of the display control legends.

Returns:
b Should show legend

setLegendState

public void setLegendState(String value)
Set the LegendState property.

Parameters:
value - The new value for LegendState

getLegendState

public String getLegendState()
Get the LegendState property.

Returns:
The LegendState

doMakeMenuBar

protected JMenuBar doMakeMenuBar()
Create and return the menu bar.

Returns:
The menu bar

doMakeMenuList

public ArrayList doMakeMenuList()
Return a list of components that are used to create the menubar. The default here is to just return an empty list.

Returns:
List of menu bar components

getControls

public List getControls()
Return the list of DisplayControls displayed in this ViewManager.

Returns:
List of display controls

displayDataChanged

public void displayDataChanged(DisplayControl displayControl)
Handle the display data changing

Parameters:
displayControl - the control

animationDriverChanged

public void animationDriverChanged()
Handle the time set from the animation widget changing


getControlsForLegend

public List getControlsForLegend()
Return the list of DisplayControls displayed in this ViewManager that are meant to be shown in a legend

Returns:
List of display controls for the legend

setColors

public void setColors(Color foreground,
                      Color background)
Set the foreground and background colors in the display. This method just sets the color members and passes them through to the legends. Derived classes do the work of setting the colors in their displays.

Parameters:
foreground - The foreground color
background - The background color

displayControlChanged

public void displayControlChanged(DisplayControl displayControl)
Called when the dispay category or other state of the display control has changed. Triggers a redisplay of the legends.

Parameters:
displayControl - The display control that changed

displayControlVisibilityChanged

public void displayControlVisibilityChanged(DisplayControl displayControl)
handle when the display control has changed

Parameters:
displayControl - display control

fillLegends

protected void fillLegends()
This is called when the list of display controls has changed. (e.g., a new one has been added, etc.). It tells the list of legends to fill themselves and updates the display menu.


reallyFillLegends

protected void reallyFillLegends()
tell the legends to fill themselves


fillLegendsLater

public void fillLegendsLater()
Wait until there have been no calls to fillLegends for a little bit and then fill the legends


fillLegendsInner

protected void fillLegendsInner()
actually fill the legends and update the display list


initDisplayMenu

public void initDisplayMenu(JMenu displayMenu)
This is called when the list of display controls has changed to update the display menu.

Parameters:
displayMenu - The menu to fill

addDisplayListener

public void addDisplayListener(DisplayListener listener)
Adds the given display listener to the DisplayMaster

Parameters:
listener - The listener to add

getDisplayConventions

public DisplayConventions getDisplayConventions()
A wrapper around IdvBase.getDisplayConventions()

Returns:
The DisplayConventions to use.

removeDisplayInfo

public void removeDisplayInfo(DisplayInfo displayInfo)
                       throws RemoteException,
                              VisADException
This removes the given DisplayInfo. The DisplayInfo is what really holds the DisplayControl.

Parameters:
displayInfo - The display info to remove
Throws:
RemoteException
VisADException

getUseFastRendering

public boolean getUseFastRendering(boolean b)
This is called by display controls and allows us to force fast rendering

Parameters:
b - The displays fast rendering flag
Returns:
true

addDisplayInfos

public void addDisplayInfos(List<DisplayInfo> displayInfos)
                     throws RemoteException,
                            VisADException
Add the display infos

Parameters:
displayInfos - the display infos
Throws:
RemoteException - Java RMI Exception
VisADException - VisAD Exception

addDisplayInfo

public boolean addDisplayInfo(DisplayInfo displayInfo)
                       throws RemoteException,
                              VisADException
Add the DisplayInfo to the list of DisplayInfo-s If I have a DisplayMaster then set the master to be inactive and add the displayable held by the displayInfo into the displayMaster. This returns true if the add was successful, false otherwise.

Parameters:
displayInfo - The display info to add.
Returns:
Was the addition successful
Throws:
RemoteException
VisADException

updateDisplayIfNeeded

public void updateDisplayIfNeeded()
                           throws VisADException,
                                  RemoteException
Update display if needed

Throws:
RemoteException
VisADException

toFront

public void toFront()
Bring the window that contains this ViewManager to the front


clearDisplays

public void clearDisplays()
This removes all of the display controls


controlMoved

public void controlMoved(DisplayControl control)
This gets called when a display control has been moved to this viewmanager

Parameters:
control - The display control that has been moved

makeShowMenu

protected JMenu makeShowMenu()
Create and return the show menu.

Returns:
The Show menu

makeViewMenu

public JMenu makeViewMenu()
Create and return the view menu.

Returns:
The View menu

addContextMenuItems

public void addContextMenuItems(List menuItems)
Add items to the context menu. This is the one we popup on a right-click in the controls tab.

Parameters:
menuItems - List to add to

firstInitializeViewMenu

public void firstInitializeViewMenu(JMenu viewMenu)
Initialize the view menu. This gets called first and allows us to translate the component tree

Parameters:
viewMenu - the view menu

initializeViewMenu

public void initializeViewMenu(JMenu viewMenu)
Dynamically initialize the view menu

Parameters:
viewMenu - The menu

makeSavedViewsMenu

protected JMenu makeSavedViewsMenu()
Make the saved views menu

Returns:
saved views menu

initViewStateMenu

public void initViewStateMenu(JMenu viewStateMenu)
Initialize the View State menu

Parameters:
viewStateMenu - the menu to init

isCompatibleWith

public boolean isCompatibleWith(ViewManager vm)
Is this compatible with the other ViewManager

Parameters:
vm - the other VM
Returns:
true if compatible

isCompatibleWith

public boolean isCompatibleWith(ViewState viewState)
Is this ViewState appropriate for me?

Parameters:
viewState - the ViewState
Returns:
true if compatible

makeViewStateMenu

protected void makeViewStateMenu(JMenu viewStateMenu)
Make the view state menu

Parameters:
viewStateMenu - The menu to fill in

getAnimationWidget

public AnimationWidget getAnimationWidget()
Return the AnimationWidget that is used. May be null.

Returns:
The animation widget.

setExternalAnimation

public void setExternalAnimation(Animation value,
                                 AnimationWidget widget)
Set the ExternalAnimation property.

Parameters:
value - The new value for ExternalAnimation
widget - the animation widget to update

getExternalAnimation

public Animation getExternalAnimation()
Get the ExternalAnimation property.

Returns:
The ExternalAnimation

getExternalAnimationWidget

public AnimationWidget getExternalAnimationWidget()
Get the ExternalAnimationWidget property.

Returns:
The ExternalAnimationWidget

getAnimation

public Animation getAnimation()
Return the Animation that is used. May be null. This is the Displayable that is added into the DisplayMaster to control time animation.

Returns:
The animation.

animationOk

public boolean animationOk()
Should this ViewManager create an animation object/widget. The default is true.

Returns:
Is animation ok

setAnimationInfo

public void setAnimationInfo(AnimationInfo value)
Set the AnimationInfo property. This holds the state of the animation (e.g, rocking, rate, etc.)

Parameters:
value - The new value for AnimationInfo

getAnimationInfo

public AnimationInfo getAnimationInfo()
Get the AnimationInfo property.

Returns:
The AnimationInfo

getIsDestroyed

public boolean getIsDestroyed()
Has this ViewManager been destroyed. A destroyed ViewManager is one whose window has been closed. We have this around so the ViewManager does no more operations.

Returns:
Is destroyed

addRemovable

public void addRemovable(Removable removable)
Add a removeable object

Parameters:
removable - the removeable

destroy

public void destroy()
Destroy this view manager. Turn off all pending wait cursor calls, tell the display master and the animation widget to destory themselves, null out references to other objects (so we don't get dangling reference/memory leaks).


getDisplayInfos

protected List<DisplayInfo> getDisplayInfos()
Get a copy of the list of DisplayInfo-s

Returns:
A copy of the the display infos

toString

public String toString()
Return the string representation of this object

Overrides:
toString in class Object
Returns:
The String representation

getTypeName

public String getTypeName()
What type of view is this

Returns:
The type of view

getViewDescriptor

public ViewDescriptor getViewDescriptor()
Get the ViewDescriptor. The ViewDescriptor is what describes this ViewManager. For now it just has a name. We have this here for xml persistence.

Returns:
The ViewDescriptor

setViewDescriptor

public void setViewDescriptor(ViewDescriptor vd)
Deprecated. Use addViewDescriptor

Set the ViewDescriptor. We have this here for xml persistence.

Parameters:
vd - The new ViewDescriptor.

addViewDescriptor

public void addViewDescriptor(ViewDescriptor vd)
Add the view descriptor

Parameters:
vd - the view descriptor

isDefinedBy

public boolean isDefinedBy(ViewDescriptor vd)
Does this view manager have the given view descriptor

Parameters:
vd - the view descriptor
Returns:
defined by the view descriptor

canBe

public boolean canBe(ViewManager that)
Can this view manager be used in exchange for the given view manager

Parameters:
that - The other view manager to check
Returns:
Can this be used in place of that

isClassOk

public boolean isClassOk(ViewDescriptor vd)
If the given view descriptor has one or more class names is the class name of this ViewManager in the list

Parameters:
vd - view descriptor
Returns:
class ok

getViewManager

public ViewManager getViewManager()
Get the view manager

Returns:
this

getUniqueId

public String getUniqueId()
Override the base class method to return a (hopefully) unique id.

Specified by:
getUniqueId in interface Sharable
Overrides:
getUniqueId in class SharableImpl
Returns:
The String that uniquely identified this object.

getComponent

public JComponent getComponent()
Return the GUI component from the DisplayMaster

Returns:
The component from the display master.

getContents

public Container getContents()
Return the full GUI contents.

Returns:
The GUI contents.

getInnerContents

public JComponent getInnerContents()
This is meant to be overrode by a derived class to return the contents (typically the display master's component) that is the "abbreviated" gui. It is used by the MultiPaneIdv.

Returns:
The inner contents. This method just returns null.

doMakeContents

protected Container doMakeContents()
Create the main GUI contents.

Returns:
The GUI contents

setCursorInDisplay

public void setCursorInDisplay(Cursor c)
Set the cursor in the component of the main display

Parameters:
c - The cursor

hasDisplayMaster

public boolean hasDisplayMaster()
See if this has a display master

Returns:
true if the DisplayMaster is not null

getMaster

public DisplayMaster getMaster()
Get the DisplayMaster.

Returns:
The display master

shouldDoThingsRightAway

public boolean shouldDoThingsRightAway()
A hack for when we are running isl and don't want to update the display incrementally This just returns true for now but is a hook for later

Returns:
true

isInteractive

public boolean isInteractive()
Is this an interactive session

Returns:
true if interactive

doMakeDisplayMaster

protected DisplayMaster doMakeDisplayMaster()
                                     throws VisADException,
                                            RemoteException
Make the DisplayMaster for this ViewManger. Subclasses should override.

Returns:
the appropriate display
Throws:
RemoteException - Java RMI problem
VisADException - VisAD problem

getDisplayRenderer

public DisplayRenderer getDisplayRenderer()
get the display renderer

Returns:
display renderer

setDisplayMaster

protected void setDisplayMaster(DisplayMaster master)
Set the DisplayMaster

Parameters:
master - The display master

resetProjectionControl

protected void resetProjectionControl()
Reset the projection control


getProjectionControl

public ProjectionControl getProjectionControl()
Get the projection control

Returns:
The projection control

getCommandManager

public CommandManager getCommandManager()
Create, if needed, and return the command manager

Returns:
The command manager

controlChanged

public final void controlChanged(ControlEvent e)
This is the default method (no-op) for the ControlListener interface

Specified by:
controlChanged in interface ControlListener
Parameters:
e - The ControlEvent

handleControlChanged

protected void handleControlChanged(ControlEvent e)
Handle a control changed. A no-op here.

Parameters:
e - the event.

displayChanged

public void displayChanged(DisplayEvent de)
                    throws VisADException,
                           RemoteException
An implementation of the the DisplayListener interface. This method turns on/off the wait cursor when it gets a WAIT_ON or WAIT_OFF event. It also, when it receives a FRAME_DONE event for the first time, calls firstFrameDone on the DisplayControls

Specified by:
displayChanged in interface DisplayListener
Parameters:
de - The DisplayEvent
Throws:
RemoteException
VisADException

getLastFrameDoneTime

public long getLastFrameDoneTime()
Get the last time we've seen a FRAME_DONE event

Returns:
tiem of last frame done event

doneFirstFrame

protected void doneFirstFrame()
We have received the very first framedone event. Tell the controls


itemStateChanged

public void itemStateChanged(ItemEvent e)
Responds to ItemEvents handled by an ItemListener; in this class, from JCheckBoxes. This method needed to instantiate the 3d viewContext as an ItemListener.

Specified by:
itemStateChanged in interface ItemListener
Parameters:
e - ItemEvent whose state has changed.

actionPerformed

public void actionPerformed(ActionEvent event)
Required interface for ActionEvents, to implement ActionListener for the UI objects such as JButton-s and MenuItem-s

Specified by:
actionPerformed in interface ActionListener
Parameters:
event - an ActionEvent

makeFrames

public void makeFrames()
Make frames


useDisplay

public boolean useDisplay()
Do we use the display

Returns:
true if we do

useImages

public void useImages()
Use the images


useImages

public void useImages(List images,
                      boolean andShow)
Use the images

Parameters:
images - list of images
andShow - true to show

startImageCapture

public void startImageCapture()
Start the image capture if we are not currently doing that. Creates the ImageSequenceGrabber.


clearImageGrabber

public void clearImageGrabber(ImageSequenceGrabber grabber)
The given grabber is done. Null out the isg member if it == the given grabber.

Parameters:
grabber - The ImageSequenceGrabber to clear

writeTestArchive

public void writeTestArchive(String archivePath)
This shows and brings to the front the display window, sleeps for a bit and then makes a screen snapshot and writes it out using the given archive path (which is a directory with a file root)

Parameters:
archivePath - The path to write to

showWindow

public void showWindow()
show the window I am in


writeImage

public void writeImage(String fileName)
Create a screen image and write it to the given file

Parameters:
fileName - File to write image to

writeImage

public void writeImage(String fileName,
                       boolean block)
Create a screen image and write it to the given file

Parameters:
fileName - File to write image to
block - If true then do the write in this thread

writeImage

public void writeImage(String fileName,
                       boolean block,
                       float quality)
Create a screen image and write it to the given file

Parameters:
fileName - File to write image to
block - If true then do the write in this thread
quality - jpeg quality

writeImage

public void writeImage(File file)
Create a screen image and write it to the given file

Parameters:
file - File to write image to

writeImage

public void writeImage(File file,
                       boolean block)
Create a screen image and write it to the given file

Parameters:
file - File to write image to
block - If true then do the write in this thread

writeImage

public void writeImage(File file,
                       boolean block,
                       boolean sync)
Create a screen image and write it to the given file

Parameters:
file - File to write image to
block - If true then do the write in this thread
sync - Synchronize before capturing

writeImage

public void writeImage(File file,
                       boolean block,
                       float quality)
Create a screen image and write it to the given file

Parameters:
file - File to write image to
block - If true then do the write in this thread
quality - jpeg quality

doSaveState

public void doSaveState()
Save this state of this view manager. This simply passes through to VMManager.saveViewManagerState(ViewManager)


doSaveImage

public void doSaveImage()
User has requested saving display as an image. Prompt for a filename and save the image to it.


doPrintImage

public void doPrintImage()
Print an image


setView

public void setView(String view)
Set the view

Parameters:
view - the view description

doSaveImageInThread

public void doSaveImageInThread()
User has requested saving display as an image. Prompt for a filename and save the image to it.


getVisibleGeoBounds

public GeoLocationInfo getVisibleGeoBounds()
Does this viewmanager have any bounds that are visible. This is overwritten by the MapViewManager

Returns:
bounds

isVectorGraphicsFile

public static boolean isVectorGraphicsFile(String filename)
Check to see if the file is a vector graphics file

Parameters:
filename - name of the file
Returns:
true if it has the right extension

doSaveImage

public void doSaveImage(boolean andSaveBundle)
Save the image (and the bundle that does with it);

Parameters:
andSaveBundle - true to save the bundle also

checkForKmlImageCapture

protected boolean checkForKmlImageCapture()
Check if its ok to capture a kmz file

Returns:
ok to capture kmz

paintDisplayList

public int paintDisplayList(Graphics2D graphics,
                            List<DisplayControl> displayControls,
                            int width,
                            int height,
                            boolean bottom,
                            Color color,
                            Font font)
                     throws VisADException,
                            RemoteException
Paint the display list in a 2D graphics

Parameters:
graphics - the graphics to paint on
displayControls - the list of controls
width - width
height - height
bottom - bottom position
color - label color
font - label font
Returns:
the height of the top label
Throws:
RemoteException - Java RMI problem
VisADException - problem with VisAD data

doPublishImage

public void doPublishImage()
Hook into the publishing interface to "publish" the screen image.


doPublishImage

public void doPublishImage(String props)
Hook into the publishing interface to "publish" the screen image.

Parameters:
props - Properties to pass through to the publish manager.

logException

public void logException(String msg,
                         Throwable exc)
Helper to log errors

Parameters:
msg - The error message
exc - The exception

makeColorMenu

public JMenu makeColorMenu()
make the color set menu

Returns:
color menu

initColorMenu

public void initColorMenu(JMenu colorMenu)
Dynamically add the menu items into the color menu

Parameters:
colorMenu - The Color menu to initialize

removeColorPair

public void removeColorPair(String name)
Remove the named color pair from the users xml

Parameters:
name - The name of the color pair to remove

showColorPairDialog

public void showColorPairDialog()
Show the dialog that allows the user to change the foreground/background colors


getForeground

public Color getForeground()
Get the foreground color or white if it is null

Returns:
The foreground color

getDefaultForeground

protected Color getDefaultForeground()
Get the default foreground color

Returns:
the color

getDefaultBackground

protected Color getDefaultBackground()
Get the default background color

Returns:
the color

setForeground

public void setForeground(Color c)
Set the foreground color

Parameters:
c - The new foreground color

getBackground

public Color getBackground()
Get the background color or black if it is null

Returns:
The background color

setBackground

public void setBackground(Color c)
Set the background color

Parameters:
c - The new background color

setSideLegend

public void setSideLegend(SideLegend value)
Set the SideLegend property.

Parameters:
value - The new value for SideLegend

getSideLegend

public SideLegend getSideLegend()
Get the SideLegend property.

Returns:
The SideLegend

getToolbarsFloatable

public boolean getToolbarsFloatable()
are the toolbars floatable

Returns:
toolbars floatable

setShowToolBars

public void setShowToolBars(boolean v)
Turn on/off the showing of the toolbars

Parameters:
v - Should show

setLastActive

public void setLastActive(boolean b)
Set whether this view manager is the last one active. That is, is the considered to be the current default view manager that display controls add themselves into.

Parameters:
b - Is active

getNormalBorder

public static Border getNormalBorder()
Get the normal border

Returns:
normal border

getHighlightBorder

public static Border getHighlightBorder()
Get the border to use when this ViewManager is the currently selected ViewManager

Returns:
highlight border

setHighlightBorder

public static void setHighlightBorder(Color c)
Sets the color used to denote the currently selected panel.

Parameters:
c - The new color for the currently selected panel's border.

showHighlight

public boolean showHighlight()
Should we show the highlight border

Returns:
should show the highlight border

getLastTimeActivated

public long getLastTimeActivated()
Get the time that this was last the active VM

Returns:
The time of last activation

setDisplayBounds

public void setDisplayBounds(Rectangle value)
Set the DisplayBounds property.

Parameters:
value - The new value for DisplayBounds

getDisplayBounds

public Rectangle getDisplayBounds()
Get the DisplayBounds property.

Returns:
The DisplayBounds

isFullScreen

protected boolean isFullScreen()
Are we in full screen mode.

Returns:
full screen mode.

toggleFullScreen

public void toggleFullScreen()
Toggle full screen


resetFullScreen

public void resetFullScreen()
Go back to normal screen


setFullScreen

public void setFullScreen()
Go to full screen mode


setClickToFocus

public void setClickToFocus(boolean value)
Set the click to focus property. When true this VM only gets focus on a mouse click

Parameters:
value - The value

getClickToFocus

public boolean getClickToFocus()
Get the click to focus property. When true this VM only gets focus on a mouse click

Returns:
The click to focus property

setAliases

public void setAliases(List value)
Set the Aliases property.

Parameters:
value - The new value for Aliases

getAliases

public List getAliases()
Get the Aliases property.

Returns:
The Aliases

setDisplayMatrix

public void setDisplayMatrix(double[] newMatrix)
                      throws VisADException,
                             RemoteException
Set the display matrix array

Parameters:
newMatrix - display matrix
Throws:
VisADException - problem in VisAD display
RemoteException - problem in remote VisAD display

getDisplayMatrix

public double[] getDisplayMatrix()
Get the display matrix array

Returns:
display matrix

setAnimationStringVisible

public void setAnimationStringVisible(boolean visible)
Deprecated. Use setAniReadout now

Toggle the animation string visibility.

Parameters:
visible - true to make it visible

getAnimationStringVisible

public boolean getAnimationStringVisible()
Deprecated. Use getAniReadout now

Get the animation string visibility.

Returns:
visible true to make it visible

setTopBarVisible

public void setTopBarVisible(boolean visible)
Toggle the top component visibility.

Parameters:
visible - true to make it visible

getTopBarVisible

public boolean getTopBarVisible()
Get the top component visibility.

Returns:
visible true to make it visible

setAniReadout

public void setAniReadout(boolean value)
Set the show animation readout flag

Parameters:
value - The value

getAniReadout

public boolean getAniReadout()
Get the animation readout flag

Returns:
The flag value

setName

public void setName(String value)
Set the Name property.

Parameters:
value - The new value for Name

updateNameLabel

protected void updateNameLabel()
Update the name label


getName

public String getName()
Get the Name property.

Returns:
The Name

setAspectRatio

public void setAspectRatio(double[] value)
Set the AspectRatio property.

Parameters:
value - The new value for AspectRatio

printAspect

public void printAspect(String msg)
Print the aspect

Parameters:
msg - a prefix

getAspectRatio

public double[] getAspectRatio()
Get the AspectRatio property.

Returns:
The AspectRatio

setSkinProperties

public void setSkinProperties(Hashtable value)
Set the SkinProperties property.

Parameters:
value - The new value for SkinProperties

getSkinProperties

public Hashtable getSkinProperties()
Get the SkinProperties property.

Returns:
The SkinProperties

getSkinProperty

public String getSkinProperty(String name)
Get the named property for the skin

Parameters:
name - the name of the property
Returns:
the value

setLegendOnLeft

public void setLegendOnLeft(boolean value)
Set the LegendOnLeft property.

Parameters:
value - The new value for LegendOnLeft

getLegendOnLeft

public boolean getLegendOnLeft()
Get the LegendOnLeft property.

Returns:
The LegendOnLeft

setIsShared

public void setIsShared(boolean value)
Set the IsShared property.

Parameters:
value - The new value for IsShared

getIsShared

public boolean getIsShared()
Get the IsShared property.

Returns:
The IsShared

setDisplayListFont

public void setDisplayListFont(Font value)
Set the display list font property.

Parameters:
value - The new value for displayListFont

getDisplayListFont

public Font getDisplayListFont()
Get the display list font property.

Returns:
The value for displayListFont

setDisplayListColor

public void setDisplayListColor(Color value)
Set the display list color property.

Parameters:
value - The new value for displayListColor

getDisplayListColor

public Color getDisplayListColor()
Get the display list color property.

Returns:
The value for displayListColor

setFullScreenWidth

public void setFullScreenWidth(int value)
Set the FullScreenWidth property.

Parameters:
value - The new value for FullScreenWidth

getFullScreenWidth

public int getFullScreenWidth()
Get the FullScreenWidth property.

Returns:
The FullScreenWidth

setFullScreenHeight

public void setFullScreenHeight(int value)
Set the FullScreenHeight property.

Parameters:
value - The new value for FullScreenHeight

getFullScreenHeight

public int getFullScreenHeight()
Get the FullScreenHeight property.

Returns:
The FullScreenHeight

setProperties

public void setProperties(Hashtable value)
Set the Properties property.

Parameters:
value - The new value for Properties

getProperties

public Hashtable getProperties()
Get the Properties property.

Returns:
The Properties

getProperty

public Object getProperty(Object key)
get a property.

Parameters:
key - key
Returns:
property

putProperty

public void putProperty(Object key,
                        Object value)
Set a property. Anything placed here is persisted off with the ViewManager

Parameters:
key - key
value - value

getDisplayCoordinateSystem

public CoordinateSystem getDisplayCoordinateSystem()
Get the display side coordinate system, subclasses should implement if there is one.

Returns:
CoordinateSystem or null

setLights

public void setLights(List<ucar.unidata.java3d.LightInfo> value)
Set the Lights property.

Parameters:
value - The new value for Lights

getLights

public List<ucar.unidata.java3d.LightInfo> getLights()
Get the Lights property.

Returns:
The Lights

setSplitPaneLocation

public void setSplitPaneLocation(int value)
Set the SplitPaneLocation property.

Parameters:
value - The new value for SplitPaneLocation

getSplitPaneLocation

public int getSplitPaneLocation()
Get the SplitPaneLocation property.

Returns:
The SplitPaneLocation

initViewState

public void initViewState(ViewState viewState)
Initialize the ViewState

Parameters:
viewState - the view state

doMakeViewState

public ViewState doMakeViewState()
Make a ViewState

Returns:
the ViewState

setInitViewStateName

public void setInitViewStateName(String s)
Set the initial ViewState name

Parameters:
s - the name

getInitViewStateName

public String getInitViewStateName()
Get the intial ViewState name

Returns:
the intial ViewState name

getLogoFile

protected String getLogoFile()
Get the logo

Returns:
the logo file or URL

setLogoFile

public void setLogoFile(String logo)
Set the logo file or URL

Parameters:
logo - the logo file or URL

getLogoPosition

public String getLogoPosition()
Get the logo position on the screen

Returns:
the logo position on the screen

setLogoPosition

public void setLogoPosition(String logop)
Set the logo position on the screen

Parameters:
logop - the logo position on the screen

getLogoScale

public float getLogoScale()
Get the logo scale

Returns:
the logo scale

setLogoScale

public void setLogoScale(float scale)
Set the logo scale

Parameters:
scale - the new scale

setLogoVisibility

public void setLogoVisibility(boolean on)
Set the logo visibility

Parameters:
on - true to show

getLogoVisibility

public boolean getLogoVisibility()
Get the logo visibility

Returns:
the logo visibility

ensureOnlyOneTimeDriver

public void ensureOnlyOneTimeDriver(DisplayControl displayControl)
Ensure that there is only one time driver for this view THERE CAN BE ONLY ONE! - Highlander

Parameters:
displayControl - the time driver control