|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
wjhk.jupload2.gui.JUploadImagePreview
public class JUploadImagePreview
ImagePreview.java by FileChooserDemo2.java.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
JComponent.AccessibleJComponent |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary | |
|---|---|
(package private) File |
file
The selected picture, which should contain the picture to display. |
(package private) JFileChooser |
jFileChooser
Current file chooser, which owns this file preview. |
(package private) LoadImageThread |
loadImageThread
The current thread, that is loading the picture. |
(package private) ImageIcon |
thumbnail
The picture, resized to the preview size. |
(package private) UploadPolicy |
uploadPolicy
The current upload policy. |
| Fields inherited from class javax.swing.JComponent |
|---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, 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 | |
|---|---|
JUploadImagePreview(JFileChooser jFileChooser,
UploadPolicy uploadPolicy)
The standard constructor for this class. |
|
| Method Summary | |
|---|---|
protected void |
paintComponent(Graphics g)
Actual display of the picture. |
void |
propertyChange(PropertyChangeEvent e)
Hum, we're interested in these events: DIRECTORY_CHANGED_PROPERTY and SELECTED_FILE_CHANGED_PROPERTY. |
(package private) void |
setFile(File fileParam)
Changes the current file: this erases the current displayed picture, then call the Thread.start() method. |
(package private) void |
setThumbnail(ImageIcon thumbnail)
Changes the current picture to display. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
UploadPolicy uploadPolicy
JFileChooser jFileChooser
ImageIcon thumbnail
File file
setFile(File)
method. It may be useful, in the future..
LoadImageThread loadImageThread
| Constructor Detail |
|---|
public JUploadImagePreview(JFileChooser jFileChooser,
UploadPolicy uploadPolicy)
jFileChooser - The current file chooser, which will contain this acessory.uploadPolicy - The current upload policy.| Method Detail |
|---|
void setThumbnail(ImageIcon thumbnail)
Thread.start() method, when the resized picture has been
calculated.
thumbnail - void setFile(File fileParam)
Thread.start() method. This generate the
picture asynchroneously. Directories are ignored.
public void propertyChange(PropertyChangeEvent e)
propertyChange in interface PropertyChangeListenere - protected void paintComponent(Graphics g)
paintComponent in class JComponent
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||