2003-02-15 Michael Koch <konqueror@gmx.de>
* java/awt/CheckboxMenuItem.java (CheckBoxMenuItem): Dont implement Serializable. (getListeners): New method, (getItemListeners): New method. * java/awt/Choice.java (getListeners): New method, (getItemListeners): New method. * java/awt/Container.java (getListeners): Added exception documentation. (setFocusTraversalKeys): Throw exceptions, added documentattion. (getFocusTraversalKeys): Added documentation. (areFocusTraversalKeysSet): Added documentation. (applyComponentOrientation): Added documentation. * java/awt/ContainerOrderFocusTraversalPolicy.java (implicitDownCycleTraversal): Renamed from downCycle for serialization. (ContainerOrderFocusTraversalPolicy): Added documentation. (accept): Reformated. * java/awt/Dialog.java (Dialog): Dont implement Serializable. (Dialog): Added documentation. * java/awt/Font.java (Font): Dont use absolute class name. * java/awt/Frame.java (Frame): Font implement Serializable. * java/awt/List.java (getListeners): New method, (getActionListeners): New method. (getItemListeners): New method. * java/awt/Menu.java (countItems): New deprecated method. * java/awt/Scrollbar.java (getListeners): New method, (getAdjustmentListeners): New method, * java/awt/TextComponent.java (getListeners): New method, (getTextListeners): New method, * java/awt/TextField.java (getListeners): New method, (getActionListeners): New method. * java/awt/Window.java (windowFocusListener): New member variable. (windowStateListener): New member variable. (getWindowFocusListeners): New method. (getWindowStateListeners): New method. (addWindowFocusListener): New method. (addWindowStateListener): New method. (removeWindowFocusListener): New method. (removeWindowStateListener): New method. * java/awt/datatransfer/DataFlavor.java (isRepresentationClassByteBuffer): New method. (isRepresentationClassCharBuffer): New method. (isRepresentationClassReader): New method. From-SVN: r62933
This commit is contained in:
committed by
Michael Koch
parent
e898926c9d
commit
30df932c23
@@ -47,6 +47,8 @@ import java.io.ObjectInput;
|
||||
import java.io.Reader;
|
||||
import java.io.StringReader;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.CharBuffer;
|
||||
|
||||
/**
|
||||
* This class represents a particular data format used for transferring
|
||||
@@ -999,5 +1001,59 @@ public Reader getReaderForText(Transferable transferable)
|
||||
throw new UnsupportedFlavorException(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether the representation class for this DataFlavor is
|
||||
* @see java.nio.ByteBuffer or a subclass thereof.
|
||||
*
|
||||
* @since 1.4
|
||||
*/
|
||||
public boolean isRepresentationClassByteBuffer ()
|
||||
{
|
||||
try
|
||||
{
|
||||
return ByteBuffer.class.isAssignableFrom (representationClass);
|
||||
}
|
||||
catch (ClassNotFoundException e)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether the representation class for this DataFlavor is
|
||||
* @see java.nio.CharBuffer or a subclass thereof.
|
||||
*
|
||||
* @since 1.4
|
||||
*/
|
||||
public boolean isRepresentationClassCharBuffer ()
|
||||
{
|
||||
try
|
||||
{
|
||||
return CharBuffer.class.isAssignableFrom (representationClass);
|
||||
}
|
||||
catch (ClassNotFoundException e)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether the representation class for this DataFlavor is
|
||||
* @see java.io.Reader or a subclass thereof.
|
||||
*
|
||||
* @since 1.4
|
||||
*/
|
||||
public boolean isRepresentationClassReader ()
|
||||
{
|
||||
try
|
||||
{
|
||||
return Reader.class.isAssignableFrom (representationClass);
|
||||
}
|
||||
catch (ClassNotFoundException e)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
} // class DataFlavor
|
||||
|
||||
|
||||
Reference in New Issue
Block a user