Package ucar.unidata.idv
Class ViewManager
java.lang.Object
ucar.unidata.collab.SharableImpl
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
Nested ClassesModifier and TypeClassDescriptionstatic classClass MatrixCommand manages changes to the viewpoint matrix -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected JComponentThe panel that holds the animation widgetprotected JMenuThis holds the visibility toggle animation commands.static Colorborder hightlight colorstatic final intborder widthprotected booleanDo we focus on this one only when the user clicksprotected RectangleThe bounds of the display_protected JFrameThe window for full screenprotected static Borderhighlight borderprotected JComponentThe inner guiprotected booleanIs the the currently active VMprotected longKeeps track of the last time this VM was set as the active VMprotected longflag for animation updateprotected static TwoFacedObject[]logo positionsprotected JLabelname labelprotected static Bordernormal borderstatic final StringPreference for clipping at 3d box_static final StringPreference for showing the time string in the displaystatic final StringFor the bg colorstatic final StringFor the currently selected panel.static final Stringfor the contour label Fontstatic final Stringfor the contour label Fontstatic final Stringfor the contour label sizestatic final StringPreference for 3d or 2d _static final StringFor the display list colorstatic final StringFor the display list fontstatic final StringFor the foreground colorstatic final Stringfor the logostatic final Stringfor the logo positionstatic final Stringfor the logo scalestatic final Stringfor the logo visibilitystatic final StringPrefix used for preference String idsstatic final StringPreference for sharing view pointsstatic final StringShow the bottom legendstatic final StringShow the bottom legendstatic final StringPreference for showing cursor readoutstatic final StringPreference for showing cursor readoutstatic final StringPreference for showing the wireframe boxstatic final StringShow the side legendstatic final StringFor hiding/showing components of the toolbarstatic final StringPreference for showing the wireframe boxstatic final Stringare the toolbars floatablestatic final StringFor the visibility of the top compenentstatic final StringFor the visibility of the please wait messagestatic final StringPreference for showing the wireframe boxstatic final StringProperty id for component resizingprotected booleanDo we show the control legendsprotected booleanDo we show the control menustatic final StringXml tag for the color pairstatic final StringXml tag for the color pairs xmlprotected ListList 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 ListList 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 ListList of Components that are shown in the left side, vertical tool barprotected RectangleWe keep the window bounds around for persisting/unpersisting this ViewManager. -
Constructor Summary
ConstructorsConstructorDescriptionA parameter-less ctor for the XmlEncoder based decoding.ViewManager(ViewContext viewContext) Create this ViewManagerViewManager(ViewContext viewContext, ViewDescriptor viewDescriptor, String properties) Instantiate this ViewManager with the given AnimationInfoViewManager(ViewContext viewContext, ViewDescriptor viewDescriptor, String properties, AnimationInfo info) Instantiate this ViewManager with the given AnimationInfo.ViewManager(ViewContext viewContext, AnimationInfo info) Instantiate this ViewManager with the given AnimationInfoViewManager(ViewContext viewContext, DisplayMaster master, ViewDescriptor viewDescriptor, String properties) Create this ViewManager. -
Method Summary
Modifier and TypeMethodDescriptionvoidactionPerformed(ActionEvent event) Required interface for ActionEvents, to implement ActionListener for the UI objects such as JButton-s and MenuItem-sprotected voidAdd in the BooleanProperty into the list of properties.protected voidaddCommand(Command cmd) Add the command to the command manager.voidaddContextMenuItems(List menuItems) Add items to the context menu.booleanaddDisplayInfo(DisplayInfo displayInfo) Add the DisplayInfo to the list of DisplayInfo-s If I have aDisplayMasterthen set the master to be inactive and add the displayable held by the displayInfo into the displayMaster.voidaddDisplayInfos(List<DisplayInfo> displayInfos) Add the display infosvoidaddDisplayListener(DisplayListener listener) Adds the given display listener to theDisplayMasterprotected voidaddPropertiesComponents(JTabbedPane tabbedPane) Add a JTabbedPane to the properties componentvoidaddRemovable(Removable removable) Add a removeable objectprotected voidaddToolBar(Component component, String id, String name) Add the given component into the list of toolbar components.voidAdd the view descriptorvoidHandle the time set from the animation widget changingbooleanShould this ViewManager create an animation object/widget.protected voidThe time changedvoidSome user preferences have changed.booleanApply propertiesvoidaspectSliderChanged(int value) Handle an aspect slider change.voidbrighter()Make the lights brighterbooleancanBe(ViewManager that) Can this view manager be used in exchange for the given view managercaptureIslImage(Element scriptingNode) Capture the image for for ISL.protected booleanCheck if its ok to capture a kmz filevoidTurn on/off the toolbar components based on the user preferences.voidThis removes all of the display controlsvoidclearImageGrabber(ImageSequenceGrabber grabber) The given grabber is done.final voidThis is the default method (no-op) for the ControlListener interfacevoidcontrolMoved(DisplayControl control) This gets called when a display control has been moved to this viewmanagerprotected JCheckBoxMenuItemcreateCBMI(JMenu menu, String id) A helper to create a check box menu item from the id for a BooleanProperty.voiddestroy()Destroy this view manager.voidAn implementation of the the DisplayListener interface.voiddisplayControlChanged(DisplayControl displayControl) Called when the dispay category or other state of the display control has changed.voiddisplayControlVisibilityChanged(DisplayControl displayControl) handle when the display control has changedvoiddisplayDataChanged(DisplayControl displayControl) Handle the display data changingprotected voiddoClose()Called when the window is closed.voidHandle the drop actionprotected ContainerCreate the main GUI contents.protected DisplayMasterMake the DisplayMaster for this ViewManger.protected JMenuBarCreate and return the menu bar.Return a list of components that are used to create the menubar.Make a ViewStateprotected voidWe have received the very first framedone event.voidPrint an imagevoidHook into the publishing interface to "publish" the screen image.voiddoPublishImage(String props) Hook into the publishing interface to "publish" the screen image.voidUser has requested saving display as an image.voiddoSaveImage(boolean andSaveBundle) Save the image (and the bundle that does with it);voidUser has requested saving display as an image.voidSave this state of this view manager.voidensureOnlyOneTimeDriver(DisplayControl displayControl) Ensure that there is only one time driver for this view THERE CAN BE ONLY ONE! - Highlanderprotected voidThis is called when the list of display controls has changed.protected voidactually fill the legends and update the display listvoidWait until there have been no calls to fillLegends for a little bit and then fill the legendsprotected TwoFacedObjectFind the appropriate combobox item from the stringvoidfirstInitializeViewMenu(JMenu viewMenu) Initialize the view menu.Get the Aliases property.Return theAnimationthat is used.Get the AnimationInfo property.booleanGet the animation string visibility.DateTime[]Get the array of animation timesReturn theAnimationWidgetthat is used.booleanGet the animation readout flagprotected JComponentGet the aspect properties componentdouble[]Get the AspectRatio property.Get the background color or black if it is nullGet the BooleanPropertiesForPersistence property.protected BooleanPropertygetBooleanProperty(String propertyId) Find, or create, the BooleanProperty identified with the given idprotected BooleanPropertygetBooleanProperty(String propertyId, boolean dflt) Get a BooleanPropertyprotected booleanGet the value of the BooleanPropertyprotected booleanGet a BooleanProperty (local implementation)booleanGet the click to focus property.Create, if needed, and return the command managerReturn the GUI component from theDisplayMasterReturn the full GUI contents.protected BorderGet the border for the contentsReturn the list ofDisplayControls displayed in this ViewManager.Return the list ofDisplayControls displayed in this ViewManager that are meant to be shown in a legendprotected ColorGet the default background colorprotected ColorGet the default foreground colorGet the DisplayBounds property.A wrapper aroundIdvBase.getDisplayConventions()Get the display side coordinate system, subclasses should implement if there is one.protected List<DisplayInfo> Get a copy of the list ofDisplayInfo-sdouble[]Get the display matrix arrayGet the display list color property.Get the display list font property.double[]Get the display matrix arrayget the display rendererWe call this getDisplayWindow instead of getWindow so the window is not treated as a persistable property.Get the ExternalAnimation property.Get the ExternalAnimationWidget property.Get the foreground color or white if it is nullintGet the FullScreenHeight property.intGet the FullScreenWidth property.booleanGetter method for xml persistence.protected booleanhave we initializedstatic BorderGet the border to use when this ViewManager is the currently selected ViewManagergetIdv()Get the IDVGet theIdvUIManagerto use.protected booleanHave we finished initializingprotected voidgetInitialBooleanProperties(List props) Get the intial BooleanPropertiesGet the intial ViewState nameThis is meant to be overrode by a derived class to return the contents (typically the display master's component) that is the "abbreviated" gui.booleanIs the DisplayMaster currently active.booleanHas this ViewManager been destroyed.booleanGet the IsShared property.longGet the last time we've seen a FRAME_DONE eventlongGet the time that this was last the active VMbooleanGet the LegendOnLeft property.Get the legendsGet the LegendState property.List<ucar.unidata.java3d.LightInfo> Get the Lights property.protected StringGet the logoGet the logo position on the screenfloatGet the logo scalebooleanGet the logo visibilityprotected JComponentGet main properties componentGet theDisplayMaster.Get the default size of the DisplayMaster held by this view.getName()Get the Name property.static BorderGet the normal borderbooleanGet whether this is in a perspective view or notGet the projection controlGet the list of Projections available.Get the Properties property.Get the component for setting properties on the display.getProperty(Object key) get a property.Get thePublishManagerto use.booleanThis returns the value of the hasWindow member which was set when unpersisting.Get theIdvResourceManagerto use.booleanGet the share view state flagbooleanShould we show the animation widget boxesbooleanShould we show the bottom legend that holds the list of display controls.booleanGet whether we should show any of the display control legends.booleanGet the show display list flagbooleanGet the show display scale flagbooleanShould we show the side legend that holds the list of display controls.protected JComponentgetSideComponent(JComponent sideLegend) Get the component that might hold the sideLegend By default this just returns the side legend component.intGet the location of the side legend or -1 if there is no side legendGet the SideLegend property.Get the component that holds the side legendGet the SkinProperties property.getSkinProperty(String name) Get the named property for the skinintGet the SplitPaneLocation property.Get theStateManagerto use.getStore()Wrapper aroundIdvBase.getStore()Get the list of times from the control that is flagged as the time drivermake the timeline guibooleanare the toolbars floatablebooleanGet the top component visibility.What type of view is thisOverride the base class method to return a (hopefully) unique id.booleangetUseFastRendering(boolean b) This is called by display controls and allows us to force fast renderingGet theViewDescriptor.Get the view managerDoes this viewmanager have any bounds that are visible.Get theVMManagerto use.booleanGet the please wait visible state flagbooleanGet the show wireframe box flagvoidThis gets called when the initial guis (windows, etc) have been created and shownprotected voidhandleBooleanPropertyChange(String id, boolean value) The BooleanProperty identified by the given id has changed.protected voidHandle a control changed.protected booleanhasBooleanProperty(String propertyId) Check to see if this view manager has the propertybooleanSee if this has a display masterprotected voidinit()Initialize.voidCalled after this object has been unpersisted from xml.protected voidCreate the set ofBooleanPropertys.voidinitColorMenu(JMenu colorMenu) Dynamically add the menu items into the color menuvoidinitDisplayMenu(JMenu displayMenu) This is called when the list of display controls has changed to update the display menu.voidinitFromSkin(Element skinNode) Initialize from a skinprotected voidInitialize a BooleanPropertyvoidinitializeViewMenu(JMenu viewMenu) Dynamically initialize the view menuvoidinitPreferences(IdvPreferenceManager preferenceManager) A hook so derived classes can add in their own preference widgets.protected voidA hook so derived classes can add in their toolbar componentsprotected voidinitUI()Create the uivoidinitViewState(ViewState viewState) Initialize the ViewStatevoidinitViewStateMenu(JMenu viewStateMenu) Initialize the View State menufinal voidinitWith(ViewManager that) Initialize this ViewManager with the state in the that ViewManagerfinal voidinitWith(ViewManager that, boolean ignoreWindow) Initialize this ViewManager with the state in the that ViewManager.voidInit with a view stateprotected voidinitWithInner(ViewManager that, boolean ignoreWindow) Initialize this ViewManager with the state in the that ViewManager.protected voidPlace the side legend where it belongsbooleanIf the given view descriptor has one or more class names is the class name of this ViewManager in the listbooleanIs this compatible with the other ViewManagerbooleanisCompatibleWith(ViewState viewState) Is this ViewState appropriate for me?booleanDoes this view manager have the given view descriptorprotected booleanAre we in full screen mode.booleanIs this an interactive sessionstatic booleanisVectorGraphicsFile(String filename) Check to see if the file is a vector graphics filevoidResponds to ItemEvents handled by an ItemListener; in this class, from JCheckBoxes.voidkeyWasTyped(KeyEvent keyEvent) Process sthe key eventvoidlogException(String msg, Throwable exc) Helper to log errorsmakeBufferedImage(Component comp, String whichComponent) Make buffered image.make the color set menumakeDropPanel(JComponent contents, boolean doBorder) Make a dnd panelvoidMake framesprotected StringmakeLogoPosition(String pos, String offset) Make a logo position from the position and offsetprotected JMenuMake the saved views menuprotected JMenuCreate and return the show menu.Create and return the view menu.protected voidmakeViewStateMenu(JMenu viewStateMenu) Make the view state menuprotected voidnotifyDisplayControls(String property) Tell the display controls that the projection has changed.booleanokToImportDisplay(DisplayControl control) Can this view manager import the given display control.intpaintDisplayList(Graphics2D graphics, List<DisplayControl> displayControls, int width, int height, boolean bottom, Color color, Font font) Paint the display list in a 2D graphicsprotected String[]parseLogoPosition(String position) Parse the logo positionvoidparseProperties(String properties) Parse and apply the properties in the semi-colon delimited list of name=value pairs.voidprintAspect(String msg) Print the aspectvoidputProperty(Object key, Object value) Set a property.protected voidtell the legends to fill themselvesvoidremoveColorPair(String name) Remove the named color pair from the users xmlvoidremoveDisplayInfo(DisplayInfo displayInfo) This removes the givenDisplayInfo.voidReset the aspect sliders.voidGo back to normal screenprotected voidReset the projection controlvoidsetAliases(List value) Set the Aliases property.voidsetAnimatedVisibility(boolean state) Turn on/off the display control visibility toggling animationvoidsetAnimationInfo(AnimationInfo value) Set theAnimationInfoproperty.voidsetAnimationStringVisible(boolean visible) Toggle the animation string visibility.voidsetAniReadout(boolean value) Set the show animation readout flagvoidsetAspectRatio(double[] value) Set the AspectRatio property.voidSet the background colorprotected voidSet the different boolean flags from those held by the given view manager.voidSet the BooleanPropertiesForPersistence property.protected voidHelper to set the value of a BooleanPropertyvoidsetClickToFocus(boolean value) Set the click to focus property.voidSet the foreground and background colors in the display.voidSet the contents boredervoidSet the cursor in the component of the main displayvoidsetDisplayBounds(Rectangle value) Set the DisplayBounds property.voidsetDisplayListColor(Color value) Set the display list color property.voidsetDisplayListFont(Font value) Set the display list font property.protected voidsetDisplayMaster(DisplayMaster master) Set theDisplayMastervoidsetDisplayMatrix(double[] newMatrix) Set the display matrix arrayvoidsetExternalAnimation(Animation value, AnimationWidget widget) Set the ExternalAnimation property.voidSet the foreground colorvoidGo to full screen modevoidsetFullScreenHeight(int value) Set the FullScreenHeight property.voidsetFullScreenWidth(int value) Set the FullScreenWidth property.voidsetHasWindow(boolean value) Setter method for xml persistence.static voidSets the color used to denote the currently selected panel.voidThis is here to set the IDV when this object has been unpersisted.voidsetInitialSplitPaneLocation(double value) Set the InitialSplitPaneLocation property.voidSet the initial ViewState namevoidsetIsShared(boolean value) Set the IsShared property.voidsetLastActive(boolean b) Set whether this view manager is the last one active.voidsetLegendOnLeft(boolean value) Set the LegendOnLeft property.voidsetLegendState(String value) Set the LegendState property.voidsetLegendState(IdvLegend legend, String state) Set the state of the legendvoidSet the Lights property.voidsetLogoFile(String logo) Set the logo file or URLvoidsetLogoPosition(String logop) Set the logo position on the screenvoidsetLogoScale(float scale) Set the logo scalevoidsetLogoVisibility(boolean on) Set the logo visibilityvoidSet theDisplayMasteractive if there are no more outstanind mast active calls.voidsetMasterActive(boolean force) Set theDisplayMasteractive if there are no more outstanind mast active calls.voidSet theDisplayMasterinactive.voidSet the Name property.voidsetProjectionFromData(boolean value) _more_voidsetProperties(Hashtable value) Set the Properties property.booleansetProperty(String name, String value, boolean ignoreError) Apply the given named property.voidsetShareViews(boolean value) Set the share view state flagvoidsetShowControlLegend(boolean b) Set whether we should show any of the display control legendsvoidsetShowDisplayList(boolean value) Set the show display list flagvoidsetShowScales(boolean value) Set the show display scale flagvoidsetShowToolBars(boolean v) Turn on/off the showing of the toolbarsvoidsetSideDividerLocation(int l) Set the location of the side legend.voidsetSideLegend(SideLegend value) Set the SideLegend property.voidsetSideLegendPosition(String state) Set the position state of the side legendvoidSet the default size of the DisplayMaster held by this view.voidsetSkinProperties(Hashtable value) Set the SkinProperties property.voidsetSplitPaneLocation(int value) Set the SplitPaneLocation property.voidsetTimeDriverTimes(Date startTime, Date endTime) set the animation widget starttime and endtime as the time driver timesvoidsetTopBarVisible(boolean visible) Toggle the top component visibility.voidSet the viewvoidSet theViewDescriptor.voidsetWaitMessageVisible(boolean value) Set the please wait visible state flagvoidSet the window that this ViewManager is shown in.voidSetter method for xml persistencevoidsetWireframe(boolean value) Set the show wireframe flagbooleanA 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 latervoidShow the dialog that allows the user to change the foreground/background colorsbooleanShould we show the highlight bordervoidShow (float) all legendsvoidShow the properties dialogvoidshow the timeline windowvoidshow the window I am invoidStart the image capture if we are not currently doing that.voidtoFront()Bring the window that contains this ViewManager to the frontvoidToggle full screentoString()Return the string representation of this objectvoidturnOnOffAllDisplays(boolean on) This turns off the visiblity toggle animation and sets the visibility of all unlocked display controls to the given value.protected voidUpdate the annotationsvoidUpdate display if needed.voidPopulate the display listprotected voidUpdate the name labelbooleanDo we use the displayvoidUse the imagesvoidUse the imagesvoidwriteImage(File file) Create a screen image and write it to the given filevoidwriteImage(File file, boolean block) Create a screen image and write it to the given filevoidwriteImage(File file, boolean block, boolean sync) Create a screen image and write it to the given filevoidwriteImage(File file, boolean block, float quality) Create a screen image and write it to the given filevoidwriteImage(String fileName) Create a screen image and write it to the given filevoidwriteImage(String fileName, boolean block) Create a screen image and write it to the given filevoidwriteImage(String fileName, boolean block, float quality) Create a screen image and write it to the given filevoidwriteTestArchive(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
-
Field Details
-
PREF_3DCLIP
Preference for clipping at 3d box_- See Also:
-
PREF_ANIREADOUT
Preference for showing the time string in the display- See Also:
-
PREF_BGCOLOR
For the bg color- See Also:
-
PREF_BORDERCOLOR
For the currently selected panel.- See Also:
-
PREF_CONTOUR_LABELALIGN
for the contour label Font- See Also:
-
PREF_CONTOUR_LABELFONT
for the contour label Font- See Also:
-
PREF_CONTOUR_LABELSIZE
for the contour label size- See Also:
-
PREF_DIMENSION
Preference for 3d or 2d _- See Also:
-
PREF_DISPLAYLISTCOLOR
For the display list color- See Also:
-
PREF_DISPLAYLISTFONT
For the display list font- See Also:
-
PREF_FGCOLOR
For the foreground color- See Also:
-
PREF_LOGO
for the logo- See Also:
-
PREF_LOGO_POSITION_OFFSET
for the logo position- See Also:
-
PREF_LOGO_SCALE
for the logo scale- See Also:
-
PREF_LOGO_VISIBILITY
for the logo visibility- See Also:
-
PREF_PREFIX
Prefix used for preference String ids- See Also:
-
PREF_SHAREVIEWS
Preference for sharing view points- See Also:
-
PREF_SHOWANIMATIONBOXES
Show the bottom legend- See Also:
-
PREF_SHOWBOTTOMLEGEND
Show the bottom legend- See Also:
-
PREF_SHOWCURSOR
Preference for showing cursor readout- See Also:
-
PREF_SHOWDISPLAYLIST
Preference for showing cursor readout- See Also:
-
PREF_SHOWSCALES
Preference for showing the wireframe box- See Also:
-
PREF_SHOWSIDELEGEND
Show the side legend- See Also:
-
PREF_SHOWTOOLBAR
For hiding/showing components of the toolbar- See Also:
-
PREF_SHOWTRANSECTSCALES
Preference for showing the wireframe box- See Also:
-
PREF_TOOLBARSFLOATABLE
are the toolbars floatable- See Also:
-
PREF_TOPBAR_VISIBLE
For the visibility of the top compenent- See Also:
-
PREF_WAITMSG
For the visibility of the please wait message- See Also:
-
PREF_WIREFRAME
Preference for showing the wireframe box- See Also:
-
PROP_COMPONENT_RESIZED
Property id for component resizing- See Also:
-
TAG_COLORPAIR
Xml tag for the color pair- See Also:
-
TAG_COLORPAIRS
Xml tag for the color pairs xml- See Also:
-
borderWidth
public static final int borderWidthborder width- See Also:
-
borderHighlightColor
border hightlight color -
logoPoses
logo positions -
highlightBorder
highlight border -
normalBorder
normal border -
clickToFocus
protected boolean clickToFocusDo we focus on this one only when the user clicks -
lastActive
protected boolean lastActiveIs the the currently active VM -
lastTimeActivated
protected long lastTimeActivatedKeeps track of the last time this VM was set as the active VM -
toolbars
List of Components that are shown in the left side, vertical tool bar -
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
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 showControlMenuDo we show the control menu -
showControlLegend
protected boolean showControlLegendDo we show the control legends -
animationHolder
The panel that holds the animation widget -
animationMenu
This holds the visibility toggle animation commands. -
displayBounds
The bounds of the display_ -
fullScreenWindow
The window for full screen -
innerContents
The inner gui -
nameLabel
name label -
lastTimePolled
protected long lastTimePolledflag for animation update -
windowBounds
We keep the window bounds around for persisting/unpersisting this ViewManager.
-
-
Constructor Details
-
ViewManager
public ViewManager()A parameter-less ctor for the XmlEncoder based decoding. -
ViewManager
Create this ViewManager- Parameters:
viewContext- As a hack this really better be an IntegratedDataViewer
-
ViewManager
Instantiate this ViewManager with the given AnimationInfo- Parameters:
viewContext- As a hack this really better be an IntegratedDataViewerinfo- The initial animation info
-
ViewManager
Instantiate this ViewManager with the given AnimationInfo- Parameters:
viewContext- As a hack this really better be an IntegratedDataViewerviewDescriptor- the view descriptorproperties- 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:
viewContext- As a hack this really better be an IntegratedDataViewermaster- The DisplayMaster to useviewDescriptor- 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:
VisADException- the VisAD exceptionRemoteException- the remote exception
-
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 IntegratedDataViewerviewDescriptor- the view descriptorproperties- a list of semi-colon separated propertiesinfo- The initial animation info
-
-
Method Details
-
init
Initialize.- Throws:
VisADException- the VisAD exceptionRemoteException- the remote exception
-
getAnimationTimes
Get the array of animation times- Returns:
- times
-
getTimeDriverTimes
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 problemVisADException- VisAD problem
-
setTimeDriverTimes
set the animation widget starttime and endtime as the time driver times- Throws:
RemoteException- Java RMI problemVisADException- 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
Initialize from a skin- Parameters:
skinNode- the XML node
-
doDrop
Handle the drop action- Parameters:
object- object being dropped
-
initUI
protected void initUI()Create the ui -
setSideLegendPosition
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
Make a dnd panel- Parameters:
contents- contents to showdoBorder- draw a border- Returns:
- the drop panel
-
okToImportDisplay
Can this view manager import the given display control. e.g., from a drag-and-drop- Parameters:
control- control- Returns:
- can import
-
setContentsBorder
Set the contents boreder- Parameters:
b- the border
-
getContentsBorder
Get the border for the contents- Returns:
- the border
-
showPropertiesDialog
public void showPropertiesDialog()Show the properties dialog -
getPropertiesComponent
Get the component for setting properties on the display.- Returns:
- the component
-
getMainPropertiesComponent
Get main properties component- Returns:
- the component
-
findLoc
Find the appropriate combobox item from the string- Parameters:
loc- the string location- Returns:
- the corresponding TFO
-
parseLogoPosition
Parse the logo position- Parameters:
position- the string representation- Returns:
- the position and offset
-
makeLogoPosition
Make a logo position from the position and offset- Parameters:
pos- the positionoffset- the offset- Returns:
- the logo position string
-
addPropertiesComponents
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
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
Called after this object has been unpersisted from xml.- Parameters:
idv- the IDV associated with this.- Throws:
RemoteException- Java RMI exceptionVisADException- Couldn't create the VisAD display
-
initWith
Init with a view state- Parameters:
viewState- the view state- Throws:
Exception- problem initializing
-
initWith
Initialize this ViewManager with the state in the that ViewManager- Parameters:
that- The other view manager
-
initWith
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 managerignoreWindow- 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 managerignoreWindow- If false then we set the window bounds of this ViewManager to the bounds held in that ViewManager.- Throws:
RemoteException- Java RMI exceptionVisADException- 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
This is here to set the IDV when this object has been unpersisted.- Parameters:
idv- The IDV
-
getIdv
Get the IDV- Returns:
- The IDV
-
setBooleanProperties
Set the different boolean flags from those held by the given view manager.- Parameters:
vm- The ViewManager to get state from- Throws:
VisADException- the VisAD exceptionRemoteException- the remote exception
-
handleBooleanPropertyChange
The BooleanProperty identified by the given id has changed. Apply the change to the display.- Parameters:
id- Id of the changed BooleanPropertyvalue- Its new value- Throws:
Exception- problem handling the change
-
showTimeline
public void showTimeline()show the timeline window -
animationTimeChanged
protected void animationTimeChanged()The time changed -
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
Get the intial BooleanProperties- Parameters:
props- the properties
-
initBooleanProperties
protected void initBooleanProperties()Create the set ofBooleanPropertys. These hold all of the different flag based display state. -
initializeBooleanProperty
Initialize a BooleanProperty- Parameters:
bp- the property
-
hasBooleanProperty
Check to see if this view manager has the property- Parameters:
propertyId- property id- Returns:
- true if it has this property
-
getBooleanProperty
Find, or create, the BooleanProperty identified with the given id- Parameters:
propertyId- Identifies the BooleanProperty- Returns:
- The BooleanProperty
-
getBooleanProperty
Get a BooleanProperty- Parameters:
propertyId- the propertydflt- the default value- Returns:
- the property
-
setBp
Helper to set the value of a BooleanProperty- Parameters:
propertyId- Identifies the BooleanPropertyvalue- The value to set
-
getBp
Get the value of the BooleanProperty- Parameters:
propertyId- Identifies the BooleanProperty- Returns:
- The value
-
getBp
Get a BooleanProperty (local implementation)- Parameters:
propertyId- the iddflt- the default value- Returns:
- the 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
Add in the BooleanProperty into the list of properties.- Parameters:
bp- The new BooleanProperty
-
setBooleanPropertiesForPersistence
Set the BooleanPropertiesForPersistence property.- Parameters:
value- The new value for BooleanPropertiesForPersistence
-
getBooleanPropertiesForPersistence
Get the BooleanPropertiesForPersistence property.- Returns:
- The BooleanPropertiesForPersistence
-
createCBMI
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 intoid- 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
Get the component that holds the side legend- Returns:
- side legend container deprecated No longer called sideLegendContainer
-
getSideComponent
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
Set the state of the legend- Parameters:
legend- The legendstate- 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
Setter method for xml persistence- Parameters:
r- The bounds of the window
-
setWindow
Set the window that this ViewManager is shown in. This adds this object as aWindowListenerand sets the bounds of the window if the windowBounds is non-null.- Parameters:
w- The window
-
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
We call this getDisplayWindow instead of getWindow so the window is not treated as a persistable property.- Returns:
- The window
-
setSize
Set the default size of the DisplayMaster held by this view.- Parameters:
d- The default size
-
getMySize
Get the default size of the DisplayMaster held by this view.- Returns:
- The default size
-
initPreferences
A hook so derived classes can add in their own preference widgets.- Parameters:
preferenceManager- The preference manager
-
getStore
Wrapper aroundIdvBase.getStore()- Returns:
- The XmlObjectStore to use for preferences.
-
getProjectionList
Get the list of Projections available.- Returns:
- The list of projections
-
getResourceManager
Get theIdvResourceManagerto use.- Returns:
- The resource manager from the IDV.
-
getStateManager
Get theStateManagerto use.- Returns:
- The state manager from the IDV.
-
getPublishManager
Get thePublishManagerto use.- Returns:
- The publish manager from the IDV.
-
getIdvUIManager
Get theIdvUIManagerto use.- Returns:
- The UI manager from the IDV.
-
getVMManager
Get theVMManagerto use.- Returns:
- The view manager manager from the IDV.
-
parseProperties
Parse and apply the properties in the semi-colon delimited list of name=value pairs.- Parameters:
properties- The list of properties
-
setProperty
Apply the given named property. This uses(Object, String, String)to set the property on this object via reflection.- Parameters:
name- Name of propertyvalue- Its valueignoreError- 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 theDisplayMasterinactive. -
setMasterActive
public void setMasterActive()Set theDisplayMasteractive if there are no more outstanind mast active calls. -
setMasterActive
public void setMasterActive(boolean force) Set theDisplayMasteractive 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
Add the command to the command manager. Use this for undo/redo commands.- Parameters:
cmd- The command
-
keyWasTyped
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
Tell the display controls that the projection has changed.- Parameters:
property- Identifes the change type.
-
addToolBar
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 componentid- Its idname- 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
Set the LegendState property.- Parameters:
value- The new value for LegendState
-
getLegendState
Get the LegendState property.- Returns:
- The LegendState
-
doMakeMenuBar
Create and return the menu bar.- Returns:
- The menu bar
-
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
Return the list ofDisplayControls displayed in this ViewManager.- Returns:
- List of display controls
-
displayDataChanged
Handle the display data changing- Parameters:
displayControl- the control
-
animationDriverChanged
public void animationDriverChanged()Handle the time set from the animation widget changing -
getControlsForLegend
Return the list ofDisplayControls displayed in this ViewManager that are meant to be shown in a legend- Returns:
- List of display controls for the legend
-
setColors
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 colorbackground- The background color
-
displayControlChanged
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
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
This is called when the list of display controls has changed to update the display menu.- Parameters:
displayMenu- The menu to fill
-
addDisplayListener
Adds the given display listener to theDisplayMaster- Parameters:
listener- The listener to add
-
getDisplayConventions
A wrapper aroundIdvBase.getDisplayConventions()- Returns:
- The
DisplayConventionsto use.
-
removeDisplayInfo
This removes the givenDisplayInfo. The DisplayInfo is what really holds theDisplayControl.- Parameters:
displayInfo- The display info to remove- Throws:
RemoteException- the remote exceptionVisADException- the VisAD exception
-
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
Add the display infos- Parameters:
displayInfos- the display infos- Throws:
RemoteException- Java RMI ExceptionVisADException- VisAD Exception
-
addDisplayInfo
Add the DisplayInfo to the list of DisplayInfo-s If I have aDisplayMasterthen 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- the remote exceptionVisADException- the VisAD exception
-
updateDisplayIfNeeded
Update display if needed.- Throws:
VisADException- the VisAD exceptionRemoteException- the remote exception
-
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
This gets called when a display control has been moved to this viewmanager- Parameters:
control- The display control that has been moved
-
makeShowMenu
Create and return the show menu.- Returns:
- The Show menu
-
makeViewMenu
Create and return the view menu.- Returns:
- The View menu
-
addContextMenuItems
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
Initialize the view menu. This gets called first and allows us to translate the component tree- Parameters:
viewMenu- the view menu
-
initializeViewMenu
Dynamically initialize the view menu- Parameters:
viewMenu- The menu
-
makeSavedViewsMenu
Make the saved views menu- Returns:
- saved views menu
-
initViewStateMenu
Initialize the View State menu- Parameters:
viewStateMenu- the menu to init
-
isCompatibleWith
Is this compatible with the other ViewManager- Parameters:
vm- the other VM- Returns:
- true if compatible
-
isCompatibleWith
Is this ViewState appropriate for me?- Parameters:
viewState- the ViewState- Returns:
- true if compatible
-
makeViewStateMenu
Make the view state menu- Parameters:
viewStateMenu- The menu to fill in
-
getAnimationWidget
Return theAnimationWidgetthat is used. May be null.- Returns:
- The animation widget.
-
setExternalAnimation
Set the ExternalAnimation property.- Parameters:
value- The new value for ExternalAnimationwidget- the animation widget to update
-
getExternalAnimation
Get the ExternalAnimation property.- Returns:
- The ExternalAnimation
-
getExternalAnimationWidget
Get the ExternalAnimationWidget property.- Returns:
- The ExternalAnimationWidget
-
getAnimation
Return theAnimationthat is used. May be null. This is theDisplayablethat is added into theDisplayMasterto 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
Set theAnimationInfoproperty. This holds the state of the animation (e.g, rocking, rate, etc.)- Parameters:
value- The new value for 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
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
Get a copy of the list ofDisplayInfo-s- Returns:
- A copy of the the display infos
-
toString
Return the string representation of this object -
getTypeName
What type of view is this- Returns:
- The type of view
-
getViewDescriptor
Get theViewDescriptor. 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
Set theViewDescriptor. We have this here for xml persistence.- Parameters:
vd- The new ViewDescriptor. deprecated Use addViewDescriptor
-
addViewDescriptor
Add the view descriptor- Parameters:
vd- the view descriptor
-
isDefinedBy
Does this view manager have the given view descriptor- Parameters:
vd- the view descriptor- Returns:
- defined by the view descriptor
-
canBe
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
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
Get the view manager- Returns:
- this
-
getUniqueId
Override the base class method to return a (hopefully) unique id.- Specified by:
getUniqueIdin interfaceSharable- Overrides:
getUniqueIdin classSharableImpl- Returns:
- The String that uniquely identified this object.
-
getComponent
Return the GUI component from theDisplayMaster- Returns:
- The component from the display master.
-
getContents
Return the full GUI contents.- Returns:
- The GUI contents.
-
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
Create the main GUI contents.- Returns:
- The GUI contents
-
setCursorInDisplay
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
Get theDisplayMaster.- 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
Make the DisplayMaster for this ViewManger. Subclasses should override.- Returns:
- the appropriate display
- Throws:
RemoteException- Java RMI problemVisADException- VisAD problem
-
getDisplayRenderer
get the display renderer- Returns:
- display renderer
-
setDisplayMaster
Set theDisplayMaster- Parameters:
master- The display master
-
resetProjectionControl
protected void resetProjectionControl()Reset the projection control -
getProjectionControl
Get the projection control- Returns:
- The projection control
-
getCommandManager
Create, if needed, and return the command manager- Returns:
- The command manager
-
controlChanged
This is the default method (no-op) for the ControlListener interface- Specified by:
controlChangedin interfaceControlListener- Parameters:
e- TheControlEvent
-
handleControlChanged
Handle a control changed. A no-op here.- Parameters:
e- the event.
-
displayChanged
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, callsfirstFrameDoneon theDisplayControls- Specified by:
displayChangedin interfaceDisplayListener- Parameters:
de- TheDisplayEvent- Throws:
VisADException- the VisAD exceptionRemoteException- the remote exception
-
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
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:
itemStateChangedin interfaceItemListener- Parameters:
e- ItemEvent whose state has changed.
-
actionPerformed
Required interface for ActionEvents, to implement ActionListener for the UI objects such as JButton-s and MenuItem-s- Specified by:
actionPerformedin interfaceActionListener- 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
Use the images- Parameters:
images- list of imagesandShow- true to show
-
startImageCapture
public void startImageCapture()Start the image capture if we are not currently doing that. Creates theImageSequenceGrabber. -
clearImageGrabber
The given grabber is done. Null out theisgmember if it == the given grabber.- Parameters:
grabber- The ImageSequenceGrabber to clear
-
writeTestArchive
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
Create a screen image and write it to the given file- Parameters:
fileName- File to write image to
-
writeImage
Create a screen image and write it to the given file- Parameters:
fileName- File to write image toblock- If true then do the write in this thread
-
writeImage
Create a screen image and write it to the given file- Parameters:
fileName- File to write image toblock- If true then do the write in this threadquality- jpeg quality
-
writeImage
Create a screen image and write it to the given file- Parameters:
file- File to write image to
-
writeImage
Create a screen image and write it to the given file- Parameters:
file- File to write image toblock- If true then do the write in this thread
-
writeImage
Create a screen image and write it to the given file- Parameters:
file- File to write image toblock- If true then do the write in this threadsync- Synchronize before capturing
-
writeImage
Create a screen image and write it to the given file- Parameters:
file- File to write image toblock- If true then do the write in this threadquality- jpeg quality
-
doSaveState
public void doSaveState()Save this state of this view manager. This simply passes through toVMManager.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
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
Does this viewmanager have any bounds that are visible. This is overwritten by the MapViewManager- Returns:
- bounds
-
isVectorGraphicsFile
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
-
captureIslImage
Capture the image for for ISL. If scriptingNode has a capture attribute then capture the legend or the full window. Else just capture the display- Parameters:
scriptingNode- The ISL node- Returns:
- The image
- Throws:
Exception
-
makeBufferedImage
Make buffered image.- Parameters:
comp- the componentwhichComponent- which component- Returns:
- the buffered image
- Throws:
AWTException- the AWT exception
-
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 ondisplayControls- the list of controlswidth- widthheight- heightbottom- bottom positioncolor- label colorfont- label font- Returns:
- the height of the top label
- Throws:
RemoteException- Java RMI problemVisADException- problem with VisAD data
-
doPublishImage
public void doPublishImage()Hook into the publishing interface to "publish" the screen image. -
doPublishImage
Hook into the publishing interface to "publish" the screen image.- Parameters:
props- Properties to pass through to the publish manager.
-
logException
Helper to log errors- Parameters:
msg- The error messageexc- The exception
-
makeColorMenu
make the color set menu- Returns:
- color menu
-
initColorMenu
Dynamically add the menu items into the color menu- Parameters:
colorMenu- The Color menu to initialize
-
removeColorPair
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
Get the foreground color or white if it is null- Returns:
- The foreground color
-
getDefaultForeground
Get the default foreground color- Returns:
- the color
-
getDefaultBackground
Get the default background color- Returns:
- the color
-
setForeground
Set the foreground color- Parameters:
c- The new foreground color
-
getBackground
Get the background color or black if it is null- Returns:
- The background color
-
setBackground
Set the background color- Parameters:
c- The new background color
-
setSideLegend
Set the SideLegend property.- Parameters:
value- The new value for 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
Get the normal border- Returns:
- normal border
-
getHighlightBorder
Get the border to use when this ViewManager is the currently selected ViewManager- Returns:
- highlight border
-
setHighlightBorder
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
Set the DisplayBounds property.- Parameters:
value- The new value for DisplayBounds
-
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
Set the Aliases property.- Parameters:
value- The new value for Aliases
-
getAliases
Get the Aliases property.- Returns:
- The Aliases
-
setDisplayMatrix
Set the display matrix array- Parameters:
newMatrix- display matrix- Throws:
VisADException- problem in VisAD displayRemoteException- problem in remote VisAD display
-
getDisplayMatrix
public double[] getDisplayMatrix()Get the display matrix array- Returns:
- display matrix
-
getDisplayInitMatrix
public double[] getDisplayInitMatrix()Get the display matrix array- Returns:
- display matrix
-
setAnimationStringVisible
public void setAnimationStringVisible(boolean visible) Toggle the animation string visibility.- Parameters:
visible- true to make it visible deprecated Use setAniReadout now
-
getAnimationStringVisible
public boolean getAnimationStringVisible()Get the animation string visibility.- Returns:
- visible true to make it visible deprecated Use getAniReadout now
-
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
Set the Name property.- Parameters:
value- The new value for Name
-
updateNameLabel
protected void updateNameLabel()Update the name label -
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
Print the aspect- Parameters:
msg- a prefix
-
getAspectRatio
public double[] getAspectRatio()Get the AspectRatio property.- Returns:
- The AspectRatio
-
setSkinProperties
Set the SkinProperties property.- Parameters:
value- The new value for SkinProperties
-
getSkinProperties
Get the SkinProperties property.- Returns:
- The SkinProperties
-
getSkinProperty
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
-
setDisplayListFont
Set the display list font property.- Parameters:
value- The new value for displayListFont
-
getDisplayListFont
Get the display list font property.- Returns:
- The value for displayListFont
-
setDisplayListColor
Set the display list color property.- Parameters:
value- The new value for displayListColor
-
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
Set the Properties property.- Parameters:
value- The new value for Properties
-
getProperties
Get the Properties property.- Returns:
- The Properties
-
getProperty
get a property.- Parameters:
key- key- Returns:
- property
-
putProperty
Set a property. Anything placed here is persisted off with the ViewManager- Parameters:
key- keyvalue- value
-
getDisplayCoordinateSystem
Get the display side coordinate system, subclasses should implement if there is one.- Returns:
- CoordinateSystem or null
-
setLights
Set the Lights property.- Parameters:
value- The new value for Lights
-
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
Initialize the ViewState- Parameters:
viewState- the view state
-
doMakeViewState
Make a ViewState- Returns:
- the ViewState
-
setInitViewStateName
Set the initial ViewState name- Parameters:
s- the name
-
getInitViewStateName
Get the intial ViewState name- Returns:
- the intial ViewState name
-
getLogoFile
Get the logo- Returns:
- the logo file or URL
-
setLogoFile
Set the logo file or URL- Parameters:
logo- the logo file or URL
-
getLogoPosition
Get the logo position on the screen- Returns:
- the logo position on the screen
-
setLogoPosition
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
Ensure that there is only one time driver for this view THERE CAN BE ONLY ONE! - Highlander- Parameters:
displayControl- the time driver control
-
setProjectionFromData
public void setProjectionFromData(boolean value) _more_- Parameters:
value- _more_
-