FileDocCategorySizeDatePackage
OpenFilePanel.javaAPI DocAndroid 1.5 API1611Wed May 06 22:41:10 BST 2009com.android.draw9patch.ui

OpenFilePanel

public class OpenFilePanel extends JComponent

Fields Summary
private BufferedImage
dropHere
Constructors Summary
OpenFilePanel(MainFrame mainFrame)

        setOpaque(false);
        loadSupportImage();
        setTransferHandler(new ImageTransferHandler(mainFrame));
    
Methods Summary
private voidloadSupportImage()

        try {
            URL resource = getClass().getResource("/images/drop.png");
            dropHere = GraphicsUtilities.loadCompatibleImage(resource);
        } catch (IOException e) {
            e.printStackTrace();
        }
    
protected voidpaintComponent(java.awt.Graphics g)

        int x = (getWidth() - dropHere.getWidth()) / 2;
        int y = (getHeight() - dropHere.getHeight()) / 2;

        g.drawImage(dropHere, x, y, null);