public class SimpleFrame
extends javax.swing.JFrame
javax.swing.JFrame.AccessibleJFrame
java.awt.Window.AccessibleAWTWindow, java.awt.Window.Type
accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled
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
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Constructor and Description |
---|
SimpleFrame()
Constructs a simple frame with default parameters.
|
SimpleFrame(AxesOrientation ao)
Constructs a simple frame with specified axes orientation.
|
SimpleFrame(World world)
Constructs a simple frame with the specified world.
|
SimpleFrame(World world,
AxesOrientation ao)
Constructs a simple frame with the specified world and orientation.
|
Modifier and Type | Method and Description |
---|---|
ImagePanelGroup |
addImagePanels(float[][][] f)
Adds an image panel group to a simple frame from a given 3D array
|
ImagePanelGroup |
addImagePanels(ImagePanelGroup ipg)
Adds an image panel group to a simple frame from a given image panel
group.
|
ImagePanelGroup |
addImagePanels(Sampling s1,
Sampling s2,
Sampling s3,
float[][][] f)
Adds an image panel group to a simple frame from given samplings and
a 3D array.
|
TriangleGroup |
addTriangles(float[] xyz)
Adds a triangle group with specified vertex coordinates.
|
TriangleGroup |
addTriangles(float[] xyz,
float[] rgb)
Adds a triangle group with specified vertex coordinates and colors.
|
TriangleGroup |
addTriangles(Sampling sx,
Sampling sy,
float[][] z)
Adds a triangle group for a sampled function z = f(x,y).
|
TriangleGroup |
addTriangles(TriangleGroup tg)
Adds a triangle group to a simple frame from a given triangle group.
|
static SimpleFrame |
asImagePanels(float[][][] f)
Returns a new simple frame with an image panel group.
|
static SimpleFrame |
asImagePanels(ImagePanelGroup ipg)
Returns a new simple frame with an image panel group.
|
static SimpleFrame |
asImagePanels(Sampling s1,
Sampling s2,
Sampling s3,
float[][][] f)
Returns a new simple frame with an image panel group.
|
static SimpleFrame |
asTriangles(boolean vn,
float[] xyz)
Returns a new simple frame with a triangle group.
|
static SimpleFrame |
asTriangles(boolean vn,
float[] xyz,
float[] rgb)
Returns a new simple frame with a triangle group.
|
SimpleFrame |
asTriangles(boolean vn,
Sampling sx,
Sampling sy,
float[][] z)
Returns a new simple frame with a triangle group.
|
SimpleFrame |
asTriangles(boolean vn,
Sampling sx,
Sampling sy,
float[][] z,
float[][] r,
float[][] g,
float[][] b)
Returns a new simple frame with a triangle group.
|
static SimpleFrame |
asTriangles(float[] xyz)
Returns a new simple frame with a triangle group.
|
static SimpleFrame |
asTriangles(float[] xyz,
float[] rgb)
Returns a new simple frame with a triangle group.
|
static SimpleFrame |
asTriangles(TriangleGroup tg)
Returns a new simple frame with a triangle group.
|
javax.swing.JToolBar |
getJToolBar()
Gets the JToolBar for this simple frame.
|
ModeManager |
getModeManager()
Gets the mode manager for this simple frame.
|
OrbitView |
getOrbitView()
Gets the orbit view for this frame.
|
ViewCanvas |
getViewCanvas()
Gets the view canvas for this frame.
|
World |
getWorld()
Gets the world for this frame.
|
void |
paintToFile(java.lang.String fileName)
Paints the view canvas to an image in a file with specified name.
|
void |
setWorldSphere(BoundingSphere bs)
Sets the bounding sphere of the frame.
|
void |
setWorldSphere(double x,
double y,
double z,
double r)
Sets the bounding sphere of the frame with a given center x, y, z and
radius.
|
void |
setWorldSphere(double xmin,
double ymin,
double zmin,
double xmax,
double ymax,
double zmax)
Sets the bounding sphere of the frame.
|
void |
setWorldSphere(Point3 p,
int r)
Sets the bounding sphere of the frame with a given center point and
radius.
|
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
addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setBackground, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setOpacity, setResizable, setShape, setState, setTitle, setUndecorated
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBackground, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOpacity, getOwnedWindows, getOwner, getOwnerlessWindows, getShape, getToolkit, getType, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isAutoRequestFocus, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isOpaque, isShowing, isValidateRoot, pack, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setAutoRequestFocus, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocation, setLocation, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setType, setVisible, show, toBack, toFront
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, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusDownCycle, validate, validateTree
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, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, 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, 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, revalidate, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
public SimpleFrame()
public SimpleFrame(AxesOrientation ao)
ao
- the axes orientation.public SimpleFrame(World world)
world
- the world view.public SimpleFrame(World world, AxesOrientation ao)
world
- the world view.ao
- the axes orientation.public ModeManager getModeManager()
public javax.swing.JToolBar getJToolBar()
public static SimpleFrame asTriangles(float[] xyz)
xyz
- array of packed vertex coordinates.public static SimpleFrame asTriangles(boolean vn, float[] xyz)
vn
- true, for vertex normals; false, for triangle normals.xyz
- array of packed vertex coordinates.public static SimpleFrame asTriangles(float[] xyz, float[] rgb)
xyz
- array of packed vertex coordinates.rgb
- array of packed color coordinates.public SimpleFrame asTriangles(boolean vn, Sampling sx, Sampling sy, float[][] z)
vn
- true, for vertex normals; false, for triangle normals.sx
- sampling of x coordinates; may be non-uniform.sy
- sampling of y coordinates; may be non-uniform.z
- array[nx][ny] of z coordinates z = f(x,y).public SimpleFrame asTriangles(boolean vn, Sampling sx, Sampling sy, float[][] z, float[][] r, float[][] g, float[][] b)
vn
- true, for vertex normals; false, for triangle normals.sx
- sampling of x coordinates; may be non-uniform.sy
- sampling of y coordinates; may be non-uniform.z
- array[nx][ny] of z coordinates z = f(x,y).r
- array[nx][ny] of red color components.g
- array[nx][ny] of green color components.b
- array[nx][ny] of blue color components.public static SimpleFrame asTriangles(boolean vn, float[] xyz, float[] rgb)
vn
- true, for vertex normals; false, for triangle normalsxyz
- array of packed vertex coordinates.rgb
- array of packed color coordinates.public static SimpleFrame asTriangles(TriangleGroup tg)
tg
- a triangle group.public static SimpleFrame asImagePanels(float[][][] f)
f
- a 3D array.public static SimpleFrame asImagePanels(Sampling s1, Sampling s2, Sampling s3, float[][][] f)
s1
- sampling in the 1st dimension (Z).s2
- sampling in the 2nd dimension (Y).s3
- sampling in the 3rd dimension (X).f
- a 3D array.public static SimpleFrame asImagePanels(ImagePanelGroup ipg)
ipg
- an image panel group.public TriangleGroup addTriangles(float[] xyz)
xyz
- array of packed vertex coordinates.public TriangleGroup addTriangles(float[] xyz, float[] rgb)
xyz
- array of packed vertex coordinates.rgb
- array of packed color components.public TriangleGroup addTriangles(Sampling sx, Sampling sy, float[][] z)
sx
- sampling of x coordinates; may be non-uniform.sy
- sampling of y coordinates; may be non-uniform.z
- array[nx][ny] of z coordinates z = f(x,y).public TriangleGroup addTriangles(TriangleGroup tg)
tg
- a triangle group.public ImagePanelGroup addImagePanels(float[][][] f)
f
- a 3D array.public ImagePanelGroup addImagePanels(Sampling s1, Sampling s2, Sampling s3, float[][][] f)
s1
- sampling in the 1st dimension (Z).s2
- sampling in the 2nd dimension (Y).s3
- sampling in the 3rd dimension (X).f
- a 3D array.public ImagePanelGroup addImagePanels(ImagePanelGroup ipg)
ipg
- an image panel group.public ViewCanvas getViewCanvas()
public OrbitView getOrbitView()
public World getWorld()
public void setWorldSphere(Point3 p, int r)
p
- the center point.r
- the radius.public void setWorldSphere(double x, double y, double z, double r)
x
- the center X-coordinate.y
- the center Y-coordinate.z
- the center Z-coordinate.r
- the radius.public void setWorldSphere(double xmin, double ymin, double zmin, double xmax, double ymax, double zmax)
xmin
- the minimum x coordinate.ymin
- the minimum y coordinate.zmin
- the minimum z coordinate.xmax
- the maximum x coordinate.ymax
- the maximum y coordinate.zmax
- the maximum z coordinate.public void setWorldSphere(BoundingSphere bs)
bs
- the bounding sphere.public void paintToFile(java.lang.String fileName)
fileName
- name of the file to contain the image.