|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
java.awt.Panel
wt.clients.util.http.UploadPanel
Panel for uploading and downloading files via HTTP.
Supported API:false
Extendable:false
Nested Class Summary | |
(package private) class |
UploadPanel.TargetInfo
|
(package private) class |
UploadPanel.UploadDownloadController
|
Nested classes inherited from class java.awt.Panel |
Panel.AccessibleAWTPanel |
Nested classes inherited from class java.awt.Container |
Container.AccessibleAWTContainer |
Nested classes inherited from class java.awt.Component |
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary | |
private String |
callingAction
|
private ThreadGroup |
contextGroup
|
private FileAccess |
fileAccess
|
private Applet |
parentApplet
|
private static String |
RESOURCE
|
static int |
TARGET_TYPE_FILE
Target type indicator, indicates a file is the target. |
static int |
TARGET_TYPE_NONE
Target type indicator, indicates there is no target. |
static int |
TARGET_TYPE_UNKNOWN
Target type indicator, indicates the type is unknown. |
static int |
TARGET_TYPE_URL
Target type indicator, indicates a url is the target. |
private String |
targetString
|
private int |
targetType
|
private HTTPUploadDownload |
uploadDownload
|
private HTTPUploadDownloadView |
uploadDownloadView
|
private String |
uploadURL
|
(package private) static boolean |
VERBOSE
|
Fields inherited from class java.awt.Panel |
|
Fields inherited from class java.awt.Container |
|
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 | |
UploadPanel()
|
Method Summary | |
private boolean |
addNewFile(int uploadIndex,
boolean isFile,
UploadPanel.TargetInfo info,
String targetName)
|
private String |
display(String key,
Object[] params)
Returns the localized string to be displayed to the user given a key. |
private WTContext |
getContext()
|
private UploadPanel.TargetInfo |
getExistingTargetInfo()
|
private FileAccess |
getFileAccess()
|
int |
getOperationStatus()
Return the most recent status. |
Applet |
getParentApplet()
Return the launching applet (if any). |
protected Frame |
getParentFrame()
Return the parent frame. |
String |
getTarget()
Return the target file or url. |
int |
getTargetType()
|
void |
init(Applet parentApplet,
HTTPUploadDownload newUploadDownload,
HTTPUploadDownloadView view,
int newTargetType)
Initialize this panel to use the passed HTTPUploadDownload) object. |
boolean |
isDirty()
Should be invoked before a call to save; this is where checksumming and initial file validation occurs. |
void |
performUploadOperation(boolean separateThread)
|
protected void |
performUploadOperation(boolean separateThread,
boolean needsSynch)
|
private boolean |
removeCurrentFile(int uploadIndex,
boolean isFile,
UploadPanel.TargetInfo info)
|
boolean |
save(boolean check,
boolean primaryUpload,
boolean secondaryUpload)
Save the target content. |
boolean |
saveContent(boolean primaryUpload,
boolean secondaryUpload)
|
private boolean |
saveContentItems(boolean primaryUpload)
|
void |
setCallingAction(String calling_action)
|
void |
setParentApplet(Applet parentApplet)
|
boolean |
setTarget(String target)
Set the target file or url. |
boolean |
setUploadURL(String urlString)
Set the upload url. |
protected void |
showMessageDialog(String message,
boolean modal)
|
private void |
synch()
|
private void |
synch(int index)
|
Methods inherited from class java.awt.Panel |
addNotify, getAccessibleContext |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private static String RESOURCE
static boolean VERBOSE
public static final int TARGET_TYPE_UNKNOWN
public static final int TARGET_TYPE_FILE
public static final int TARGET_TYPE_URL
public static final int TARGET_TYPE_NONE
private HTTPUploadDownload uploadDownload
private HTTPUploadDownloadView uploadDownloadView
private Applet parentApplet
private ThreadGroup contextGroup
private FileAccess fileAccess
private String uploadURL
private String callingAction
private int targetType
private String targetString
Constructor Detail |
public UploadPanel()
Method Detail |
public void init(Applet parentApplet, HTTPUploadDownload newUploadDownload, HTTPUploadDownloadView view, int newTargetType)
init()
) must be
called once this panel has been added to its
parent container.
public void setCallingAction(String calling_action)
public boolean setUploadURL(String urlString)
public String getTarget()
public boolean setTarget(String target)
target
- The file path, e.g. "E:\abcd\test.txt" or "E:\abcd\*.txt" or url.public Applet getParentApplet()
public void setParentApplet(Applet parentApplet)
public void performUploadOperation(boolean separateThread)
protected void performUploadOperation(boolean separateThread, boolean needsSynch)
public boolean saveContent(boolean primaryUpload, boolean secondaryUpload)
public boolean save(boolean check, boolean primaryUpload, boolean secondaryUpload)
isDirty()
.
public int getOperationStatus()
public boolean isDirty()
private boolean saveContentItems(boolean primaryUpload)
private boolean removeCurrentFile(int uploadIndex, boolean isFile, UploadPanel.TargetInfo info)
private boolean addNewFile(int uploadIndex, boolean isFile, UploadPanel.TargetInfo info, String targetName)
public int getTargetType()
private UploadPanel.TargetInfo getExistingTargetInfo()
private FileAccess getFileAccess()
protected Frame getParentFrame()
private void synch()
private void synch(int index)
private WTContext getContext()
private String display(String key, Object[] params)
key
- The string that represents the key in the
BeansRB
.
protected void showMessageDialog(String message, boolean modal)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |