Inheritance: java.lang.Object, java.io.Serializable
Exemplo n.º 1
0
 public State(System.String name)
 {
     InitBlock();
     this.name = name;
     this.state = State.NOTRUN;
     changes = new PropertyChangeSupport(this);
 }
        /// <summary>
        /// @serialData Null terminated list of <code>PropertyChangeListeners</code>.
        /// <para>
        /// At serialization time we skip non-serializable listeners and
        /// only serialize the serializable listeners.
        /// </para>
        /// </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)
        {
            Dictionary <String, PropertyChangeSupport> children = null;

            PropertyChangeListener[] listeners = null;
            lock (this.Map)
            {
                foreach (Map_Entry <String, PropertyChangeListener[]> entry in this.Map.Entries)
                {
                    String property = entry.Key;
                    if (property == null)
                    {
                        listeners = entry.Value;
                    }
                    else
                    {
                        if (children == null)
                        {
                            children = new Dictionary <>();
                        }
                        PropertyChangeSupport pcs = new PropertyChangeSupport(this.Source);
                        pcs.Map.Set(null, entry.Value);
                        children[property] = pcs;
                    }
                }
            }
            ObjectOutputStream.PutField fields = s.PutFields();
            fields.Put("children", children);
            fields.Put("source", this.Source);
            fields.Put("propertyChangeSupportSerializedDataVersion", 2);
            s.WriteFields();

            if (listeners != null)
            {
                foreach (PropertyChangeListener l in listeners)
                {
                    if (l is Serializable)
                    {
                        s.WriteObject(l);
                    }
                }
            }
            s.WriteObject(null);
        }
Exemplo n.º 3
0
 protected internal Series(IComparable key, string description)
 {
   base.\u002Ector();
   Series series = this;
   if (key == null)
   {
     string str = "Null 'key' argument.";
     Throwable.__\u003CsuppressFillInStackTrace\u003E();
     throw new IllegalArgumentException(str);
   }
   else
   {
     this.key = key;
     this.description = description;
     this.listeners = new EventListenerList();
     this.propertyChangeSupport = new PropertyChangeSupport((object) this);
     this.notify = true;
   }
 }
Exemplo n.º 4
0
 public Crosshair(double value, Paint paint, Stroke stroke)
 {
   base.\u002Ector();
   Crosshair crosshair = this;
   if (paint == null)
   {
     string str = "Null 'paint' argument.";
     Throwable.__\u003CsuppressFillInStackTrace\u003E();
     throw new IllegalArgumentException(str);
   }
   else if (stroke == null)
   {
     string str = "Null 'stroke' argument.";
     Throwable.__\u003CsuppressFillInStackTrace\u003E();
     throw new IllegalArgumentException(str);
   }
   else
   {
     this.visible = true;
     this.value = value;
     this.paint = paint;
     this.stroke = stroke;
     this.labelVisible = false;
     this.labelGenerator = (CrosshairLabelGenerator) new StandardCrosshairLabelGenerator();
     this.labelAnchor = RectangleAnchor.__\u003C\u003EBOTTOM_LEFT;
     this.labelXOffset = 3.0;
     this.labelYOffset = 3.0;
     this.labelFont = new Font("Tahoma", 0, 12);
     this.labelPaint = (Paint) Color.black;
     this.labelBackgroundPaint = (Paint) new Color(0, 0, (int) byte.MaxValue, 63);
     this.labelOutlineVisible = true;
     this.labelOutlinePaint = (Paint) Color.black;
     this.labelOutlineStroke = (Stroke) new BasicStroke(0.5f);
     this.pcs = new PropertyChangeSupport((object) this);
   }
 }
Exemplo n.º 5
0
 private void InitBlock()
 {
     changes = new PropertyChangeSupport(this);
 }