| 
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 | +--com.apple.mrj.datatransfer.TranslationSet
A Translator that delegates to a collection of registered Translators. It is actually just a container for multiple Translators that do the work; the Translators are registered with it, and it dispatches to the correct one.
The most common way to use this class is implicitly, by instantiating a TranslatedTransferable object to wrap around the Transferable object that needs translation.
Translation, 
Translator, 
TranslatedTransferable| Field Summary | |
static TranslationSet | 
standard
Deprecated. The standard TranslationSet used by the system.  | 
| Constructor Summary | |
TranslationSet()
Deprecated.  | 
|
| Method Summary | |
 void | 
addTranslator(DataFlavor from,
              DataFlavor to,
              String translatorClass)
Deprecated. Registers a Translator without having to intantiate it or even load the class.  | 
 void | 
addTranslator(Translator t)
Deprecated. Registers a Translator object instance.  | 
 Translation[] | 
getTranslations()
Deprecated. Returns an array of the Translations that this TranslationSet supports.  | 
 DataFlavor[] | 
getTranslationsFrom(DataFlavor[] source)
Deprecated. Returns an array of all the unique DataFlavors into which the array of source DataFlavors can be translated.  | 
 Object | 
translate(Object data,
          Translation t)
Deprecated. Performs a translation on a data item, whose class is expected to match the representationClass of the Translation's source flavor.  | 
 Object | 
translate(Transferable t,
          DataFlavor destination)
Deprecated. Translates the data from a Transferable into the desired destination flavor.  | 
| Methods inherited from class java.lang.Object | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
public static final TranslationSet standard
| Constructor Detail | 
public TranslationSet()
| Method Detail | 
public void addTranslator(Translator t)
public void addTranslator(DataFlavor from,
                          DataFlavor to,
                          String translatorClass)
public Translation[] getTranslations()
getTranslations in interface Translatorpublic DataFlavor[] getTranslationsFrom(DataFlavor[] source)
public Object translate(Object data,
                        Translation t)
                 throws UnsupportedFlavorException,
                        IOException
translate in interface TranslatorUnsupportedFlavorException - if this is not a Translation I supportIOException - If an I/O exception occurs while translating the data
public Object translate(Transferable t,
                        DataFlavor destination)
                 throws UnsupportedFlavorException,
                        IOException
UnsupportedFlavorException - if no appropriate translation could be found.IOException - If an I/O exception occurred while translating the data
  | 
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.