|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.swri.swiftvis.plot.styles.ImageAdder
public class ImageAdder
The purpose of this class is to add an image into a plot. The image will be scaled appropriately for the bounds on the plot and the user can sepcify the location and size of the image itself. I'm creating this largely so that I have an easy way to put axes on the PNG plots that are created by the ring analysis program. * @author mlewis
Nested Class Summary | |
---|---|
private class |
ImageAdder.ColorPickPanel
|
private class |
ImageAdder.SwapPair
|
Field Summary | |
---|---|
private ColorGradient |
blueGradient
|
private int |
clipSizeX
|
private int |
clipSizeY
|
private int |
clipX
|
private int |
clipY
|
private java.util.Vector<ImageAdder.SwapPair> |
colorSwaps
|
private java.awt.image.BufferedImage |
fullImage
|
private ColorGradient |
greenGradient
|
private boolean |
imageColored
|
private java.io.File |
imageFile
|
private boolean |
imageRead
|
private java.awt.image.BufferedImage |
img
|
private double |
maxY
|
private double |
minX
|
private java.awt.image.BufferedImage |
originalImage
|
private PlotArea2D |
plotArea
|
private javax.swing.JPanel |
propPanel
|
private ColorGradient |
redGradient
|
private static long |
serialVersionUID
|
private double |
sizeX
|
private double |
sizeY
|
Constructor Summary | |
---|---|
ImageAdder(ImageAdder c,
PlotArea2D pa)
|
|
ImageAdder(PlotArea2D pa)
|
Method Summary | |
---|---|
void |
applyGradient(ColorGradient cg)
|
ImageAdder |
copy(PlotArea2D pa)
|
void |
drawToGraphics(java.awt.Graphics2D g,
double xSize,
double ySize)
Creates a transform and draws the image using it. |
double[][] |
getBounds()
This method return the bounds the user input. |
PlotLegend |
getLegendInformation()
This method should return the legend information for this plot style. |
javax.swing.JComponent |
getPropertiesPanel()
Returns a panel in which the user can specify the parameters of the image. |
static java.lang.String |
getTypeDescription()
|
private void |
loadImage()
|
void |
redoBounds()
This method does nothing as the bounds are user inputs. |
private void |
setClipSizeX(javax.swing.JTextField field)
|
private void |
setClipSizeY(javax.swing.JTextField field)
|
private void |
setClipX(javax.swing.JTextField field)
|
private void |
setClipY(javax.swing.JTextField field)
|
private void |
setMaxY(javax.swing.JTextField field)
|
private void |
setMinX(javax.swing.JTextField field)
|
private void |
setSizeX(javax.swing.JTextField field)
|
private void |
setSizeY(javax.swing.JTextField field)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private PlotArea2D plotArea
private java.io.File imageFile
private double minX
private double maxY
private double sizeX
private double sizeY
private int clipX
private int clipY
private int clipSizeX
private int clipSizeY
private java.util.Vector<ImageAdder.SwapPair> colorSwaps
private ColorGradient redGradient
private ColorGradient greenGradient
private ColorGradient blueGradient
private transient javax.swing.JPanel propPanel
private transient java.awt.image.BufferedImage originalImage
private transient java.awt.image.BufferedImage fullImage
private transient java.awt.image.BufferedImage img
private transient boolean imageRead
private transient boolean imageColored
private static final long serialVersionUID
Constructor Detail |
---|
public ImageAdder(PlotArea2D pa)
public ImageAdder(ImageAdder c, PlotArea2D pa)
Method Detail |
---|
public static java.lang.String getTypeDescription()
public java.lang.String toString()
toString
in class java.lang.Object
public double[][] getBounds()
getBounds
in interface DataPlotStyle
DataPlotStyle.getBounds()
public void redoBounds()
redoBounds
in interface DataPlotStyle
DataPlotStyle.redoBounds()
public PlotLegend getLegendInformation()
DataPlotStyle
getLegendInformation
in interface DataPlotStyle
public javax.swing.JComponent getPropertiesPanel()
getPropertiesPanel
in interface DataPlotStyle
DataPlotStyle.getPropertiesPanel()
public void drawToGraphics(java.awt.Graphics2D g, double xSize, double ySize)
drawToGraphics
in interface DataPlotStyle
DataPlotStyle.drawToGraphics(java.awt.Graphics2D, double, double)
public ImageAdder copy(PlotArea2D pa)
copy
in interface DataPlotStyle
public void applyGradient(ColorGradient cg)
applyGradient
in interface GradientUser
private void loadImage() throws java.io.IOException
java.io.IOException
private void setMinX(javax.swing.JTextField field)
private void setMaxY(javax.swing.JTextField field)
private void setSizeX(javax.swing.JTextField field)
private void setSizeY(javax.swing.JTextField field)
private void setClipX(javax.swing.JTextField field)
private void setClipY(javax.swing.JTextField field)
private void setClipSizeX(javax.swing.JTextField field)
private void setClipSizeY(javax.swing.JTextField field)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |