jdbreport.model
Class Picture

java.lang.Object
  extended by jdbreport.model.Picture
Direct Known Subclasses:
PictureSVG

public class Picture
extends Object

Version:
1.0 05.05.2011
Author:
Andrey Kholmanskih

Field Summary
protected  byte[] buf
           
protected  String format
           
protected  int height
           
protected  ImageIcon icon
           
protected  int iconHeight
           
protected  int iconWidth
           
static String JPEG
           
static String JPG
           
static String PNG
           
protected  int width
           
 
Constructor Summary
Picture()
           
Picture(byte[] buf)
           
Picture(byte[] buf, String format)
           
Picture(Image image)
           
Picture(ImageIcon value)
           
Picture(String format)
           
 
Method Summary
protected  boolean checkImageWriterFormat(String format)
           
protected  void createBuf()
           
protected  ImageIcon createIcon(int w, int h)
           
 BufferedImage createImage()
           
 byte[] getBuf()
           
 String getFormat()
           
 int getHeight()
           
 ImageIcon getIcon()
           
 ImageIcon getIcon(int w, int h)
           
 Image getImage()
           
 RenderedImage getRenderedImage()
           
 RenderedImage getRenderedImage(int w, int h)
           
 int getWidth()
           
 boolean isScale()
           
 void load(File file)
           
 void load(InputStream is)
           
 void paint(Graphics2D g2)
           
 void paint(Graphics2D g2, AffineTransformOp aop)
           
 void paint(Graphics2D g2, int width, int height)
           
 void saveToFile(File file, String format)
           
 void setBuf(byte[] buf)
           
 void setFormat(String format)
           
 void setScale(boolean scale)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PNG

public static final String PNG
See Also:
Constant Field Values

JPG

public static final String JPG
See Also:
Constant Field Values

JPEG

public static final String JPEG
See Also:
Constant Field Values

buf

protected byte[] buf

format

protected String format

icon

protected ImageIcon icon

iconHeight

protected int iconHeight

iconWidth

protected int iconWidth

height

protected int height

width

protected int width
Constructor Detail

Picture

public Picture()

Picture

public Picture(String format)

Picture

public Picture(ImageIcon value)

Picture

public Picture(Image image)

Picture

public Picture(byte[] buf)

Picture

public Picture(byte[] buf,
               String format)
Method Detail

getBuf

public byte[] getBuf()

createBuf

protected void createBuf()

setBuf

public void setBuf(byte[] buf)

getFormat

public String getFormat()

setFormat

public void setFormat(String format)

isScale

public boolean isScale()

setScale

public void setScale(boolean scale)

getIcon

public ImageIcon getIcon(int w,
                         int h)

getIcon

public ImageIcon getIcon()

getImage

public Image getImage()

getRenderedImage

public RenderedImage getRenderedImage(int w,
                                      int h)

getRenderedImage

public RenderedImage getRenderedImage()

getHeight

public int getHeight()

getWidth

public int getWidth()

createIcon

protected ImageIcon createIcon(int w,
                               int h)

createImage

public BufferedImage createImage()

checkImageWriterFormat

protected boolean checkImageWriterFormat(String format)

saveToFile

public void saveToFile(File file,
                       String format)
                throws IOException
Throws:
IOException

load

public void load(InputStream is)
          throws IOException
Throws:
IOException

load

public void load(File file)
          throws IOException
Throws:
IOException

paint

public void paint(Graphics2D g2,
                  int width,
                  int height)

paint

public void paint(Graphics2D g2)

paint

public void paint(Graphics2D g2,
                  AffineTransformOp aop)