|
JavaTM 2 Platform Std. Ed. v1.3.1 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--java.awt.datatransfer.DataFlavor
|
+--com.apple.mrj.datatransfer.OSTypeFlavor
A DataFlavor subclass that represents a Macintosh OSType,
for better integration with native Mac data transfer services
like drag & drop and the Clipboard.
| Field Summary | |
static OSTypeFlavor[] |
kHFSFileFlavorArray
Deprecated. A few classes need to check whether we're currently dragging files, so rather than having all of them allocate their own arrays, we do it here. |
static String |
kOSTypeMIMEPrefix
Deprecated. The MIME attribute attached to the kOSTypeMIMEType, whose value is the actual OSType (as four characters, with URL encoding of non-printable-ascii characters). |
static OSTypeFlavor |
kTypeHFS
Deprecated. Flavor for commonly used OSType. |
static OSTypeFlavor |
kTypeJavaFile
Deprecated. Flavor for commonly used OSType. |
static OSTypeFlavor |
kTypePICT
Deprecated. Flavor for commonly used OSType. |
static OSTypeFlavor |
kTypeStyl
Deprecated. Flavor for commonly used OSType. |
static OSTypeFlavor |
kTypeTEXT
Deprecated. Flavor for commonly used OSType. |
static OSTypeFlavor |
kTypeURL
Deprecated. Flavor for commonly used OSType. |
static OSTypeFlavor |
kTypeUstl
Deprecated. Flavor for commonly used OSType. |
static OSTypeFlavor |
kTypeUtxt
Deprecated. Flavor for commonly used OSType. |
| Fields inherited from class java.awt.datatransfer.DataFlavor |
javaFileListFlavor, javaJVMLocalObjectMimeType, javaRemoteObjectMimeType, javaSerializedObjectMimeType, plainTextFlavor, stringFlavor |
| Constructor Summary | |
OSTypeFlavor(MRJOSType osType)
Deprecated. Creates an OSTypeFlavor that represents the data as an OSType'd stream. |
|
OSTypeFlavor(MRJOSType osType,
String humanPresentableName)
Deprecated. Creates an OSTypeFlavor that represents the data as an OSType'd stream. |
|
OSTypeFlavor(MRJOSType osType,
String mimeType,
String humanPresentableName)
Deprecated. Creates an OSTypeFlavor that represents the data as an OSType'd stream. |
|
| Method Summary | |
static boolean |
addMapping(MRJOSType osType,
String mimeType)
Deprecated. Adds a bidirectional mapping between an OSType and a MIME type. |
static String |
getMimeTypeForOSType(MRJOSType osType)
Deprecated. Returns a MIME-based DataFlavor equivalent to the given OSType. |
MRJOSType |
getOSType()
Deprecated. Returns the OSType of this data flavor. |
static MRJOSType |
getOSTypeForMimeType(String mimeType)
Deprecated. Returns an OSType-based DataFlavor equivalent to the given MIME type. |
static MRJOSType |
readSynthesizedMimeType(String mime)
Deprecated. Generic conversion of a MIME type to an OSType, parsing the format generated by the synthesizeMimeType method. |
static String |
synthesizeMimeType(MRJOSType osType)
Deprecated. Generic conversion of an OSType into a MIME type, for use when no more specific MIME type is known. |
String |
toString()
Deprecated. String representation of this DataFlavor
and its parameters. |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final String kOSTypeMIMEPrefix
public static final OSTypeFlavor kTypeTEXT
public static final OSTypeFlavor kTypeStyl
public static final OSTypeFlavor kTypeUtxt
public static final OSTypeFlavor kTypeUstl
public static final OSTypeFlavor kTypePICT
public static final OSTypeFlavor kTypeHFS
public static final OSTypeFlavor kTypeURL
public static final OSTypeFlavor kTypeJavaFile
public static final OSTypeFlavor[] kHFSFileFlavorArray
| Constructor Detail |
public OSTypeFlavor(MRJOSType osType,
String mimeType,
String humanPresentableName)
osType - The OSType of the data.mimeType - The MIME type of the data (cannot be null)humanPresentableName - The user-visible name of this type
public OSTypeFlavor(MRJOSType osType,
String humanPresentableName)
getMimeTypeForOSType.osType - The OSType of the data.humanPresentableName - The user-visible name of this typepublic OSTypeFlavor(MRJOSType osType)
getMimeTypeForOSType.
A default human-presentable name is used that simply gives the textual (four-letter) representation of the OSType.
osType - The OSType of the data.| Method Detail |
public MRJOSType getOSType()
public String toString()
DataFlavorDataFlavor
and its parameters. The result String contains name of
DataFlavor class, representation class
and Mime type of this Flavor.toString in class DataFlavorjava.awt.datatransfer.DataFlavorDataFlavor
public static boolean addMapping(MRJOSType osType,
String mimeType)
public static String getMimeTypeForOSType(MRJOSType osType)
If no mapping is known, it will synthesize a MIME type by calling
synthesizeMimeType.
public static MRJOSType getOSTypeForMimeType(String mimeType)
If the MIME type is a synthesized wrapper for an OSType (its base type is "application/x-mac-data") the wrapped OSType will be returned.
Otherwise null is returned if no mapping is known.
public static String synthesizeMimeType(MRJOSType osType)
The base MIME type used is "application/x-mac-ostype-" followed by the raw OSType encoded as an eight-character hex string (big-endian byte order.) It's not possible to represent the OSType literally since the syntax of a MIME type allows so few characters, and is case-insensitive.
MRJ 2.2 used a different format with a single type "application/x-mac-data" and an "ostype=" attribute containing the OSType. Unfortunately we can't use this with Java2 since the MimeType class ignores parameters when comparing types.
readSynthesizedMimeType(java.lang.String)public static MRJOSType readSynthesizedMimeType(String mime)
synthesizeMimeType method. The
value null will be returned if the MIME type does not match
the canonical representation of a generic OSType.synthesizeMimeType
|
JavaTM 2 Platform Std. Ed. v1.3.1 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Java, Java 2D, and JDBC are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-2001 Sun Microsystems, Inc. 901 San Antonio Road
Palo Alto, California, 94303, U.S.A. All Rights Reserved.