|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
java.awt.Window
java.awt.Frame
javax.swing.JFrame
GridView.Viewer
public class Viewer
Viewer class that defines the main GUI window.
Viewer class is a part of the model - view - controller architechture that this software is based on. This class defines the main GUI window.
Nested Class Summary | |
---|---|
static class |
Viewer.CurrMode
Mode representing the current operation mode. |
static class |
Viewer.DrawMode
Mode representing the current drawing canvas type. |
Nested classes/interfaces inherited from class javax.swing.JFrame |
---|
javax.swing.JFrame.AccessibleJFrame |
Nested classes/interfaces inherited from class java.awt.Frame |
---|
java.awt.Frame.AccessibleAWTFrame |
Nested classes/interfaces inherited from class java.awt.Window |
---|
java.awt.Window.AccessibleAWTWindow |
Nested classes/interfaces inherited from class java.awt.Container |
---|
java.awt.Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary | |
---|---|
private boolean |
bSpecularShading
|
private double |
dCameraX
Postion of camera. |
private double |
dCameraY
|
private double |
dCameraZ
|
private double |
dXCenterOfProjection
Distance behind camera along X axis for center of projection. |
private double |
dYCenterOfProjection
Distance behind camera along Y axis for center of projection. |
private double |
dZCenterOfProjection
Center of projection behind the camera position. |
private int |
LINIT
|
private int |
LMAX
|
private int |
LMIN
Constants used in initializing JSlider values. |
private javax.swing.ButtonGroup |
m2DOpenNewPlotGroupBox
|
private java.util.ArrayList<javax.swing.JRadioButtonMenuItem> |
m2DPlotList
|
private TwoDPlotManager |
m2DPlotManager
|
private Plot2DPreferenceDialog |
m2DPlotPrefDlg
|
private javax.swing.JMenuItem |
m2DPlotPrefMItem
|
private javax.swing.ButtonGroup |
m2DPlotsGroupBox
|
private javax.swing.ButtonGroup |
m2DPlotTypeGroupBox
|
private ThreeDPlotter<java.lang.Float> |
m3DPlotCanvas
|
private javax.swing.JMenuItem |
mAboutMItem
|
private java.lang.String |
mAppTitle
Window title. |
private javax.swing.JRadioButtonMenuItem |
mAxonometricMItem
|
private javax.swing.JMenuItem |
mBackgroundColorMItem
|
private javax.swing.JPanel |
mBottomPanel
|
private DrawingCanvas |
mCanvas
|
private MyColorButton |
mColorButton
|
private Controller |
mController
This is the controller instance. |
private Viewer.CurrMode |
mCurrMode
Current mode. |
private javax.swing.JComboBox |
mCurrObjComboBox
|
private javax.swing.JButton |
mCutObjectButton
|
private javax.swing.JMenuItem |
mCutObjectMItem
|
private javax.swing.JScrollPane |
mDrawingAreaScrollPane
Scroll pane containing drawing area. |
private Viewer.DrawMode |
mDrawMode
Current drawing mode. |
private javax.swing.JButton |
mEditTextFileButton
|
private javax.swing.JMenuItem |
mEditTextFileMenu
|
private javax.swing.JComboBox |
mEntityColorComboBox
|
private javax.swing.JButton |
mExitButton
|
private javax.swing.JMenuItem |
mExitMItem
|
private javax.swing.JMenu |
mFileMenu
|
private javax.swing.JMenuItem |
mFileOpenMenu
|
private javax.swing.JRadioButtonMenuItem |
mFinancialMItem
|
private javax.swing.JMenuItem |
mFourierMItem
|
private javax.swing.JRadioButtonMenuItem |
mGeomViewMItem
|
private javax.swing.JRadioButtonMenuItem |
mGtsMItem
|
private javax.swing.JButton |
mHandButton
|
private javax.swing.JButton |
mHelpButton
|
private javax.swing.JMenu |
mHelpMenu
|
private javax.swing.JMenuItem |
mHelpTopicsMItem
|
private javax.swing.JRadioButtonMenuItem |
mHistogramMItem
|
private javax.swing.JButton |
mHomeButton
|
private float |
mLightIntensity
|
private javax.swing.JSlider |
mLightIntensitySlider
|
private javax.swing.JRadioButtonMenuItem |
mLinePlotMItem
|
private javax.swing.JPanel |
mMainPane
Main panel containing the drawing area, output panel, slider etc. |
private javax.swing.JMenuBar |
mMenuBar
Main menubar. |
private javax.swing.JTextField |
mMouseCoorTextField
|
private MovingAverage<java.lang.Float> |
mMovingAvgGenerator
|
private javax.swing.JMenuItem |
mMovingAvgMItem
|
private javax.swing.JRadioButtonMenuItem |
mNonMetallicReflectionMItem
|
private javax.swing.JRadioButtonMenuItem |
mOnePtPerspectiveViewMItem
|
private javax.swing.JButton |
mOpenButton
|
private javax.swing.JRadioButtonMenuItem |
mOpenInCurrPlotMItem
|
private javax.swing.JRadioButtonMenuItem |
mOpenInNewPlotMItem
|
private OutputPanel |
mOutPanel
|
private float |
mPanDistance
|
private javax.swing.JTextField |
mPanDistEdit
|
private javax.swing.JLabel |
mPanDistLabel
|
private javax.swing.JButton |
mPandownButton
|
private javax.swing.JMenuItem |
mPanDownMItem
|
private javax.swing.JButton |
mPanleftButton
|
private javax.swing.JMenuItem |
mPanLeftMItem
|
private javax.swing.JButton |
mPanrightButton
|
private javax.swing.JMenuItem |
mPanRightMItem
|
private javax.swing.JButton |
mPanupButton
|
private javax.swing.JMenuItem |
mPanUpMItem
|
private javax.swing.JRadioButtonMenuItem |
mPhongReflectionMItem
|
private javax.swing.JComboBox |
mPlotVarComboBox
|
private javax.swing.JLabel |
mPlotVarLabel
|
private javax.swing.JRadioButtonMenuItem |
mPmeshMItem
|
private javax.swing.JMenu |
mPreferencesMenu
|
private javax.swing.JProgressBar |
mProgressBar
|
private javax.swing.ButtonGroup |
mProjectionGroupBox
|
private javax.swing.JButton |
mQueryPointButton
|
private javax.swing.ButtonGroup |
mReflectionGroupBox
|
private javax.swing.JMenuItem |
mRemoveAllObjMItem
|
private javax.swing.JButton |
mRemoveObjectButton
|
private javax.swing.JMenuItem |
mRemoveObjMItem
|
private javax.swing.JButton |
mRulerButton
|
private MyColorButton |
mRulerColorButton
|
private javax.swing.JLabel |
mRulerColorLabel
|
private javax.swing.JMenuItem |
mRulerMItem
|
private javax.swing.JMenuItem |
mRulerPrefMItem
|
private javax.swing.JMenu |
mSaveAsMenu
|
private javax.swing.ButtonGroup |
mSaveAsRadioGroup
|
private javax.swing.JButton |
mSaveButton
|
private javax.swing.JButton |
mScientificModeButton
|
private javax.swing.JButton |
mScreenshotButton
|
private javax.swing.JMenuItem |
mScreenShotMenu
|
private javax.swing.JLabel |
mSetCurObjLabel
|
private javax.swing.JPanel |
mSliderEtcPanel
|
private javax.swing.JLabel |
mSliderLabel
|
private javax.swing.JButton |
mSurfaceButton
|
private javax.swing.JRadioButtonMenuItem |
mSurfaceOnlyMItem
|
private javax.swing.JRadioButtonMenuItem |
mSurfaceViewMItem
|
private javax.swing.JButton |
mThreeDPlotButton
|
private javax.swing.JRadioButtonMenuItem |
mThreePtPerspectiveViewMItem
|
private javax.swing.JButton |
mToggleGeomButton
|
private javax.swing.JToolBar |
mToolBar
|
private javax.swing.JMenu |
mToolsMenu
|
private javax.swing.JRadioButtonMenuItem |
mTrajectoryMovieMItem
|
private javax.swing.JRadioButtonMenuItem |
mTwoPtPerspectiveViewMItem
|
private javax.swing.JCheckBoxMenuItem |
mUniversalLightingMItem
|
private javax.swing.ButtonGroup |
mViewGroupBox
|
private javax.swing.JMenu |
mViewMenu
|
private javax.swing.JRadioButtonMenuItem |
mVrml2MItem
|
private javax.swing.JButton |
mWhatsThisButton
|
private javax.swing.JMenuItem |
mWhatsThisMItem
|
private javax.swing.JButton |
mWireframeButton
|
private javax.swing.JRadioButtonMenuItem |
mWireframeViewMItem
|
private javax.swing.JButton |
mZoominButton
|
private javax.swing.JMenuItem |
mZoomInMItem
|
private javax.swing.JButton |
mZoomoutButton
|
private javax.swing.JMenuItem |
mZoomOutMItem
|
Fields inherited from class javax.swing.JFrame |
---|
accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled |
Fields inherited from class java.awt.Frame |
---|
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface javax.swing.WindowConstants |
---|
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
Viewer()
Class constructor that creates and displays the Viewer. |
Method Summary | |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent ae)
Method that gets called for objects implementing ActionListener. |
private javax.swing.JRadioButtonMenuItem |
AddPlotMenuItem()
|
void |
AddToColorComboBox(java.lang.String smallFileName)
Add object surface and edge color options to the color combo box. |
void |
AddToCurrObjComboBox(java.lang.String smallFileName)
Add object to the object list from where it can be specified as the current object. |
private void |
ButtonColorChanged()
Color has been changed in color choose button. |
void |
caretUpdate(javax.swing.event.CaretEvent e)
Caret event listener code. |
void |
ChangeDrawingPane(java.awt.Container drawContainer,
Viewer.DrawMode newDrawMode)
|
void |
componentHidden(java.awt.event.ComponentEvent e)
|
void |
componentMoved(java.awt.event.ComponentEvent e)
|
void |
componentResized(java.awt.event.ComponentEvent e)
|
void |
componentShown(java.awt.event.ComponentEvent e)
|
private void |
CreateDrawingCanvas()
Create the drawing canvas (used for drawing stuff). |
static java.awt.Image |
createImage(java.lang.String name)
Create an image from image file name. |
static javax.swing.ImageIcon |
createImageIcon(java.lang.String name)
Returns an ImageIcon, or null if the file name was invalid. |
private void |
CreateLightIntensitySliderAndLabel()
Create the light intensity adjusting slider and label. |
private void |
CreateMenuBar()
Create the menu bar, instance stored in mMenuBar. |
private javax.swing.JMenu |
CreateNewJMenu(java.lang.String title,
int mnemonic,
java.lang.String description)
Creates and reaturns a new JMenu with specified title, description, and mnemonic (accelerator). |
private void |
CreateSliderPanel()
Creates the panel that holds slider (light intensity), label for intensity slider, color setting combo box and control, and boxes for setting near plane, far plane, bottom plane, up plane, right plane and left plane (defining the viewing volume). |
private void |
CreateToolBar()
Create a tool bar. |
private javax.swing.JButton |
CreateToolbarButton(java.lang.String imageName,
java.lang.String actionCommand,
java.lang.String toolTipText,
java.lang.String altText)
Create a tool bar button. |
void |
DeleteCurrObj()
Delete the current object (current selection from current object combo box). |
boolean |
DeleteFromColorComboBox(java.lang.String smallFileName)
Delete entries corresponding to an objet from color combo box. |
private void |
DrawAxonometricView()
Draws axonometric view (foreshortening along axes depends on viewing direction. |
private void |
DrawOnePointPerspectiveView()
Draws one point perspective view of the current scene. |
private void |
DrawThreePointPerspectiveView()
Draws three point perspective view of the current scene. |
private void |
DrawTwoPointPerspectiveView()
Draws two point perspective view of the current scene. |
private void |
FourierTransform(TwoDPlotter<java.lang.Float> plot)
|
private void |
GenerateMovingAvg(TwoDPlotter<java.lang.Float> plot)
|
void |
GetCameraCenterProj(float[] centerProj)
|
void |
GetCameraPos(float[] cameraPos)
|
Viewer.DrawMode |
GetCurrentDrawMode()
|
Viewer.CurrMode |
GetCurrentViewerMode()
|
OutputPanel |
GetOutputPanel()
Gets the output panel used for output messages shown on viewer. |
private void |
GetPhongExponent()
|
boolean |
IsSpecularShading()
|
void |
itemStateChanged(java.awt.event.ItemEvent e)
Respond to the color combo box item changed events. |
static void |
launchGUI()
Launches the GUI. |
float |
LightIntensity()
|
private void |
OpenFile()
Bring up a dialog to open a file. |
private void |
RemovePlotMenuItem(int plotIndex)
|
void |
ReportMouseCoor(int x,
int y)
Print mouse coordinates on JTextField (status bar). |
private void |
RulerColorChanged()
Bring up a dialog to choose line color, proceed accordingly. |
private void |
SaveFile()
|
private void |
SerializeAndExit()
|
static void |
showWindow(java.lang.String[] args)
Shows the window after creating the GUI. |
int |
SpecularExponent()
Get specular exponent, currently hardcoded to 5. |
void |
stateChanged(javax.swing.event.ChangeEvent e)
Listen to the slider stateChanged event. |
private void |
UpdateDrawMode()
Update the button state depending upon the current value of drawing mode (mDrawMode). |
private void |
UpdateMode()
Update the button state depending upon the current value of mode (mCurrMode). |
void |
windowActivated(java.awt.event.WindowEvent e)
|
void |
windowClosed(java.awt.event.WindowEvent e)
|
void |
windowClosing(java.awt.event.WindowEvent e)
|
void |
windowDeactivated(java.awt.event.WindowEvent e)
|
void |
windowDeiconified(java.awt.event.WindowEvent e)
|
void |
windowIconified(java.awt.event.WindowEvent e)
|
void |
windowOpened(java.awt.event.WindowEvent e)
|
Methods inherited from class javax.swing.JFrame |
---|
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update |
Methods inherited from class java.awt.Frame |
---|
addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setResizable, setState, setTitle, setUndecorated |
Methods inherited from class java.awt.Window |
---|
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOwnedWindows, getOwner, getOwnerlessWindows, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isShowing, pack, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setVisible, show, toBack, toFront |
Methods inherited from class java.awt.Container |
---|
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusBackward, transferFocusDownCycle, validate, validateTree |
Methods inherited from class java.awt.Component |
---|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, setBackground, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.awt.MenuContainer |
---|
getFont, postEvent |
Field Detail |
---|
private Controller mController
private javax.swing.JPanel mMainPane
private java.lang.String mAppTitle
private javax.swing.JScrollPane mDrawingAreaScrollPane
private javax.swing.JMenuBar mMenuBar
private final int LMIN
mLightIntensitySlider
,
Constant Field Valuesprivate final int LMAX
private final int LINIT
private float mLightIntensity
private javax.swing.JMenu mFileMenu
private javax.swing.JMenu mViewMenu
private javax.swing.JMenu mToolsMenu
private javax.swing.JMenu mPreferencesMenu
private javax.swing.JMenu mHelpMenu
private javax.swing.JMenuItem mFileOpenMenu
private javax.swing.JMenuItem mEditTextFileMenu
private javax.swing.JMenuItem mScreenShotMenu
private javax.swing.JMenu mSaveAsMenu
private javax.swing.ButtonGroup mSaveAsRadioGroup
private javax.swing.JRadioButtonMenuItem mPmeshMItem
private javax.swing.JRadioButtonMenuItem mGtsMItem
private javax.swing.JRadioButtonMenuItem mGeomViewMItem
private javax.swing.JRadioButtonMenuItem mVrml2MItem
private javax.swing.JMenuItem mRemoveObjMItem
private javax.swing.JMenuItem mRemoveAllObjMItem
private javax.swing.JMenuItem mExitMItem
private javax.swing.ButtonGroup mViewGroupBox
private javax.swing.JRadioButtonMenuItem mWireframeViewMItem
private javax.swing.JRadioButtonMenuItem mSurfaceViewMItem
private javax.swing.JRadioButtonMenuItem mSurfaceOnlyMItem
private javax.swing.JRadioButtonMenuItem mTrajectoryMovieMItem
private javax.swing.JCheckBoxMenuItem mUniversalLightingMItem
private javax.swing.ButtonGroup mReflectionGroupBox
private javax.swing.JRadioButtonMenuItem mPhongReflectionMItem
private javax.swing.JRadioButtonMenuItem mNonMetallicReflectionMItem
private javax.swing.ButtonGroup mProjectionGroupBox
private javax.swing.JRadioButtonMenuItem mAxonometricMItem
private javax.swing.JRadioButtonMenuItem mOnePtPerspectiveViewMItem
private javax.swing.JRadioButtonMenuItem mTwoPtPerspectiveViewMItem
private javax.swing.JRadioButtonMenuItem mThreePtPerspectiveViewMItem
private javax.swing.JMenuItem mCutObjectMItem
private javax.swing.JMenuItem mZoomOutMItem
private javax.swing.JMenuItem mZoomInMItem
private javax.swing.JMenuItem mPanLeftMItem
private javax.swing.JMenuItem mPanRightMItem
private javax.swing.JMenuItem mPanUpMItem
private javax.swing.JMenuItem mPanDownMItem
private javax.swing.JMenuItem mRulerMItem
private javax.swing.JMenuItem mFourierMItem
private javax.swing.JMenuItem mMovingAvgMItem
private javax.swing.JMenuItem mBackgroundColorMItem
private javax.swing.JMenuItem mRulerPrefMItem
private javax.swing.JMenuItem m2DPlotPrefMItem
private javax.swing.JMenuItem mAboutMItem
private javax.swing.JMenuItem mHelpTopicsMItem
private javax.swing.JMenuItem mWhatsThisMItem
private javax.swing.JToolBar mToolBar
private javax.swing.JButton mOpenButton
private javax.swing.JButton mSaveButton
private javax.swing.JButton mEditTextFileButton
private javax.swing.JButton mScreenshotButton
private javax.swing.JButton mHomeButton
private javax.swing.JButton mRemoveObjectButton
private javax.swing.JButton mCutObjectButton
private javax.swing.JButton mZoominButton
private javax.swing.JButton mZoomoutButton
private javax.swing.JButton mRulerButton
private javax.swing.JButton mWireframeButton
private javax.swing.JButton mSurfaceButton
private javax.swing.JButton mToggleGeomButton
private javax.swing.JButton mScientificModeButton
private javax.swing.JButton mThreeDPlotButton
private javax.swing.JButton mHandButton
private javax.swing.JButton mQueryPointButton
private javax.swing.JButton mPanupButton
private javax.swing.JButton mPandownButton
private javax.swing.JButton mPanleftButton
private javax.swing.JButton mPanrightButton
private javax.swing.JButton mWhatsThisButton
private javax.swing.JButton mHelpButton
private javax.swing.JButton mExitButton
private boolean bSpecularShading
private double dZCenterOfProjection
private double dYCenterOfProjection
private double dXCenterOfProjection
private double dCameraX
private double dCameraY
private double dCameraZ
private Viewer.CurrMode mCurrMode
Viewer.CurrMode
private Viewer.DrawMode mDrawMode
Viewer.DrawMode
private javax.swing.JSlider mLightIntensitySlider
private javax.swing.JLabel mSliderLabel
private DrawingCanvas mCanvas
private TwoDPlotManager m2DPlotManager
private ThreeDPlotter<java.lang.Float> m3DPlotCanvas
private MovingAverage<java.lang.Float> mMovingAvgGenerator
private OutputPanel mOutPanel
private Plot2DPreferenceDialog m2DPlotPrefDlg
private javax.swing.JPanel mBottomPanel
private javax.swing.JTextField mMouseCoorTextField
private javax.swing.JProgressBar mProgressBar
private javax.swing.JPanel mSliderEtcPanel
private javax.swing.JLabel mSetCurObjLabel
private javax.swing.JComboBox mEntityColorComboBox
private MyColorButton mColorButton
private javax.swing.JComboBox mCurrObjComboBox
private javax.swing.JLabel mPlotVarLabel
private javax.swing.JComboBox mPlotVarComboBox
private javax.swing.JLabel mPanDistLabel
private javax.swing.JTextField mPanDistEdit
private javax.swing.JLabel mRulerColorLabel
private MyColorButton mRulerColorButton
private float mPanDistance
private javax.swing.ButtonGroup m2DPlotTypeGroupBox
private javax.swing.JRadioButtonMenuItem mLinePlotMItem
private javax.swing.JRadioButtonMenuItem mHistogramMItem
private javax.swing.JRadioButtonMenuItem mFinancialMItem
private javax.swing.ButtonGroup m2DOpenNewPlotGroupBox
private javax.swing.JRadioButtonMenuItem mOpenInNewPlotMItem
private javax.swing.JRadioButtonMenuItem mOpenInCurrPlotMItem
private javax.swing.ButtonGroup m2DPlotsGroupBox
private java.util.ArrayList<javax.swing.JRadioButtonMenuItem> m2DPlotList
Constructor Detail |
---|
public Viewer()
OutputPanel
,
DrawingCanvas
Method Detail |
---|
public OutputPanel GetOutputPanel()
OutputPanel
public void ChangeDrawingPane(java.awt.Container drawContainer, Viewer.DrawMode newDrawMode)
private void UpdateMode()
mCurrMode
private void UpdateDrawMode()
mDrawMode
,
Viewer.DrawMode
public Viewer.CurrMode GetCurrentViewerMode()
public Viewer.DrawMode GetCurrentDrawMode()
private void CreateSliderPanel()
public void AddToColorComboBox(java.lang.String smallFileName)
AddToColorComboBox
in interface ViewerInterface
smallFileName
- The last part of file name. Eg /path/file.gts
becomes file.gtsmEntityColorComboBox
public boolean DeleteFromColorComboBox(java.lang.String smallFileName)
smallFileName
- The last part of file name. Eg /path/file.gts
becomes file.gts. If the file name is empty, deletes the last
loaded object from combo list.
mEntityColorComboBox
public void AddToCurrObjComboBox(java.lang.String smallFileName)
smallFileName
- The last part of file name corresponding
to the object. Eg /path/file.gts becomes file.gtsmCurrObjComboBox
public void DeleteCurrObj()
private void CreateDrawingCanvas()
DrawingCanvas
,
mCanvas
private void CreateLightIntensitySliderAndLabel()
DrawingCanvas
,
mLightIntensitySlider
,
mSliderLabel
private void DrawOnePointPerspectiveView()
private void DrawTwoPointPerspectiveView()
private void DrawThreePointPerspectiveView()
public void GetCameraCenterProj(float[] centerProj)
public void GetCameraPos(float[] cameraPos)
private void DrawAxonometricView()
private javax.swing.JMenu CreateNewJMenu(java.lang.String title, int mnemonic, java.lang.String description)
title
- JMenu labelmnemonic
- JMenu hot key (accelerator).description
- Description for use with assistive devices.
private javax.swing.JButton CreateToolbarButton(java.lang.String imageName, java.lang.String actionCommand, java.lang.String toolTipText, java.lang.String altText)
imageName
- Name of image file (must be in resource subdirectory).actionCommand
- String identifying the button.toolTipText
- Tool tipaltText
- text to show if icon is not available.private void CreateToolBar()
private void CreateMenuBar()
mMenuBar
private void OpenFile()
private void SaveFile()
private void GetPhongExponent()
private void ButtonColorChanged()
private void RulerColorChanged()
public float LightIntensity()
public int SpecularExponent()
public boolean IsSpecularShading()
public void caretUpdate(javax.swing.event.CaretEvent e)
caretUpdate
in interface javax.swing.event.CaretListener
e
- CaretEventprivate void FourierTransform(TwoDPlotter<java.lang.Float> plot)
private void GenerateMovingAvg(TwoDPlotter<java.lang.Float> plot)
public void actionPerformed(java.awt.event.ActionEvent ae)
actionPerformed
in interface java.awt.event.ActionListener
ae
- Action event instance.private void RemovePlotMenuItem(int plotIndex)
private javax.swing.JRadioButtonMenuItem AddPlotMenuItem()
public void itemStateChanged(java.awt.event.ItemEvent e)
itemStateChanged
in interface java.awt.event.ItemListener
e
- ItemEventmEntityColorComboBox
public void stateChanged(javax.swing.event.ChangeEvent e)
stateChanged
in interface javax.swing.event.ChangeListener
e
- ChangeEventmLightIntensitySlider
public void windowActivated(java.awt.event.WindowEvent e)
windowActivated
in interface java.awt.event.WindowListener
public void windowClosed(java.awt.event.WindowEvent e)
windowClosed
in interface java.awt.event.WindowListener
private void SerializeAndExit()
public void windowClosing(java.awt.event.WindowEvent e)
windowClosing
in interface java.awt.event.WindowListener
public void windowDeactivated(java.awt.event.WindowEvent e)
windowDeactivated
in interface java.awt.event.WindowListener
public void windowDeiconified(java.awt.event.WindowEvent e)
windowDeiconified
in interface java.awt.event.WindowListener
public void windowIconified(java.awt.event.WindowEvent e)
windowIconified
in interface java.awt.event.WindowListener
public void windowOpened(java.awt.event.WindowEvent e)
windowOpened
in interface java.awt.event.WindowListener
public void componentHidden(java.awt.event.ComponentEvent e)
componentHidden
in interface java.awt.event.ComponentListener
public void componentShown(java.awt.event.ComponentEvent e)
componentShown
in interface java.awt.event.ComponentListener
public void componentResized(java.awt.event.ComponentEvent e)
componentResized
in interface java.awt.event.ComponentListener
public void componentMoved(java.awt.event.ComponentEvent e)
componentMoved
in interface java.awt.event.ComponentListener
public void ReportMouseCoor(int x, int y)
x
- Mouse x coordinate.y
- Mouse y coordinate.DrawingCanvas.mouseMoved(MouseEvent)
public static java.awt.Image createImage(java.lang.String name)
Assumes the file is present in resource subdirectory with specified file name. This is necessary for constructing a system independent file path that will work on any platform.
name
- Name of file from which to generate the image.
public static javax.swing.ImageIcon createImageIcon(java.lang.String name)
File name must be the name of the file (no path). This file must be located in resource directory of the distribution. This is essential to be able to write out the file name in a platform independent style.
name
- File name containing the picture (must be in resource
directory).
public static void launchGUI()
The method tries to set the look and feel of the GUI to the system compatible look and feel. If that is unavailable, it uses the cross platform look and feel.
public static void showWindow(java.lang.String[] args)
args
- Arguments passed to the method. Currently des not use
any supplied ommand line arguments.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |