|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Object
|
+--java.awt.Component
|
+--java.awt.Container
|
+--javax.swing.JComponent
|
+--javax.swing.JPanel
|
+--MeshDemo
The Mesh Demo GUI code.
| Inner Class Summary | |
private static class |
MeshDemo.DrawingPanel
|
| Inner classes inherited from class javax.swing.JPanel |
JPanel.AccessibleJPanel |
| Inner classes inherited from class javax.swing.JComponent |
JComponent.AccessibleJComponent,
JComponent.IntVector,
JComponent.KeyboardBinding,
JComponent.KeyboardState |
| Inner classes inherited from class java.awt.Component |
Component.AWTTreeLock |
| Field Summary | |
private JButton |
btAbout
The "About" button. |
private JButton |
btCameraMoveDown
Move camera down. |
private JButton |
btCameraMoveIn
Move Camera in. |
private JButton |
btCameraMoveLeft
Move camera left. |
private JButton |
btCameraMoveOut
Move camera out. |
private JButton |
btCameraMoveRight
Move camera right. |
private JButton |
btCameraMoveUp
Move camera up. |
private JButton |
btCameraRotateDown
Rotate Camera down |
private JButton |
btCameraRotateLeft
Rotate camera left |
private JButton |
btCameraRotateRight
Rotate camera right. |
private JButton |
btCameraRotateUp
Rotate camera up |
private JButton |
btCameraTiltLeft
Tilt camera left |
private JButton |
btCameraTiltRight
Tilt camera right |
private JButton |
btCoorSysMoveDown
Move the coorsys down. |
private JButton |
btCoorSysMoveIn
Move the CoorSys in. |
private JButton |
btCoorSysMoveLeft
Move the CoorSys left. |
private JButton |
btCoorSysMoveOut
Move the CoorSys out. |
private JButton |
btCoorSysMoveRight
Move the CoorSys right. |
private JButton |
btCoorSysMoveUp
Move the CoorSys up. |
private JButton |
btCoorSysRotateDown
Rotate the CoorSys down. |
private JButton |
btCoorSysRotateLeft
Rotate the CoorSys left. |
private JButton |
btCoorSysRotateRight
Rotate the CoorSys right. |
private JButton |
btCoorSysRotateUp
Rotate the CoorSys up. |
private JButton |
btCoorSysTiltLeft
Tilt the CoorSys left. |
private JButton |
btCoorSysTiltRight
Tilt the CoorSys right. |
private JButton |
btRedraw
The "Redraw" button. |
private JButton |
btReload
The "Reload" button. |
private MeshDemo.DrawingPanel |
canvas
The drawing canvas to display rendered images. |
private File |
curFile
current file loaded |
private JLabel |
lbCoorSysRotate
The "Rotate ..." label. |
private JLabel |
lbCoorSysTranslate
The "Translate ..." label |
private JLabel |
lbCurCoorSysMatrix
the current coorsys matrix name |
private DefaultListModel |
lsmCoorSys
The list model of lstCoorsys |
private JTree |
lstCoorSys
The list of available CoorSys |
JMenuItem |
mnFileOpen
File|Open menu |
private JPanel |
pnCamera
The "Camera" panel. |
private JPanel |
pnCameraPos
The "Camera Position" panel |
private JPanel |
pnCameraView
The "Camera View" panel |
private JPanel |
pnCoorSys
The "CoorSys" panel |
private Renderer |
renderer
The renderer object |
private JTabbedPane |
rightTabs
The right tab pane |
private JLabel |
statusBar
the status bar |
private JTextField |
tfCameraMoveDelta
How far should one move be? |
private JTextField |
tfCameraRotateDelta
How far should the camera rotates (in degrees). |
private JTextField |
tfCoorSysMoveDelta
How far should the coorsys be moved at one click. |
private JTextField |
tfCoorSysRotateDelta
The rotation angle. |
private JToolBar |
toolBar
The bottom-right button bar. |
private JTextField[] |
txtCameraVPN
The camera VPN, [0] = x, [1] = y, [2] = z |
private JTextField[] |
txtCameraVRP
The camera VRP, [0] = x, [1] = y, [2] = z |
private JTextField[] |
txtCameraVUP
The camera VUP, [0] = x, [1] = y, [2] = z |
private JTextField[][] |
txtCoorSysMatrix
The matrix of CoorSys |
private WindowBoundaries |
windowBoundaries
The window boundaries |
| Fields inherited from class javax.swing.JPanel |
defaultLayout,
uiClassID |
| Fields inherited from class java.awt.Container |
component,
containerListener,
containerSerializedDataVersion,
dispatcher,
layoutMgr,
maxSize,
ncomponents,
serialVersionUID |
| Constructor Summary | |
MeshDemo()
Constructs the object, create child components. |
|
| Method Summary | |
void |
actionPerformed(ActionEvent e)
Handles action events by child components. |
private void |
coorSys_valueChanged()
Called when the selection in coorsys changes. |
private void |
displayCoorSys(String name)
Called to display a coordinate system on the panel. |
void |
doLoad(Reader r)
Loads a metafile. |
String |
getInfo()
Returns the copyright information. |
void |
keyPressed(KeyEvent e)
Responds to keyboard events. |
void |
keyReleased(KeyEvent e)
|
void |
keyTyped(KeyEvent e)
|
private void |
layoutComponents()
Creates and lays out child components. |
void |
loadCoorSys()
loads the lstCoorSys list |
static void |
main(String[] args)
Main function when run as an application. |
void |
moveCamera(double dx,
double dy,
double dz)
Translates the camera. |
void |
performAbout()
Displays name and copyright information. |
void |
performFileOpen()
Handles file open command. |
void |
performRedraw()
Handles redraw command. |
void |
performReload()
Handles the Reload command. |
void |
rotateCameraX(double degs)
Rotates the camera by the X axis. |
void |
rotateCameraY(double degs)
Rotates the camera by the Y axis. |
void |
rotateCameraZ(double degs)
Rotates the camera by the Z axis. |
void |
rotateCoorSysX(String name,
double degs)
Rotates a coordinate system by the X axis. |
void |
rotateCoorSysY(String name,
double degs)
Rotates a coordinate system by the Y axis. |
void |
rotateCoorSysZ(String name,
double degs)
Rotates a coordinate system by the Z axis. |
void |
setStatus(String s)
Sets the status. |
void |
translateCoorSys(String name,
double dx,
double dy,
double dz)
Translates a coordinate system. |
void |
valueChanged(TreeSelectionEvent e)
|
| Methods inherited from class javax.swing.JPanel |
|
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
registerNatives,
wait,
wait,
wait |
| Field Detail |
private File curFile
private WindowBoundaries windowBoundaries
private Renderer renderer
private JPanel pnCoorSys
public JMenuItem mnFileOpen
private JTextField[][] txtCoorSysMatrix
private JTree lstCoorSys
private DefaultListModel lsmCoorSys
lstCoorSysprivate JLabel lbCurCoorSysMatrix
private JTextField tfCoorSysMoveDelta
private JButton btCoorSysMoveDown
private JButton btCoorSysMoveUp
private JButton btCoorSysMoveLeft
private JButton btCoorSysMoveRight
private JButton btCoorSysMoveIn
private JButton btCoorSysMoveOut
private JTextField tfCoorSysRotateDelta
private JButton btCoorSysRotateLeft
private JButton btCoorSysRotateRight
private JButton btCoorSysRotateUp
private JButton btCoorSysRotateDown
private JButton btCoorSysTiltLeft
private JButton btCoorSysTiltRight
private JLabel lbCoorSysTranslate
private JLabel lbCoorSysRotate
private JPanel pnCamera
private JTextField[] txtCameraVRP
private JTextField[] txtCameraVUP
private JTextField[] txtCameraVPN
private JPanel pnCameraPos
private JButton btCameraMoveUp
private JButton btCameraMoveDown
private JButton btCameraMoveLeft
private JButton btCameraMoveRight
private JButton btCameraMoveIn
private JButton btCameraMoveOut
private JTextField tfCameraMoveDelta
private JPanel pnCameraView
private JButton btCameraRotateUp
private JButton btCameraRotateDown
private JButton btCameraRotateLeft
private JButton btCameraRotateRight
private JButton btCameraTiltLeft
private JButton btCameraTiltRight
private JTextField tfCameraRotateDelta
private MeshDemo.DrawingPanel canvas
private JTabbedPane rightTabs
private JLabel statusBar
private JToolBar toolBar
private JButton btRedraw
private JButton btReload
private JButton btAbout
| Constructor Detail |
public MeshDemo()
| Method Detail |
private void layoutComponents()
public String getInfo()
public void actionPerformed(ActionEvent e)
public void valueChanged(TreeSelectionEvent e)
public void keyPressed(KeyEvent e)
public void keyReleased(KeyEvent e)
public void keyTyped(KeyEvent e)
private void coorSys_valueChanged()
private void displayCoorSys(String name)
name - the name of the coordinate system.public void performFileOpen()
public void performRedraw()
public void performReload()
public void performAbout()
public void moveCamera(double dx,
double dy,
double dz)
dx - x-delta.dy - y-delta.dz - z-delta.public void rotateCameraX(double degs)
degs - the rotation angle, in degrees.public void rotateCameraY(double degs)
degs - the rotation angle, in degrees.public void rotateCameraZ(double degs)
degs - the rotation angle, in degrees.
public void translateCoorSys(String name,
double dx,
double dy,
double dz)
name - the coordinate system name.dx - x-delta.dy - y-delta.dz - z-delta.
public void rotateCoorSysX(String name,
double degs)
name - the coordinate system name.degs - the rotation angle, in degrees.
public void rotateCoorSysY(String name,
double degs)
name - the coordinate system name.degs - the rotation angle, in degrees.
public void rotateCoorSysZ(String name,
double degs)
name - the coordinate system name.degs - the rotation angle, in degrees.
public void doLoad(Reader r)
throws IOException
r - stream input for the metafile.public void setStatus(String s)
s - statuspublic void loadCoorSys()
public static void main(String[] args)
throws IOException
args - command-line arguments.
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||