| Modifier | Constructor and Description |
|---|---|
protected |
FigureIcon(Rectangle bounds)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
display()
Displays the figure in a Swing window.
|
protected abstract void |
doDrawing(Graphics2D g2)
Implement this method to draw the figure content.
|
void |
exportEps(OutputStream out)
Exports the currently displayed plot to encapsulated postscript.
|
void |
exportImageIO(String formatName,
boolean transparent,
OutputStream out)
Exports this figure to an output stream using the ImageIO framework.
|
void |
exportPdf(OutputStream out)
Exports the currently displayed plot to PDF.
|
Rectangle |
getBounds()
Returns the bounds for this figure.
|
int |
getIconHeight() |
int |
getIconWidth() |
static void |
main(String[] args)
Main method.
|
void |
paintIcon(Component c,
Graphics g,
int x,
int y) |
static int |
runMain(String[] args,
FigureIcon fig)
Does the work for the
main(java.lang.String[]) method. |
void |
setBounds(Rectangle bounds)
Sets the bounds for this figure.
|
protected FigureIcon(Rectangle bounds)
bounds - of imageprotected abstract void doDrawing(Graphics2D g2)
g2 - graphics contextpublic void setBounds(Rectangle bounds)
bounds - new boundspublic Rectangle getBounds()
public int getIconWidth()
getIconWidth in interface Iconpublic int getIconHeight()
getIconHeight in interface Iconpublic void display()
public void exportEps(OutputStream out) throws IOException
out - destination stream for the EPSIOExceptionpublic void exportPdf(OutputStream out) throws IOException
out - destination stream for the PDFIOExceptionpublic void exportImageIO(String formatName, boolean transparent, OutputStream out) throws IOException
formatName - ImageIO format nametransparent - true iff image will have a transparent backgroundout - destination output stream; will not be closedIOExceptionpublic static int runMain(String[] args, FigureIcon fig) throws IOException
main(java.lang.String[]) method.args - argument vectorfig - optional FigureIcon instance to draw; if null the
class name must be supplied on the command lineIOExceptionpublic static void main(String[] args) throws IOException
-help flag for usage.args - argument vectorIOExceptionCopyright © 2025 Central Laboratory of the Research Councils. All Rights Reserved.