vmm.surface
Class SurfaceView

java.lang.Object
  extended by vmm.core.View
      extended by vmm.core3D.View3D
          extended by vmm.core3D.View3DWithLightSettings
              extended by vmm.core3D.View3DLit
                  extended by vmm.surface.SurfaceView
All Implemented Interfaces:
java.util.EventListener, javax.swing.event.ChangeListener, Decorateable, Parameterizable
Direct Known Subclasses:
WeierstrassMinimalSurface.WMSView

public class SurfaceView
extends View3DLit


Field Summary
protected  ActionRadioGroup gridSpacingSelect
          An array of 6 commmands that allow the user to select what fraction of grid lines are actually drawn.
protected  ToggleAction omitULineAction
          A command that allows the user to turn off grid lines in the u direction alltogether.
protected  ToggleAction omitVLineAction
          A command that allows the user to turn off grid lines in the v direction alltogether.
 
Fields inherited from class vmm.core3D.View3DLit
dragAsSurfaceToggle, NO_ORIENTATION, NORMAL_ORIENTATION, PATCH_RENDERING, REVERSE_ORIENTATION, selectColoredCommands, selectOrientationCommands, selectRenderingCommands, selectShadingCommands, setTransparencyCommand, WIREFRAME_RENDERING
 
Fields inherited from class vmm.core3D.View3DWithLightSettings
lightingEnabledToggle, lightSettingsCommand
 
Fields inherited from class vmm.core3D.View3D
CROSS_EYE_STEREO_VIEW, leftStereographOSI, MONOCULAR_VIEW, projectionCommands, RED_GREEN_STEREO_VIEW, rightStereographOSI, set3DViewOptionsAction, setViewpointAction, stereoComposite, STEREOGRAPH_VIEW, transform3D, viewStyleCommands
 
Fields inherited from class vmm.core.View
backgroundCommands, buildAnimation, buildingImageForFilmstrip, currentGraphics, decorations, directOffscreenDrawing, fullOSI, needsRedraw, offscreenImageType, parameters, showAxesAction
 
Constructor Summary
SurfaceView()
           
 
Method Summary
 ActionList getActions()
          Generates a list of "Action commands" that can be applied to this View.
 int getGridSpacing()
          Set the spacing between grid lines that are drawn.
 boolean getShowUGridLines()
          Tells whether grid lines are drawn in the U direction.
 boolean getShowVGridLines()
          Tells whether grid lines are drawn in the V direction.
 void setExhibit(Exhibit exhibit)
          This method is overridden to set the orientation of a Surface exhibit from the defaultOrientation property of the Surface.
 void setGridSpacing(int gridSpacing)
          Determines how many grid lines are actually drawn.
 void setShowUGridLines(boolean showUGridLines)
          Set whether grid lines are drawn in the U direction.
 void setShowVGridLines(boolean showVGridLines)
          Set whether grid lines are drawn in the V direction.
 
Methods inherited from class vmm.core3D.View3DLit
drawSurface, drawSurface, fillPolygon, getBlackAndWhite, getDragAsSurface, getOrientation, getPhongShading, getRenderingStyle, getSettingsCommands, getTransparency, getViewCommands, setBlackAndWhite, setDragAsSurface, setEnableThreeD, setOrientation, setPhongShading, setRenderingStyle, setTransparency, setViewStyle, takeExhibit
 
Methods inherited from class vmm.core3D.View3DWithLightSettings
addExtraXML, getLightingEnabled, getLightSettings, readExtraXML, setAnaglyphLightSettings, setLightingEnabled, setLightSettings, setNonAnaglyphLightSettings
 
Methods inherited from class vmm.core3D.View3D
clearOSI, clip, createAxes, createOSI, drawCollaredCurve, drawCollaredCurve, drawCollaredCurve, drawCurve, drawCurve, drawCurve, drawDot, drawLine, drawPixel, drawPixelDirect, drawPixels, drawString, drawWireframeSurface, finish, finishOSIDraw, finishStereoView, getDefaultMouseTask, getEnableThreeD, getOrthographicProjection, getSavedAuxiliaryTransformForEnableThreeD, getTransform3D, getViewPoint, getViewStyle, getViewUp, moveStereographImages, needsNewOSI, prepareOSIForDrawing, putOSI, setBackground, setDisplay, setOrthographicProjection, setSavedAuxiliaryTransformForEnableThreeD, setTransform, setUpForLeftEye, setUpForRightEye, setViewPoint, setViewUp, setWindowForUseWhileThreeDDisabled, stateChanged, stereographLeftEyeRect, stereographRightEyeRect
 
