|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.dndMicroApplet.DnDMicroAppletUtil
This class provides utilities to generate various forms of Java Plug-In tags for the drag-and-drop micro-applet, wt.clients.dndMicroApplet.DnDMicroApplet. It's methods are callable from just the HTML template processor or from JSP pages (or whatever other technology one might use to generate HTML, e.g. an XSLT extension function).
Field Summary | |
private static String |
ACCEPT_DIR_PARAM_STR
|
private static String |
BG_COLOR_PARAM_STR
|
private static String |
DOWNLOAD_CONTENT_PARAM_STR
|
private static String |
DRAG_DATA_FILE_NAME_PARAM_STR
|
private static String |
DRAG_DATA_STRING_PARAM_STR
|
private static String |
DRAG_DATA_URL_PARAM_STR
|
private static String |
DRAG_ICON_PARAM_STR
|
private static String |
ENCODING_NEEDED_PARAM_STR
|
private static String |
FILE_DROP_JS_PARAM_STR
|
private static String |
FILE_DROP_URL_PARAM_STR
|
private static String |
GLYPH_PARAM_STR
|
private static String |
ICON_PARAM_STR
|
private static String |
ID_PARAM_STR
|
private static int |
IEBROWSER
|
private static String |
JS_FILE_DELIM_PARAM_STR
|
private static String |
LOCALE_PARAM_STR
|
private static int |
NETSCAPE4BROWSER
|
private static int |
NETSCAPE6BROWSER
|
private static String |
STRING_DROP_JS_PARAM_STR
|
private static String |
STRING_DROP_URL_PARAM_STR
|
Constructor Summary | |
DnDMicroAppletUtil()
|
Method Summary | |
private static void |
addAppDataContentDragData(ApplicationData appData,
ContentHolder holder,
String codebase,
Properties params)
Add application data download URL as file drag data params |
private static void |
addCoreDnDMicroAppletParams(Properties params,
String codebase)
Utility to add the core required parameters for specification of DnDMicroApplet's tags (with standard width and height) via PluginTagGenerator. |
private static void |
addCoreDnDMicroAppletParams(Properties params,
String codebase,
int width,
int height)
Utility to add the core required parameters for specification of DnDMicroApplet's tags (with specified width and height) via PluginTagGenerator. |
private static void |
addObjectLinkDragData(WTObject obj,
String codebase,
Locale locale,
String encodedObjRefStr,
Properties params)
Add object properties URL as file drag data params |
private static void |
addURLDataDragData(URLData urlData,
String codebase,
Properties params)
Add URL data URL as file drag data params |
static int |
getBrowserfromUserAgent()
|
static int |
getBrowserfromUserAgent(String userAgent)
|
private static String |
getDragOverIcon(WTObject obj,
String icon,
boolean docDropOk)
Decide on drag-over icon |
private static String |
getLinkNameForObject(WTObject obj,
Locale locale)
Figure out reasonable name for hyperlink to object properties page |
private static String |
getObjectRefString(WTObject obj)
Get object reference string for a WTObject. |
static boolean |
isDndObject(WTObject obj)
Placeholder routine to turn off applet for any given objects. |
private static boolean |
isFileDropSupportedForDoc(Object object)
Determine whether file drop is supported for the given document. |
private static boolean |
isSupportedDropTarget(WTObject obj)
Determine whether we have standard drop handlers for the given object |
static String |
makeAppletTag(String codebase,
String icon,
String dragIcon,
String bgColor,
String jsMethod,
String delim)
Makes an applet tag for use as a primary or secondary content item specification drop target as used in document creation, update, and check-in pages. |
static String |
makeAppletTag(String codebase,
String icon,
String dragIcon,
String bgColor,
String jsMethod,
String delim,
Properties params)
|
static String |
makeAppletTag(String codebase,
String icon,
String dragIcon,
String bgColor,
String jsMethod,
String delim,
Properties params,
String userAgent)
|
static String |
makeAppletTag(String codebase,
String icon,
String dragIcon,
String bgColor,
String jsMethod,
String delim,
String userAgent)
Makes an applet tag for use as a primary or secondary content item specification drop target as used in document creation, update, and check-in pages. |
static String |
makeAppletTag(WTObject obj,
String codebase,
String iconURLString,
String bgColor,
String link)
|
static String |
makeAppletTag(WTObject obj,
String codebase,
String iconURLString,
String glyphURLString,
String bgColor,
ContentHolder holder)
Makes a drag-and-drop applet tag with default drag and drop handlers configured for the given object. |
static String |
makeAppletTag(WTObject obj,
String codebase,
String iconURLString,
String glyphURLString,
String bgColor,
ContentHolder holder,
int width,
int height)
Makes a drag-and-drop applet tag with default drag and drop handlers configured for the given object. |
static String |
makeAppletTag(WTObject obj,
String codebase,
String iconURLString,
String glyphURLString,
String bgColor,
ContentHolder holder,
int width,
int height,
String userAgent)
Makes a drag-and-drop applet tag with default drag and drop handlers configured for the given object. |
static String |
makeAppletTag(WTObject obj,
String codebase,
String iconURLString,
String glyphURLString,
String bgColor,
ContentHolder holder,
String userAgent)
Makes a drag-and-drop applet tag with default drag and drop handlers configured for the given object. |
static String |
makeAppletTag(WTObject obj,
String codebase,
String iconURLString,
String bgColor,
String link,
String userAgent)
|
private static String |
makeURLStringRelative(String baseURLString,
String urlString)
Very quick and primitive utility to reduce an absolute URL string, 'urlString', to an URL string relative to 'baseURLString' if an only if 'urlString' begins with 'baseURLString'. |
private static String |
removeNewLines(String str)
Replace new line and carriage return characters with spaces. |
private static String |
sanitizeFilename(String filename)
Replaces all unsafe characters in the proposed filename with a safe character. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final String ID_PARAM_STR
private static final String BG_COLOR_PARAM_STR
private static final String ICON_PARAM_STR
private static final String GLYPH_PARAM_STR
private static final String LOCALE_PARAM_STR
private static final String ACCEPT_DIR_PARAM_STR
private static final String DRAG_ICON_PARAM_STR
private static final String FILE_DROP_JS_PARAM_STR
private static final String JS_FILE_DELIM_PARAM_STR
private static final String FILE_DROP_URL_PARAM_STR
private static final String STRING_DROP_URL_PARAM_STR
private static final String DOWNLOAD_CONTENT_PARAM_STR
private static final String DRAG_DATA_URL_PARAM_STR
private static final String DRAG_DATA_FILE_NAME_PARAM_STR
private static final String STRING_DROP_JS_PARAM_STR
private static final String DRAG_DATA_STRING_PARAM_STR
private static final String ENCODING_NEEDED_PARAM_STR
private static final int IEBROWSER
private static final int NETSCAPE6BROWSER
private static final int NETSCAPE4BROWSER
Constructor Detail |
public DnDMicroAppletUtil()
Method Detail |
public static boolean isDndObject(WTObject obj)
public static int getBrowserfromUserAgent()
public static int getBrowserfromUserAgent(String userAgent)
public static String makeAppletTag(WTObject obj, String codebase, String iconURLString, String glyphURLString, String bgColor, ContentHolder holder, String userAgent) throws WTException
WTException
public static String makeAppletTag(WTObject obj, String codebase, String iconURLString, String glyphURLString, String bgColor, ContentHolder holder, int width, int height, String userAgent) throws WTException
WTException
public static String makeAppletTag(WTObject obj, String codebase, String iconURLString, String glyphURLString, String bgColor, ContentHolder holder) throws WTException
WTException
public static String makeAppletTag(WTObject obj, String codebase, String iconURLString, String glyphURLString, String bgColor, ContentHolder holder, int width, int height) throws WTException
WTException
private static void addCoreDnDMicroAppletParams(Properties params, String codebase)
private static void addCoreDnDMicroAppletParams(Properties params, String codebase, int width, int height)
private static String removeNewLines(String str)
public static String makeAppletTag(String codebase, String icon, String dragIcon, String bgColor, String jsMethod, String delim) throws WTException, IOException
WTException
IOException
public static String makeAppletTag(String codebase, String icon, String dragIcon, String bgColor, String jsMethod, String delim, String userAgent) throws WTException, IOException
WTException
IOException
public static String makeAppletTag(String codebase, String icon, String dragIcon, String bgColor, String jsMethod, String delim, Properties params) throws WTException, IOException
WTException
IOException
public static String makeAppletTag(String codebase, String icon, String dragIcon, String bgColor, String jsMethod, String delim, Properties params, String userAgent) throws WTException, IOException
WTException
IOException
public static String makeAppletTag(WTObject obj, String codebase, String iconURLString, String bgColor, String link) throws WTException
WTException
public static String makeAppletTag(WTObject obj, String codebase, String iconURLString, String bgColor, String link, String userAgent) throws WTException
WTException
private static boolean isFileDropSupportedForDoc(Object object)
private static void addAppDataContentDragData(ApplicationData appData, ContentHolder holder, String codebase, Properties params) throws WTException
WTException
private static void addURLDataDragData(URLData urlData, String codebase, Properties params)
private static void addObjectLinkDragData(WTObject obj, String codebase, Locale locale, String encodedObjRefStr, Properties params) throws WTException
WTException
private static String getLinkNameForObject(WTObject obj, Locale locale)
private static String sanitizeFilename(String filename)
private static String getDragOverIcon(WTObject obj, String icon, boolean docDropOk)
private static boolean isSupportedDropTarget(WTObject obj) throws WTException
WTException
private static String makeURLStringRelative(String baseURLString, String urlString)
private static String getObjectRefString(WTObject obj) throws WTException
There is probably a nice, standard utility to do this, but I couldn't find it quickly when I needed it.
WTException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |