jhplot
Class HView3D
- java.lang.Object
-
- jhplot.gui.GHPanel
-
- jhplot.gui.GHFrame
-
- jhplot.HView3D
-
- All Implemented Interfaces:
- java.awt.event.ComponentListener, java.io.Serializable, java.util.EventListener
public class HView3D extends GHFrame
Create a frame for showing 3D objects- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field and Description boolean
set
-
Constructor Summary
Constructors Constructor and Description HView3D()
Construct a HGraph canvas with a plot with the default parameters 600 by 400, and 10% space for the global title "Default"HView3D(java.lang.String title)
Construct a HGraph canvas with a plot with the default parameters 600 by 400, and 10% space for the global titleHView3D(java.lang.String title, int xs, int ys)
Construct a HView3D canvas with a single plot/graphHView3D(java.lang.String title, int xs, int ys, boolean set)
Construct a HView3D canvas with a single plot/graphHView3D(java.lang.String title, int xs, int ys, int n1, int n2)
Construct a HView3D canvas with plots/graphsHView3D(java.lang.String title, int xsize, int ysize, int n1, int n2, boolean set)
Create a HView3D canvas with several plots showing 3D shapes
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description void
clear()
Clear the current graph including graph settings.void
clear(int i1, int i2)
Clear the graph characterized by an index in X and Y.void
clearAll()
Clear all graphs from data and settings.void
close()
Close the canvas (and dispose all components) Note: a memory leak is found - no time to study it.void
destroy()
Destroy the canvas framevoid
doc()
Show online documentation.void
draw(Object3d object)
Draw an object.Model3d
getModel()
Get the current model to build a object.void
quit()
void
setMove(double x, double y, double z)
Move the current plotvoid
setRotate(double x, double y, double z)
Rotate the current plotvoid
setZoomIn(double zoom)
Zoom in the current plot.void
setZoomOut(double zoom)
Zoom out the current plot.void
update()
Just update the current plot selected using cd() methodvoid
update(int n1, int n2)
Refresh only a particular plotvoid
updateAll()
Refresh all the plots on the same canvas HPLOTvoid
visible()
Set the canvas frame visiblevoid
visible(boolean vs)
Set the canvas frame visible or not-
Methods inherited from class jhplot.gui.GHFrame
addGraph, cd, componentHidden, componentMoved, componentShown, getCdX, getCdY, getFrame, getHTMLUrl, getNtotX, getNtotY, setPlotsNum, updateFrame
-
Methods inherited from class jhplot.gui.GHPanel
addComp, componentResized, convertSVG, convertSVG, disableDoubleBuffering, enableDoubleBuffering, export, getCanvasPanel, getMarginBackground, getMarginPanelBottom, getMarginPanelCenter, getMarginPanelLeft, getMarginPanelRight, getMarginPanelTop, getMarginSizeBottom, getMarginSizeLeft, getMarginSizeRight, getMarginSizeTop, getSizeX, getSizeY, getTextBottom, getTextBottomColor, getTextBottomColorBack, getTextBottomFont, getTextLeft, getTextLeftColor, getTextLeftColorBack, getTextLeftFont, getTextPosBottomX, getTextPosBottomY, getTextPosLeftX, getTextPosLeftY, getTextPosRightX, getTextPosRightY, getTextPosTopX, getTextPosTopY, getTextRight, getTextRightColor, getTextRightColorBack, getTextRightFont, getTextRotationBottom, getTextRotationLeft, getTextRotationRight, getTextRotationTop, getTextTop, getTextTopColor, getTextTopColorBack, getTextTopFont, isBorderShown, printGraph, resetMargins, setGTitle, setGTitle, setGTitle, setGTitle, setGTitle, setMarginBackground, setMarginSizeBottom, setMarginSizeLeft, setMarginSizeRight, setMarginSizeTop, setSizePanel, setTextBottom, setTextBottom, setTextBottom, setTextBottom, setTextBottomColorBack, setTextLeft, setTextLeft, setTextLeft, setTextLeft, setTextLeftColorBack, setTextPosBottomX, setTextPosBottomY, setTextPosLeftX, setTextPosLeftY, setTextPosRightX, setTextPosRightY, setTextPosTopX, setTextPosTopY, setTextRight, setTextRight, setTextRight, setTextRight, setTextRightColorBack, setTextRotationBottom, setTextRotationLeft, setTextRotationRight, setTextRotationTop, setTextTop, setTextTop, setTextTop, setTextTopColorBack, showBorders
-
-
-
-
Constructor Detail
-
HView3D
public HView3D(java.lang.String title, int xsize, int ysize, int n1, int n2, boolean set)
Create a HView3D canvas with several plots showing 3D shapes- Parameters:
title
- Titlexsize
- size in x directionysize
- size in y directionn1
- number of plots/graphs in xn2
- number of plots/graphs in yset
- set or not the graph
-
HView3D
public HView3D(java.lang.String title, int xs, int ys)
Construct a HView3D canvas with a single plot/graph- Parameters:
title
- Title for the canvasxs
- size in xys
- size in y
-
HView3D
public HView3D(java.lang.String title, int xs, int ys, boolean set)
Construct a HView3D canvas with a single plot/graph- Parameters:
title
- Title for the canvasxs
- size in xys
- size in yset
- set or not the graph (boolean)
-
HView3D
public HView3D(java.lang.String title, int xs, int ys, int n1, int n2)
Construct a HView3D canvas with plots/graphs- Parameters:
title
- Title for the canvasxs
- size in xys
- size in yn1
- number of plots/graphs in xn2
- number of plots/graphs in y
-
HView3D
public HView3D(java.lang.String title)
Construct a HGraph canvas with a plot with the default parameters 600 by 400, and 10% space for the global title- Parameters:
title
- Title
-
HView3D
public HView3D()
Construct a HGraph canvas with a plot with the default parameters 600 by 400, and 10% space for the global title "Default"
-
-
Method Detail
-
visible
public void visible(boolean vs)
Set the canvas frame visible or not- Parameters:
vs
- (boolean) true: visible, false: not visible
-
visible
public void visible()
Set the canvas frame visible
-
destroy
public void destroy()
Destroy the canvas frame
-
update
public void update(int n1, int n2)
Refresh only a particular plot- Parameters:
n1
- the location of the plot in xn2
- the location of the plot in y
-
update
public void update()
Just update the current plot selected using cd() method
-
updateAll
public void updateAll()
Refresh all the plots on the same canvas HPLOT
-
setZoomIn
public void setZoomIn(double zoom)
Zoom in the current plot.- Parameters:
zoom
- current zoom. =1 : no zoom, =1.1 : 10% zoom
-
setZoomOut
public void setZoomOut(double zoom)
Zoom out the current plot.- Parameters:
zoom
- current zoom. Set to 1 for no zoom. 1.1 means 10% zoom etc.
-
setMove
public void setMove(double x, double y, double z)
Move the current plot- Parameters:
x
- in Xy
- in Yz
- in Z
-
setRotate
public void setRotate(double x, double y, double z)
Rotate the current plot- Parameters:
x
- around Xy
- around Yz
- around Z
-
getModel
public Model3d getModel()
Get the current model to build a object.- Returns:
- current model.
-
draw
public void draw(Object3d object)
Draw an object.- Parameters:
object
- Object to be drawn
-
clear
public void clear()
Clear the current graph including graph settings. Note: the current graph is set by the cd() method
-
clear
public void clear(int i1, int i2)
Clear the graph characterized by an index in X and Y. This method cleans the data and all graph settings.- Parameters:
i1
- location of the graph in Xi2
- location of the graph in Y
-
clearAll
public void clearAll()
Clear all graphs from data and settings.
-
close
public void close()
Close the canvas (and dispose all components) Note: a memory leak is found - no time to study it. set to null all the stuff
-
quit
public void quit()
-
doc
public void doc()
Show online documentation.
-
-
DMelt 3.0 © DataMelt by jWork.ORG