Package ucar.unidata.view.geoloc
Class ViewpointControl
java.lang.Object
ucar.unidata.view.geoloc.ViewpointControl
- All Implemented Interfaces:
ActionListener,EventListener
This class has a menu and ToolBar to control the viewpoint of
a 3D display.
- Version:
- $Revision: 1.31 $
- Author:
- IDV Development team
-
Constructor Summary
ConstructorsConstructorDescriptionViewpointControl(NavigatedDisplay navDisplay) Construct a new ViewpointControl for the NavigatedDisplay. -
Method Summary
Modifier and TypeMethodDescriptionvoidHandle the actionprotected voidapplyVerticalRange(VertScaleInfo transfer) Apply the vertical range informationprotected voidapplyVerticalScale(VertScaleInfo transfer) Apply the vertical scalevoidchangeAutoRotate(boolean v) A method that is called when the user changes the state of autorotation through the menu or button.voidChange the eye position for stereo systemsvoidchangePerspectiveView(boolean v) A method that is called when the user changes the perspective view through the menu or button.voidchangeVerticalRange(VertScaleInfo transfer) Change the vertical rangevoidchangeVerticalScale(VertScaleInfo transfer) Change the vertical scalebooleanGet whether the display should autorotate or notdoubleGet the eye positiongetMenu()Make a Viewpoint controls menubooleanGet whether the view is perspective or parallel.Make a Viewpoint controls toolbar.getToolBar(boolean floatable) Make a Viewpoint controls toolbar.getToolBar(boolean floatable, int orientation) Make a Viewpoint controls toolbar.getToolBar(int orientation) Make a Viewpoint controls toolbar.Get the view point information.protected VertScaleInfogetVsi()protected JMenumakeMenu()Make the view point controls menu.protected JToolBarMake the toolbar for this control.protected JToolBarmakeToolBar(boolean floatable) Make the toolbar for this control.voidmakeVerticalRangeMenuItem(JMenu viewMenu) Add the vertical range menu item to the menumakeVerticalRangeWidget(boolean visible) Make the vertical range widgetvoidmakeVerticalScaleMenuItem(JMenu viewMenu) Add the vertical scale menu item to the menumakeVerticalScaleWidget(boolean visible) Make the vertical scale widgetrotateViewpoint(ViewpointInfo transfer) Rotate the viewpoint to the parameters intransfervoidsetAutoRotate(boolean rotate) Set the auto rotate valuevoidSet the view to the bottom.voidSet the view to the east.voidsetEyePosition(double position) Set the eye positionvoidSet the view to the north.voidsetPerspectiveView(boolean perspective) Set the perspective view.voidSet the rotate directionvoidSet the view to the south.voidSet the view to the top.voidSet the view point informationvoidSet the view to the west.
-
Constructor Details
-
Method Details
-
getToolBar
Make a Viewpoint controls toolbar.- Returns:
- the toolbar
-
getToolBar
Make a Viewpoint controls toolbar.- Parameters:
orientation- JToolBar.VERTICAL or JToolBar.HORIZONTAL- Returns:
- the toolbar
-
getToolBar
Make a Viewpoint controls toolbar.- Parameters:
floatable- Is the toolbar floatable- Returns:
- the toolbar
-
getToolBar
Make a Viewpoint controls toolbar.- Parameters:
floatable- Is the toolbar floatableorientation- JToolBar.VERTICAL or JToolBar.HORIZONTAL- Returns:
- the toolbar
-
actionPerformed
Handle the action- Specified by:
actionPerformedin interfaceActionListener- Parameters:
ae- The action
-
makeToolBar
Make the toolbar for this control.- Returns:
- the toolbar
-
makeToolBar
Make the toolbar for this control.- Parameters:
floatable- Is the toolbar floatable- Returns:
- the toolbar
-
setRotate
Set the rotate direction- Parameters:
dir- the direction
-
getMenu
Make a Viewpoint controls menu- Returns:
- the menu
-
makeMenu
Make the view point controls menu.- Returns:
- the menu
-
makeVerticalScaleMenuItem
Add the vertical scale menu item to the menu- Parameters:
viewMenu- Menu to add item to deprecated seemakeVerticalRangeMenuItem(JMenu)
-
makeVerticalRangeMenuItem
Add the vertical range menu item to the menu- Parameters:
viewMenu- Menu to add item to
-
setTopView
public void setTopView()Set the view to the top. -
setBottomView
public void setBottomView()Set the view to the bottom. -
setNorthView
public void setNorthView()Set the view to the north. -
setSouthView
public void setSouthView()Set the view to the south. -
setEastView
public void setEastView()Set the view to the east. -
setWestView
public void setWestView()Set the view to the west. -
setEyePosition
public void setEyePosition(double position) Set the eye position- Parameters:
position- the eye position
-
getEyePosition
public double getEyePosition()Get the eye position- Returns:
- the eye position
-
changeEyePosition
public void changeEyePosition()Change the eye position for stereo systems -
getPerspectiveView
public boolean getPerspectiveView()Get whether the view is perspective or parallel.- Returns:
- true if perspective
-
changePerspectiveView
public void changePerspectiveView(boolean v) A method that is called when the user changes the perspective view through the menu or button. It can be overridden so other code can be notified.- Parameters:
v- true to set perspective view
-
setPerspectiveView
public void setPerspectiveView(boolean perspective) Set the perspective view.- Parameters:
perspective- true for perspective
-
getAutoRotate
public boolean getAutoRotate()Get whether the display should autorotate or not- Returns:
- true if autorotate
-
changeAutoRotate
public void changeAutoRotate(boolean v) A method that is called when the user changes the state of autorotation through the menu or button. It can be overridden so other code can be notified.- Parameters:
v- true to set auto rotation
-
setAutoRotate
public void setAutoRotate(boolean rotate) Set the auto rotate value- Parameters:
rotate- true to rotate
-
rotateViewpoint
Rotate the viewpoint to the parameters intransfer- Parameters:
transfer- holder of the new view point information- Returns:
- the transfer
-
getViewpointInfo
Get the view point information.- Returns:
- the view point information
-
setViewpointInfo
Set the view point information- Parameters:
vpi- new view point info
-
getVsi
- Returns:
- the vsi
-
makeVerticalScaleWidget
Make the vertical scale widget- Parameters:
visible- true to be visible- Returns:
- vertical scale widget
deprecated see
makeVerticalRangeWidget(boolean)
-
makeVerticalRangeWidget
Make the vertical range widget- Parameters:
visible- true to be visible- Returns:
- vertical range widget
-
changeVerticalScale
Change the vertical scale- Parameters:
transfer- vertical scale information deprecated seechangeVerticalRange(VertScaleInfo)
-
changeVerticalRange
Change the vertical range- Parameters:
transfer- vertical range information
-
applyVerticalScale
Apply the vertical scale- Parameters:
transfer- The info- Throws:
Exception- On badness deprecated seeapplyVerticalRange(VertScaleInfo)
-
applyVerticalRange
Apply the vertical range information- Parameters:
transfer- The info- Throws:
Exception- On badness
-