jhplot.gui
Class GHFrame
- java.lang.Object
-
- jhplot.gui.GHPanel
-
- jhplot.gui.GHFrame
-
- All Implemented Interfaces:
- java.awt.event.ComponentListener, java.io.Serializable, java.util.EventListener
public abstract class GHFrame extends GHPanel implements java.io.Serializable
Create main Frame with several plots.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description GHFrame()
Construct a GHFrame canvas with a plot with the default parameters 600 by 400, and 10% space for the global title "Default".GHFrame(java.lang.String title)
Construct a GHFrame canvas with a plot with the default parameters 600 by 400, and 10% space for the global titleGHFrame(java.lang.String title, int n1, int n2)
Construct a GHFrame with a single plot/graph.GHFrame(java.lang.String title, int xs, int ys, boolean set)
Construct a GHFrame canvas with a single plot/graph.GHFrame(java.lang.String title, int xs, int ys, int n1, int n2)
Construct a GHFrame canvas with plots/graphs.GHFrame(java.lang.String title, int xsize, int ysize, int n1, int n2, boolean set)
Create main frame window with all HPlot menus.GHFrame(java.lang.String title, int xsize, int ysize, int n1, int n2, boolean set, int menusets)
Create main frame window for all Dmelt canvases.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description void
addGraph(int i1, int i2, java.awt.Component a)
Add a graph or any component in the location given by i1 and i2.void
cd(int cols, int rows)
Navigate to a selected plot.void
componentHidden(java.awt.event.ComponentEvent e)
void
componentMoved(java.awt.event.ComponentEvent e)
void
componentShown(java.awt.event.ComponentEvent e)
int
getCdX()
Get location of the graph in the main canvas in Xint
getCdY()
Get location of the graph on the main canvas in Yjavax.swing.JFrame
getFrame()
Get the main frame which keeps the componentsjava.net.URL
getHTMLUrl(java.lang.String name)
Returns a HTML page which is found in a valid image URL.int
getNtotX()
Get the total number of graphs in Xint
getNtotY()
Get the total number of the graphs in Yvoid
setPlotsNum(int nx, int ny)
Set the number of plotsvoid
updateFrame()
update frame UI-
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
-
GHFrame
public GHFrame(java.lang.String title, int xsize, int ysize, int n1, int n2, boolean set)
Create main frame window with all HPlot menus.- 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
-
GHFrame
public GHFrame(java.lang.String title, int xsize, int ysize, int n1, int n2, boolean set, int menusets)
Create main frame window for all Dmelt canvases.- 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 graphmenusets
- menusets=0 for all menus. 1 means a minimalistic (with export, exit, help).
-
GHFrame
public GHFrame(java.lang.String title, int n1, int n2)
Construct a GHFrame with a single plot/graph. It uses 10% of the space from the top for the global title- Parameters:
title
- title for the canvasn1
- size in xn2
- size in y
-
GHFrame
public GHFrame(java.lang.String title, int xs, int ys, boolean set)
Construct a GHFrame canvas with a single plot/graph.- Parameters:
title
- Title for the canvasxs
- size in xys
- size in yset
- set or not the graph (boolean)
-
GHFrame
public GHFrame(java.lang.String title, int xs, int ys, int n1, int n2)
Construct a GHFrame 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
-
GHFrame
public GHFrame(java.lang.String title)
Construct a GHFrame canvas with a plot with the default parameters 600 by 400, and 10% space for the global title- Parameters:
title
- Title
-
GHFrame
public GHFrame()
Construct a GHFrame canvas with a plot with the default parameters 600 by 400, and 10% space for the global title "Default".
-
-
Method Detail
-
addGraph
public void addGraph(int i1, int i2, java.awt.Component a)
Add a graph or any component in the location given by i1 and i2.
-
cd
public void cd(int cols, int rows)
Navigate to a selected plot. This is necessary if there are a several plots on the same canvas.- Parameters:
cols
- Set the location of the current plot in xrows
- Set the location of the current plot in y
-
getCdX
public int getCdX()
Get location of the graph in the main canvas in X- Returns:
- location of the graph in X
-
setPlotsNum
public void setPlotsNum(int nx, int ny)
Set the number of plots- Parameters:
nx
- Number of plots in Xny
- Number of plots in Y
-
updateFrame
public void updateFrame()
update frame UI
-
getNtotX
public int getNtotX()
Get the total number of graphs in X- Returns:
- Total number of graphs in X
-
getNtotY
public int getNtotY()
Get the total number of the graphs in Y- Returns:
- Total number of graphs in Y
-
getCdY
public int getCdY()
Get location of the graph on the main canvas in Y- Returns:
- location in Y
-
getFrame
public javax.swing.JFrame getFrame()
Get the main frame which keeps the components- Returns:
- Main frame
-
getHTMLUrl
public java.net.URL getHTMLUrl(java.lang.String name)
Returns a HTML page which is found in a valid image URL. The basis of the url is where 'intro' is created, which can't be but the place where JChess resides.- Parameters:
name
- name of the HTML page- Returns:
- the URL to the page
-
componentMoved
public void componentMoved(java.awt.event.ComponentEvent e)
- Specified by:
componentMoved
in interfacejava.awt.event.ComponentListener
- Overrides:
componentMoved
in classGHPanel
-
componentShown
public void componentShown(java.awt.event.ComponentEvent e)
- Specified by:
componentShown
in interfacejava.awt.event.ComponentListener
- Overrides:
componentShown
in classGHPanel
-
componentHidden
public void componentHidden(java.awt.event.ComponentEvent e)
- Specified by:
componentHidden
in interfacejava.awt.event.ComponentListener
- Overrides:
componentHidden
in classGHPanel
-
-
DMelt 3.0 © DataMelt by jWork.ORG