jhplot
Class HPlot3DP

java.lang.Object
  extended by jhplot.GHPanel
      extended by jhplot.GHFrame
          extended by jhplot.HPlot3DP
All Implemented Interfaces:
ComponentListener, Serializable, EventListener

public class HPlot3DP
extends GHFrame

Create a frame for showing 3D parametric functions.

See Also:
Serialized Form

Field Summary
 boolean set
           
 
Constructor Summary
HPlot3DP()
          Construct a canvas with a plot with the default parameters 600 by 400, and 10% space for the global title "Default"
HPlot3DP(String title)
          Construct a canvas with a plot with the default parameters 600 by 400, and 10% space for the global title
HPlot3DP(String title, int xs, int ys)
          Construct a canvas with a single plot/graph
HPlot3DP(String title, int xs, int ys, int n1, int n2)
          Construct a canvas with plots/graphs
HPlot3DP(String title, int xsize, int ysize, int n1, int n2, boolean set)
          Create a canvas with several plots showing 3D function
 
Method Summary
 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 frame
 void doc()
          Show online documentation.
 void draw(FPR fpr)
          Draw a parametric function
 double getCameraPosition()
          Get camera position.
 double[] getEyePosition()
          Get a vector with eye position
 double getFov()
          Get field of vision
 void quit()
           
 void setAxes(boolean bShowAxes)
          Set all axes or not
 void setAxes(boolean axisX, boolean axisY, boolean axisZ)
          Show or not axes for X, Y, Z
 void setAxesArrows(boolean showArrows)
          Show or not small arrows on axes
 void setAxesColor(Color c)
          Set Color for axes
 void setAxisArrows(boolean showArrows)
          Set or not arrows for axis
 void setBackgColor(Color c)
          Set background for current pad
 void setCameraPosition(double d)
          Set camera position
 void setEyePosition(double x, double y, double z)
          Set position oy eye
 void setFog(boolean fogEnabled)
          Set fog for objects
 void setFontValue(Font font)
          Set Font for axis numbers
 void setFov(double factor)
          Set field of vision
 void setLabelColor(Color color)
          Set Color for the labels
 void setLabelFont(Font font)
          Set Font for the labels
 void setNameX(String name)
          Set a name for X axis
 void setNameY(String name)
          Set a name for Y axis
 void setNameZ(String name)
          Set a name for Z axis
 void setRangeX(double min, double max)
          Set range for X axis
 void setRangeY(double min, double max)
          Set range for Y
 void setRangeZ(double min, double max)
          Set range for Z
 void update()
          Just update the current plot selected using cd() method
 void updateAll()
          Refresh all the plots on the same canvas HPLOT
 void visible()
          Set the canvas frame visible
 void visible(boolean vs)
          Set the canvas frame visible or not
 
Methods inherited from class jhplot.GHFrame
addGraph, cd, componentHidden, componentMoved, componentShown, getCdX, getCdY, getFrame, getHTMLUrl, getNtotX, getNtotY, setPlotsNum, updateFrame
 
Methods inherited from class jhplot.GHPanel
addComp, componentResized, disableDoubleBuffering, enableDoubleBuffering, export, exportDialog, exportImage, 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
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

set

public boolean set
Constructor Detail

HPlot3DP

public HPlot3DP(String title,
                int xsize,
                int ysize,
                int n1,
                int n2,
                boolean set)
Create a canvas with several plots showing 3D function

Parameters:
title - Title
xsize - size in x direction
ysize - size in y direction
n1 - number of plots/graphs in x
n2 - number of plots/graphs in y
set - set or not the graph

HPlot3DP

public HPlot3DP(String title,
                int xs,
                int ys)
Construct a canvas with a single plot/graph

Parameters:
title - Title for the canvas
xs - size in x
ys - size in y

HPlot3DP

public HPlot3DP(String title,
                int xs,
                int ys,
                int n1,
                int n2)
Construct a canvas with plots/graphs

Parameters:
title - Title for the canvas
xs - size in x
ys - size in y
n1 - number of plots/graphs in x
n2 - number of plots/graphs in y

HPlot3DP

public HPlot3DP(String title)
Construct a canvas with a plot with the default parameters 600 by 400, and 10% space for the global title

Parameters:
title - Title

HPlot3DP

public HPlot3DP()
Construct a 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()
Just update the current plot selected using cd() method


updateAll

public void updateAll()
Refresh all the plots on the same canvas HPLOT


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 X
i2 - location of the graph in Y

draw

public void draw(FPR fpr)
Draw a parametric function

Parameters:
input - parametric function

setRangeX

public void setRangeX(double min,
                      double max)
Set range for X axis

Parameters:
min - min value
max - max value

setRangeY

public void setRangeY(double min,
                      double max)
Set range for Y

Parameters:
min - min value
max - max value

setRangeZ

public void setRangeZ(double min,
                      double max)
Set range for Z

Parameters:
min - min value
max - max value

setFov

public void setFov(double factor)
Set field of vision

Parameters:
factor - factor

getFov

public double getFov()
Get field of vision

Returns:
factor

setBackgColor

public void setBackgColor(Color c)
Set background for current pad

Parameters:
c - color

setEyePosition

public void setEyePosition(double x,
                           double y,
                           double z)
Set position oy eye

Parameters:
x -
y -
z -

setAxisArrows

public void setAxisArrows(boolean showArrows)
Set or not arrows for axis

Parameters:
showArrows - true if shown

getEyePosition

public double[] getEyePosition()
Get a vector with eye position

Returns:
array with positions

getCameraPosition

public double getCameraPosition()
Get camera position. It is 0 by deafult. Negative value means sooming out, positive is zooming in.

Returns:
camera position. Position: zooming in

setCameraPosition

public void setCameraPosition(double d)
Set camera position

Parameters:
d - set camera position

setFog

public void setFog(boolean fogEnabled)
Set fog for objects

Parameters:
fogEnabled -

setAxes

public void setAxes(boolean bShowAxes)
Set all axes or not

Parameters:
bShowAxes - true if shown

setNameX

public void setNameX(String name)
Set a name for X axis

Parameters:
name - Name of the label for X

setNameY

public void setNameY(String name)
Set a name for Y axis

Parameters:
name - Name of the label for Y

setNameZ

public void setNameZ(String name)
Set a name for Z axis

Parameters:
name - Name of the label for Y

setLabelFont

public void setLabelFont(Font font)
Set Font for the labels

Parameters:
font - Font

setLabelColor

public void setLabelColor(Color color)
Set Color for the labels

Parameters:
color - Color

setAxesColor

public void setAxesColor(Color c)
Set Color for axes

Parameters:
color - Color

setFontValue

public void setFontValue(Font font)
Set Font for axis numbers

Parameters:
font - Font

setAxes

public void setAxes(boolean axisX,
                    boolean axisY,
                    boolean axisZ)
Show or not axes for X, Y, Z

Parameters:
axisX -
axisY -
axisZ -

setAxesArrows

public void setAxesArrows(boolean showArrows)
Show or not small arrows on axes

Parameters:
showArrows - set true if arrows are shown (default)

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.



jHepWork 3.1 ©