/// <summary>
        /// Serializes this <code>DragSourceContext</code>. This method first
        /// performs default serialization. Next, this object's
        /// <code>Transferable</code> is written out if and only if it can be
        /// serialized. If not, <code>null</code> is written instead. In this case,
        /// a <code>DragSourceContext</code> created from the resulting deserialized
        /// stream will contain a dummy <code>Transferable</code> which supports no
        /// <code>DataFlavor</code>s. Finally, this object's
        /// <code>DragSourceListener</code> is written out if and only if it can be
        /// serialized. If not, <code>null</code> is written instead.
        ///
        /// @serialData The default serializable fields, in alphabetical order,
        ///             followed by either a <code>Transferable</code> instance, or
        ///             <code>null</code>, followed by either a
        ///             <code>DragSourceListener</code> instance, or
        ///             <code>null</code>.
        /// @since 1.4
        /// </summary>
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: private void writeObject(java.io.ObjectOutputStream s) throws java.io.IOException
        private void WriteObject(ObjectOutputStream s)
        {
            s.DefaultWriteObject();

            s.WriteObject(SerializationTester.Test(Transferable_Renamed) ? Transferable_Renamed : null);
            s.WriteObject(SerializationTester.Test(Listener) ? Listener : null);
        }
示例#2
0
        /// <summary>
        /// Serializes this <code>DragSource</code>. This method first performs
        /// default serialization. Next, it writes out this object's
        /// <code>FlavorMap</code> if and only if it can be serialized. If not,
        /// <code>null</code> is written instead. Next, it writes out
        /// <code>Serializable</code> listeners registered with this
        /// object. Listeners are written in a <code>null</code>-terminated sequence
        /// of 0 or more pairs. The pair consists of a <code>String</code> and an
        /// <code>Object</code>; the <code>String</code> indicates the type of the
        /// <code>Object</code> and is one of the following:
        /// <ul>
        /// <li><code>dragSourceListenerK</code> indicating a
        ///     <code>DragSourceListener</code> object;
        /// <li><code>dragSourceMotionListenerK</code> indicating a
        ///     <code>DragSourceMotionListener</code> object.
        /// </ul>
        ///
        /// @serialData Either a <code>FlavorMap</code> instance, or
        ///      <code>null</code>, followed by a <code>null</code>-terminated
        ///      sequence of 0 or more pairs; the pair consists of a
        ///      <code>String</code> and an <code>Object</code>; the
        ///      <code>String</code> indicates the type of the <code>Object</code>
        ///      and is one of the following:
        ///      <ul>
        ///      <li><code>dragSourceListenerK</code> indicating a
        ///          <code>DragSourceListener</code> object;
        ///      <li><code>dragSourceMotionListenerK</code> indicating a
        ///          <code>DragSourceMotionListener</code> object.
        ///      </ul>.
        /// @since 1.4
        /// </summary>
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: private void writeObject(java.io.ObjectOutputStream s) throws java.io.IOException
        private void WriteObject(ObjectOutputStream s)
        {
            s.DefaultWriteObject();

            s.WriteObject(SerializationTester.Test(FlavorMap_Renamed) ? FlavorMap_Renamed : null);

            DnDEventMulticaster.Save(s, DragSourceListenerK, Listener);
            DnDEventMulticaster.Save(s, DragSourceMotionListenerK, MotionListener);
            s.WriteObject(null);
        }
示例#3
0
        /// <summary>
        /// Serializes this <code>DragGestureRecognizer</code>. This method first
        /// performs default serialization. Then, this object's
        /// <code>DragGestureListener</code> is written out if and only if it can be
        /// serialized. If not, <code>null</code> is written instead.
        ///
        /// @serialData The default serializable fields, in alphabetical order,
        ///             followed by either a <code>DragGestureListener</code>, or
        ///             <code>null</code>.
        /// @since 1.4
        /// </summary>
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: private void writeObject(java.io.ObjectOutputStream s) throws java.io.IOException
        private void WriteObject(ObjectOutputStream s)
        {
            s.DefaultWriteObject();

            s.WriteObject(SerializationTester.Test(DragGestureListener) ? DragGestureListener : null);
        }