Methods inherited from class vmm.core.View
addDecoration, addParameter, beginDrawToOffscreenImage, clearDecorations, doDraw, drawCurve, drawCurve, drawCurve, drawDot, drawLine, drawLine, drawLineDirect, drawPixel, drawPixel, drawPixels, drawString, drawString, endDrawToOffscreenImage, fillRectDirect, forceRedraw, getActionsForViewAndExhibit, getAdditionalAnimations, getAdditionalAnimationsForViewAndExhibit, getAntialiased, getApplyGraphics2DTransform, getBackground, getColor, getDecorations, getDisplay, getExhibit, getFastDrawing, getForeground, getImage, getName, getParameterByName, getParameters, getPreserveAspect, getRequestedWindow, getSettingsCommandsForViewAndExhibit, getShowAxes, getStatusText, getTitle, getTransform, getViewAndExhibitParameters, getWindow, parameterChanged, removeDecoration, removeParameter, render, setAntialiased, setApplyGraphics2DTransform, setColor, setFastDrawing, setFastDrawing, setForeground, setName, setPreserveAspect, setShowAxes, setStrokeSizeMultiplier, setWindow, setWindow
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

omitULineAction

protected ToggleAction omitULineAction
A command that allows the user to turn off grid lines in the u direction alltogether. This is created in the getActions() method.


omitVLineAction

protected ToggleAction omitVLineAction
A command that allows the user to turn off grid lines in the v direction alltogether. This is created in the getActions() method.


gridSpacingSelect

protected ActionRadioGroup gridSpacingSelect
An array of 6 commmands that allow the user to select what fraction of grid lines are actually drawn. The default number is that a grid line is shown every 6 subpatches; that is, the boundaries of the patches are shown. These commands are created in the getActions() method.

Constructor Detail

SurfaceView

public SurfaceView()
Method Detail

setGridSpacing

public void setGridSpacing(int gridSpacing)
Determines how many grid lines are actually drawn. A grid line is drawn every gridSpacing subpatches in each direction of the grid, except that the final grid line is always drawn. If the value of gridSpacing is set to 0, then no grid lines are drawn along the surface; an exception is that when the surface is drawn in wireframe and gridSpacing is 0, grid lines are drawn.


getGridSpacing

public int getGridSpacing()
Set the spacing between grid lines that are drawn.

See Also:
setGridSpacing(int)

getShowUGridLines

public boolean getShowUGridLines()
Tells whether grid lines are drawn in the U direction.

See Also:
setShowUGridLines(boolean)

setShowUGridLines

public void setShowUGridLines(boolean showUGridLines)
Set whether grid lines are drawn in the U direction. If the value is set to false, no U grid lines are drawn. If it is set to true, grid lines are drawn, with the spacing between grid lines depending on the value set by setGridSpacing(int). (Wireframe mode is a special case in that some grid lines are drawn in wireframe mode, even if grid lines are turned off in both directions.)


getShowVGridLines

public boolean getShowVGridLines()
Tells whether grid lines are drawn in the V direction.

See Also:
setShowVGridLines(boolean)

setShowVGridLines

public void setShowVGridLines(boolean showVGridLines)
Set whether grid lines are drawn in the V direction. If the value is set to false, no V grid lines are drawn. If it is set to true, grid lines are drawn, with the spacing between grid lines depending on the value set by setGridSpacing(int). (Wireframe mode is a special case in that some grid lines are drawn in wireframe mode, even if grid lines are turned off in both directions.)


getActions

public ActionList getActions()
Description copied from class: View
Generates a list of "Action commands" that can be applied to this View. The commands must implement the ActionItem interface and will generally belong to one of the classes AbstractActionVMM, ToggleAction, ActionRadioGroup, or ActionList. Null items represent separators. The idea is that the list items will be added to a menu or otherwise presented to the user so that the user can invoke the commands (with ActionList items representing submenus). Null values can occur in the list; they are meant to become separaters in the menu.

Subclasses that override this method should generally call super.getActionss() and add their commands to the list retured by that method. This top-level View class does not define any Action commands; the return value is an empty non-null ArrayList.

Overrides:
getActions in class View

setExhibit

public void setExhibit(Exhibit exhibit)
This method is overridden to set the orientation of a Surface exhibit from the defaultOrientation property of the Surface.

Overrides:
setExhibit in class View3D
Parameters:
exhibit - The exhibit to be installed in this View. The value can be null. In that case, no Exhibit will be associated with the View after the method executes. If exhibit is already installed in this View, then no changes are made.
See Also:
Surface.setDefaultOrientation(int)