|
![]() |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JFileChooser
com.asprise.util.ui.JImageFileChooser
An extended JFileChooser that supports image preview and image information extraction.
When the user clicks an image file, its preview and associated information will be displayed to assist the user to select the proper image.
Supported image formats:
- Adobe Photoshop
- Bitmap, Windows/OS2 (BMP)
- Cursor
- Graphics Interchange Format (GIF)
- Icon
- JPEG
- Macintosh PICT Format (PCT)
- PCX Format
- Portable Network Graphics (PNG)
- Sun Raster Format
- Tag Image File Format (TIFF)
- Targa (TGA)
- X Bitmap (XBM)
- X PixMap (XPM)
Sample use:
...
JFileChooser fc = new JImageFileChooser(lastDirectory);
fc.addChoosableFileFilter(JImageFileChooser.getImageFileFilter()); // Set filter.
int returnVal = fc.showOpenDialog(frame);
Note: Only licensed copy allows reading image to BufferedImage/Image.
Nested Class Summary |
Nested classes inherited from class javax.swing.JComponent |
JComponent.AccessibleJComponent |
Field Summary |
Fields inherited from class javax.swing.JComponent |
TOOL_TIP_TEXT_KEY, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
JImageFileChooser()
Constructs an image file chooser with default settings. |
|
JImageFileChooser(File currentDirectory)
Constructs an image file chooser with specified initial directory to be browsed. |
|
JImageFileChooser(File currentDirectory,
FileSystemView fsv)
Constructs an image file chooser with specified initial directory and file system view. |
|
JImageFileChooser(FileSystemView fsv)
Constructs an image file chooser with specified file system view. |
|
JImageFileChooser(String currentDirectoryPath)
Constructs an image file chooser with specified initial directory to be browsed. |
|
JImageFileChooser(String currentDirectoryPath,
FileSystemView fsv)
Constructs an image file chooser with specified initial directory and file system view. |
Method Summary | |
static FileFilter |
getImageFileFilter()
Get an image file filter. |
Dimension |
getPreviewWindowSize()
Get the size of preview window. |
void |
setPreviewWindowSize(Dimension d)
Set the size of preview window. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public JImageFileChooser()
public JImageFileChooser(String currentDirectoryPath)
currentDirectoryPath
- public JImageFileChooser(File currentDirectory)
currentDirectory
- public JImageFileChooser(FileSystemView fsv)
fsv
- public JImageFileChooser(File currentDirectory, FileSystemView fsv)
currentDirectory
- fsv
- public JImageFileChooser(String currentDirectoryPath, FileSystemView fsv)
currentDirectoryPath
- fsv
- Method Detail |
public Dimension getPreviewWindowSize()
public void setPreviewWindowSize(Dimension d)
d
- public static FileFilter getImageFileFilter()
|
![]() |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |