public class ViewpointControl
extends java.lang.Object
implements java.awt.event.ActionListener
Constructor and Description |
---|
ViewpointControl(NavigatedDisplay navDisplay)
Construct a new ViewpointControl for the NavigatedDisplay.
|
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent ae)
Handle the action
|
protected void |
applyVerticalRange(VertScaleInfo transfer)
Apply the vertical range information
|
protected void |
applyVerticalScale(VertScaleInfo transfer)
Deprecated.
|
void |
changeAutoRotate(boolean v)
A method that is called when the user changes the state of
autorotation through the menu or button.
|
void |
changeEyePosition()
Change the eye position for stereo systems
|
void |
changePerspectiveView(boolean v)
A method that is called when the user changes the perspective view
through the menu or button.
|
void |
changeVerticalRange(VertScaleInfo transfer)
Change the vertical range
|
void |
changeVerticalScale(VertScaleInfo transfer)
Deprecated.
|
boolean |
getAutoRotate()
Get whether the display should autorotate or not
|
double |
getEyePosition()
Get the eye position
|
javax.swing.JMenu |
getMenu()
Make a Viewpoint controls menu
|
boolean |
getPerspectiveView()
Get whether the view is perspective or parallel.
|
javax.swing.JToolBar |
getToolBar()
Make a Viewpoint controls toolbar.
|
javax.swing.JToolBar |
getToolBar(boolean floatable)
Make a Viewpoint controls toolbar.
|
javax.swing.JToolBar |
getToolBar(boolean floatable,
int orientation)
Make a Viewpoint controls toolbar.
|
javax.swing.JToolBar |
getToolBar(int orientation)
Make a Viewpoint controls toolbar.
|
ViewpointInfo |
getViewpointInfo()
Get the view point information.
|
protected VertScaleInfo |
getVsi() |
protected javax.swing.JMenu |
makeMenu()
Make the view point controls menu.
|
protected javax.swing.JToolBar |
makeToolBar()
Make the toolbar for this control.
|
protected javax.swing.JToolBar |
makeToolBar(boolean floatable)
Make the toolbar for this control.
|
void |
makeVerticalRangeMenuItem(javax.swing.JMenu viewMenu)
Add the vertical range menu item to the menu
|
VertScaleDialog |
makeVerticalRangeWidget(boolean visible)
Make the vertical range widget
|
void |
makeVerticalScaleMenuItem(javax.swing.JMenu viewMenu)
Deprecated.
|
VertScaleDialog |
makeVerticalScaleWidget(boolean visible)
Deprecated.
|
ViewpointInfo |
rotateViewpoint(ViewpointInfo transfer)
Rotate the viewpoint to the parameters in
transfer |
void |
setAutoRotate(boolean rotate)
Set the auto rotate value
|
void |
setBottomView()
Set the view to the bottom.
|
void |
setEastView()
Set the view to the east.
|
void |
setEyePosition(double position)
Set the eye position
|
void |
setNorthView()
Set the view to the north.
|
void |
setPerspectiveView(boolean perspective)
Set the perspective view.
|
void |
setRotate(java.lang.String dir)
Set the rotate direction
|
void |
setSouthView()
Set the view to the south.
|
void |
setTopView()
Set the view to the top.
|
void |
setViewpointInfo(ViewpointInfo vpi)
Set the view point information
|
void |
setWestView()
Set the view to the west.
|
public ViewpointControl(NavigatedDisplay navDisplay)
navDisplay
- display to use (cannot be null)public javax.swing.JToolBar getToolBar()
public javax.swing.JToolBar getToolBar(int orientation)
orientation
- JToolBar.VERTICAL or JToolBar.HORIZONTALpublic javax.swing.JToolBar getToolBar(boolean floatable)
floatable
- Is the toolbar floatablepublic javax.swing.JToolBar getToolBar(boolean floatable, int orientation)
floatable
- Is the toolbar floatableorientation
- JToolBar.VERTICAL or JToolBar.HORIZONTALpublic void actionPerformed(java.awt.event.ActionEvent ae)
actionPerformed
in interface java.awt.event.ActionListener
ae
- The actionprotected javax.swing.JToolBar makeToolBar()
protected javax.swing.JToolBar makeToolBar(boolean floatable)
floatable
- Is the toolbar floatablepublic void setRotate(java.lang.String dir)
dir
- the directionpublic javax.swing.JMenu getMenu()
protected javax.swing.JMenu makeMenu()
public void makeVerticalScaleMenuItem(javax.swing.JMenu viewMenu)
makeVerticalRangeMenuItem(JMenu)
viewMenu
- Menu to add item topublic void makeVerticalRangeMenuItem(javax.swing.JMenu viewMenu)
viewMenu
- Menu to add item topublic void setTopView()
public void setBottomView()
public void setNorthView()
public void setSouthView()
public void setEastView()
public void setWestView()
public void setEyePosition(double position)
position
- the eye positionpublic double getEyePosition()
public void changeEyePosition()
public boolean getPerspectiveView()
public void changePerspectiveView(boolean v)
v
- true to set perspective viewpublic void setPerspectiveView(boolean perspective)
perspective
- true for perspectivepublic boolean getAutoRotate()
public void changeAutoRotate(boolean v)
v
- true to set auto rotationpublic void setAutoRotate(boolean rotate)
rotate
- true to rotatepublic ViewpointInfo rotateViewpoint(ViewpointInfo transfer)
transfer
transfer
- holder of the new view point informationpublic ViewpointInfo getViewpointInfo()
public void setViewpointInfo(ViewpointInfo vpi)
vpi
- new view point infoprotected VertScaleInfo getVsi()
public VertScaleDialog makeVerticalScaleWidget(boolean visible)
makeVerticalRangeWidget(boolean)
visible
- true to be visiblepublic VertScaleDialog makeVerticalRangeWidget(boolean visible)
visible
- true to be visiblepublic void changeVerticalScale(VertScaleInfo transfer)
changeVerticalRange(VertScaleInfo)
transfer
- vertical scale informationpublic void changeVerticalRange(VertScaleInfo transfer)
transfer
- vertical range informationprotected void applyVerticalScale(VertScaleInfo transfer) throws java.lang.Exception
applyVerticalRange(VertScaleInfo)
transfer
- The infojava.lang.Exception
- On badnessprotected void applyVerticalRange(VertScaleInfo transfer) throws java.lang.Exception
transfer
- The infojava.lang.Exception
- On badness