|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.brusoftware.plot4j.Diagram
public class Diagram
This class represents a multi-graph diagram on a Cartesian plan.
| Constructor Summary | |
|---|---|
Diagram()
Creates a new Diagram. |
|
| Method Summary | |
|---|---|
void |
addGraphToDiagram(Graph g)
Adds a new Graph to this Diagram. |
void |
exportAsImage(java.io.File file,
java.lang.String format,
int width,
int height)
Exports this Diagram to an image. |
java.lang.String[] |
getAvailableImageFormats()
Returns the available image formats for the exporting. |
java.awt.Color |
getAxesColor()
Returns the axes Color of this Diagram. |
java.awt.Color |
getBackgroundColor()
Returns the background Color of this Diagram. |
java.awt.Font |
getBigStepFont()
Returns the Font of the numeric labels. |
double |
getBigStepInterval()
Returns the interval between two numeric labels. |
java.util.ArrayList<Graph> |
getGraphs()
Returns the Graphs of this Diagram. |
java.awt.Color |
getGridColor()
Gets the Color of the grid |
double |
getLittleStepInterval()
Returns the interval between two hyphens. |
double |
getMaxX()
Returns the ending x-coordinate of this Diagram. |
double |
getMaxY()
Returns the ending y-coordinate of this Diagram. |
double |
getMinX()
Returns the starting x-coordinate of this Diagram. |
double |
getMinY()
Returns the starting y-coordinate of this Diagram. |
boolean |
isGridShown()
Returns true if the grid is visible, false otherwise. |
void |
refresh()
Refreshes this Diagram after a change of any type. |
void |
setAxesColor(java.awt.Color c)
Sets the axes Color of this Diagram. |
void |
setBackgroundColor(java.awt.Color c)
Sets the background Color of this Diagram. |
void |
setBigStepFont(java.awt.Font f)
Sets the Font of the numeric labels. |
void |
setBigStepInterval(double d)
Sets the interval between two numeric labels. |
void |
setGridColor(java.awt.Color c)
Sets the Color of the grid. |
void |
setLittleStepInterval(double d)
Sets the interval between two hyphens. |
void |
setMaxX(double d)
Sets the ending x-coordinate of this Diagram. |
void |
setMaxY(double d)
Sets the ending y-coordinate of this Diagram. |
void |
setMinX(double d)
Sets the starting x-coordinate of this Diagram. |
void |
setMinY(double d)
Sets the starting y-coordinate of this Diagram. |
void |
setShowGrid(boolean b)
Sets the visibility of the grid. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Diagram()
| Method Detail |
|---|
public void addGraphToDiagram(Graph g)
throws ParseException
g - the new Graph
ParseException - if the function syntax of a FunctionGraph is wrongpublic java.util.ArrayList<Graph> getGraphs()
public void refresh()
throws ParseException
ParseException - if the function syntax of a FunctionGraph is wrongpublic void setBigStepFont(java.awt.Font f)
f - the Font of the numeric labelssetBigStepInterval(double)public java.awt.Font getBigStepFont()
setBigStepInterval(double)public java.awt.Color getBackgroundColor()
public void setBackgroundColor(java.awt.Color c)
c - the background Color of this Diagrampublic java.awt.Color getAxesColor()
public void setAxesColor(java.awt.Color c)
c - axes Color of this Diagram
public void setMinX(double d)
throws WrongValueException
d - the starting x-coordinate of this Diagram
WrongValueException - if d >= max_xpublic double getMinX()
setMinX(double)
public void setMinY(double d)
throws WrongValueException
d - the starting y-coordinate of this Diagram
WrongValueException - if d >= max_ypublic double getMinY()
setMinY(double)
public void setMaxX(double d)
throws WrongValueException
d - the ending x-coordinate of this Diagram
WrongValueException - if d <= min_xpublic double getMaxX()
setMaxX(double)
public void setMaxY(double d)
throws WrongValueException
d - the ending y-coordinate of this Diagram
WrongValueException - if d <= min_ypublic double getMaxY()
setMaxY(double)
public void setBigStepInterval(double d)
throws WrongValueException
d - the interval between two numeric labels
WrongValueException - if d < 0 or d <= little_step_intervalsetLittleStepInterval(double)public double getBigStepInterval()
setBigStepInterval(double)
public void setLittleStepInterval(double d)
throws WrongValueException
d - the interval between two hyphens
WrongValueException - if d < 0 or d >= big_step_intervalsetBigStepInterval(double)public double getLittleStepInterval()
setLittleStepInterval(double)public void setShowGrid(boolean b)
b - true to show the grid, false otherwisepublic boolean isGridShown()
public void setGridColor(java.awt.Color c)
c - the new Color of the gridpublic java.awt.Color getGridColor()
public void exportAsImage(java.io.File file,
java.lang.String format,
int width,
int height)
throws java.io.IOException
file - the destination Fileformat - the format of the imagewidth - the width of the imageheight - the height of the image
java.io.IOException - if the export failsgetAvailableImageFormats()public java.lang.String[] getAvailableImageFormats()
exportAsImage(File, String, int, int)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||