コード例 #1
0
        public TabContent(BrowserView browserView)
        {
            this.browserView = browserView;
            this.browser     = browserView.Browser;

            this.browser.FinishLoadingFrameEvent += delegate(object sender, FinishLoadingEventArgs e)
            {
                if (e.IsMainFrame)
                {
                    if (PropertyChangeEvent != null)
                    {
                        PropertyChangeEvent.Invoke("PageTitleChanged", null, browser.Title);
                    }
                }
            };

            browserContainer = CreateBrowserContainer();
            toolBar          = CreateToolBar(browserView);

            container = new DockPanel();
            container.Children.Add(browserContainer);
            container.Margin = new Thickness(0, 30, 0, 0);
            this.Children.Add(toolBar);
            this.Children.Add(container);
        }
コード例 #2
0
ファイル: TabContent.cs プロジェクト: PIM4/integriert
        public TabContent(BrowserView browserView)
        {
            this.browserView = browserView;
            this.browser     = browserView.Browser;

            this.browser.FinishLoadingFrameEvent += delegate(object sender, FinishLoadingEventArgs e)
            {
                if (e.IsMainFrame)
                {
                    if (PropertyChangeEvent != null)
                    {
                        PropertyChangeEvent.Invoke("PageTitleChanged", null, browser.Title);
                    }
                }
            };

            this.browserContainer      = CreateBrowserContainer();
            this.browserContainer.Dock = DockStyle.Fill;


            this.toolBar          = CreateToolBar(browserView);
            this.toolBar.Dock     = DockStyle.Top;
            this.toolBar.AutoSize = true;

            this.ColumnCount = 1;
            this.Dock        = System.Windows.Forms.DockStyle.Fill;
            this.Location    = new System.Drawing.Point(0, 0);
            this.RowCount    = 2;
            this.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F));


            this.Controls.Add(toolBar, 0, 0);
            this.Controls.Add(browserContainer, 0, 1);
        }
コード例 #3
0
ファイル: PIRender.cs プロジェクト: carlhuth/GenXSource
 public PIRender()
 {
     InitializeComponent();
     OnPropertyChange += new PropertyChangeEvent(delegate(CPIProperty propertyEntity, object propertyObj)
     {
     });
 }
コード例 #4
0
            public virtual void propertyChange(PropertyChangeEvent param1PropertyChangeEvent)
            {
                string str = param1PropertyChangeEvent.PropertyName;

                if ("resizable".Equals(str) || "state".Equals(str))
                {
                    Frame frame = outerInstance.Frame;
                    if (frame != null)
                    {
                        outerInstance.setState(frame.ExtendedState, true);
                    }
                    if ("resizable".Equals(str))
                    {
                        outerInstance.RootPane.repaint();
                    }
                }
                else if ("title".Equals(str))
                {
                    outerInstance.repaint();
                }
                else if ("componentOrientation".Equals(str))
                {
                    outerInstance.revalidate();
                    outerInstance.repaint();
                }
                else if ("iconImage".Equals(str))
                {
                    outerInstance.updateSystemIcon();
                    outerInstance.revalidate();
                    outerInstance.repaint();
                }
            }
コード例 #5
0
                public void propertyChange(PropertyChangeEvent propEvent)
                {
                    XMLParserNotification notification = (XMLParserNotification)propEvent;

                    if (notificationListener != null)
                    {
                        notificationListener.notify(notification);
                        return;
                    }

                    String msg;
                    if (notification.getEvent() != null)
                    {
                        msg = Logging.getMessage(notification.getMessage(), notification.getEvent().ToString(),
                                                 notification.getEvent().getLocation().getLineNumber(),
                                                 notification.getEvent().getLocation().getColumnNumber(),
                                                 notification.getEvent().getLocation().getCharacterOffset());
                    }
                    else
                    {
                        msg = Logging.getMessage(notification.getMessage(), "", "");
                    }

                    if (notification.getPropertyName().Equals(XMLParserNotification.EXCEPTION))
                    {
                        Logging.logger().log(Level.WARNING, msg);
                    }
                    else if (notification.getPropertyName().Equals(XMLParserNotification.UNRECOGNIZED))
                    {
                        Logging.logger().log(Level.WARNING, msg);
                    }
                }
コード例 #6
0
ファイル: ViewStack.cs プロジェクト: onamoni/edriven-gui
        private void InternalDispatchEvent(CollectionEventKind kind, object item /* = null*/, int location /* = -1*/)
        {
            // copied from ArrayList
            //Debug.Log(string.Format("InternalDispatchEvent: {0}, {1}, {2}", kind, item, location));
            if (HasEventListener(CollectionEvent.COLLECTION_CHANGE))
            {
                var ce = new CollectionEvent(CollectionEvent.COLLECTION_CHANGE)
                {
                    Kind = kind
                };
                ce.Items.Add(item);
                ce.Location = location;
                DispatchEvent(ce);
            }

            // now dispatch a complementary PropertyChangeEvent
            if (HasEventListener(PropertyChangeEvent.PROPERTY_CHANGE) &&
                (kind == CollectionEventKind.ADD || kind == CollectionEventKind.REMOVE))
            {
                var objEvent = new PropertyChangeEvent(PropertyChangeEvent.PROPERTY_CHANGE)
                {
                    Property = location.ToString()
                };
                if (kind == CollectionEventKind.ADD)
                {
                    objEvent.NewValue = item;
                }
                else
                {
                    objEvent.OldValue = item;
                }
                DispatchEvent(objEvent);
            }
        }
コード例 #7
0
        /// <summary>
        /// Used for deffered parts
        /// </summary>
        /// <param name="e"></param>
        private void SkinPropertyChangeHandler(Event e)
        {
            if (null != SkinParts)
            {
                PropertyChangeEvent pce = (PropertyChangeEvent)e;
                string skinPartID       = pce.Property;
                if (SkinParts.ContainsKey(skinPartID))
                {
                    var part = CoreReflector.GetValue(Skin, skinPartID);

                    if (pce.NewValue == null)
                    {
                        if (!(part is IFactory))
                        {
                            PartRemoved(skinPartID, part);
                        }
                        CoreReflector.SetValue(this, skinPartID, pce.NewValue);
                    }
                    else
                    {
                        part = pce.NewValue;
                        if (!(part is IFactory))
                        {
                            PartAdded(skinPartID, part);
                        }
                    }
                }
            }
        }
コード例 #8
0
ファイル: AM.cs プロジェクト: pcannon67/FAtiMA-Toolkit
        private BaseEvent SaveEventHelper(uint eventId, Name eventName, ulong timestamp)
        {
            AssertEventNameValidity(eventName);
            if (eventName.HasSelf() && !eventName.ToString().Contains("Property-Change"))
            {
                throw new Exception("Cannot record an event name containing \"Self\" keywords");
            }

            BaseEvent eventRecord;

            if (ActionEvent.IsActionEvent(eventName))
            {
                eventRecord = new ActionEvent(eventId, eventName, timestamp);
            }
            else if (PropertyChangeEvent.IsPropertyChangeEvent(eventName))
            {
                eventRecord = new PropertyChangeEvent(eventId, eventName, timestamp);
            }
            else
            {
                throw new Exception("Unknown Event Type");
            }

            AddRecord(eventRecord);
            return(eventRecord);
        }
コード例 #9
0
            private void AddProperty(string root, string propertyID, bool settable)
            {
                var prop = new NodeProperty(root + propertyID, propertyID, settable);

                prop.ChangeEvent += (diff) => PropertyChangeEvent?.Invoke(this, diff);
                Properties.Add(prop);
            }
コード例 #10
0
    // ---- private methods ----

    private static void DispatchPropertyChangeEvent(PropertyChangeEvent evt)
    {
        if (evt != null)
        {
            evt(changeFlags);
        }
    }
コード例 #11
0
 public void propertyChange(PropertyChangeEvent evt)
 {
     //noinspection StringEquality
     if (evt.getPropertyName() == WorldWind.SHUTDOWN_EVENT)
     {
         this.shutdown();
     }
 }
コード例 #12
0
ファイル: PIRender.cs プロジェクト: xuchuansheng/GenXSource
 public PIRender()
 {
     InitializeComponent();
     OnPropertyChange += new PropertyChangeEvent(delegate(CPIProperty propertyEntity, object propertyObj)
     {
        
     });
 }
コード例 #13
0
 public void propertyChange(PropertyChangeEvent param1PropertyChangeEvent)
 {
     if ("contextualGroupHueColor".Equals(param1PropertyChangeEvent.PropertyName))
     {
         Color color = (Color)param1PropertyChangeEvent.NewValue;
         outerInstance.commandButton.Background = color;
     }
 }
コード例 #14
0
 public void NewPropertyChangeEvent(PropertyChangeEvent e)
 {
     if ((int)e.NewValue == 0)
     {
         print("checked");
         StartCoroutine(SpawnEnemy(nextSpawnCount));
         nextSpawnCount++;
     }
 }
コード例 #15
0
 public void firePropertyChange(PropertyChangeEvent propertyChangeEvent)
 {
     if (propertyChangeEvent == null)
     {
         String msg = Logging.getMessage("nullValue.PropertyChangeEventIsNull");
         Logging.logger().severe(msg);
         throw new ArgumentException(msg);
     }
     this.getChangeSupport().firePropertyChange(propertyChangeEvent);
 }
コード例 #16
0
 /// <summary>
 /// implementing XPropertyChangeListener method
 /// </summary>
 /// <param name="evt">The evt.</param>
 protected override void propertyChange(PropertyChangeEvent evt)
 {
     if (evt.Source == ((XModel)this.PagesSupplier).getCurrentController())
     {
         if (evt.PropertyName.Equals("VisibleArea"))
         {
             refreshDrawViewProperties((XPropertySet)evt.Source);
             OnViewOrZoomChangeEvent();
         }
     }
 }
コード例 #17
0
 public void propertyChange(PropertyChangeEvent param1PropertyChangeEvent)
 {
     if ("loaded".Equals(param1PropertyChangeEvent.PropertyName) && true.Equals(param1PropertyChangeEvent.NewValue))
     {
         Tile tile = (Tile)param1PropertyChangeEvent.Source;
         if (tile.Zoom == outerInstance.Zoom)
         {
             outerInstance.repaint();
         }
     }
 }
コード例 #18
0
        public void propertyChange(PropertyChangeEvent propertyChangeEvent)
        {
            if (propertyChangeEvent == null)
            {
                String msg = Logging.getMessage("nullValue.PropertyChangeEventIsNull");
                Logging.logger().severe(msg);
                throw new ArgumentException(msg);
            }

            this.redraw(); // Queue a JOGL display request.
        }
コード例 #19
0
        /**
         * The property change listener for <em>this</em> instance.
         * Receives property change notifications that this instance has registered with other property change notifiers.
         * @param propertyChangeEvent the event
         * @throws ArgumentException if <code>propertyChangeEvent</code> is null
         */
        public void propertyChange(PropertyChangeEvent propertyChangeEvent)
        {
            if (propertyChangeEvent == null)
            {
                string msg = Logging.getMessage("nullValue.PropertyChangeEventIsNull");
                Logging.logger().severe(msg);
                throw new ArgumentException(msg);
            }

            // Notify all *my* listeners of the change that I caught
            base.firePropertyChange(propertyChangeEvent);
        }
コード例 #20
0
ファイル: Scroller.cs プロジェクト: onamoni/edriven-gui
        //--------------------------------------------------------------------------
        //
        // Event Handlers
        //
        //--------------------------------------------------------------------------

        private void ViewportPropertyChangeHandler(Event e)
        {
            PropertyChangeEvent pce = (PropertyChangeEvent)e;

            switch (pce.Property)
            {
            case "contentWidth":
            case "contentHeight":
                InvalidateSkin();
                break;
            }
        }
コード例 #21
0
ファイル: ArrayList.cs プロジェクト: onamoni/edriven-gui
        /// <summary>
        /// Notify the view that an item has been updated
        /// </summary>
        /// <param name="item"></param>
        /// <param name="property"></param>
        /// <param name="oldValue"></param>
        /// <param name="newValue"></param>
        public void ItemUpdated(object item, object property = null, object oldValue = null, object newValue = null)
        {
            PropertyChangeEvent pce = new PropertyChangeEvent(PropertyChangeEvent.PROPERTY_CHANGE)
            {
                Kind     = PropertyChangeEventKind.UPDATE,
                Source   = item,
                Property = property.ToString(),
                OldValue = oldValue,
                NewValue = newValue
            };

            ItemUpdateHandler(pce);
        }
コード例 #22
0
 void XVetoableChangeListener.vetoableChange(PropertyChangeEvent aEvent)
 {
     if (VetoableChange != null)
     {
         try
         {
             VetoableChange.Invoke(this, new ForwardedEventArgs(aEvent));
         }
         catch (Exception e)
         {
             Logger.Instance.Log(LogPriority.ALWAYS, this, "[ERROR] Could not forward vetoable property event: " + e);
         }
     }
 }
コード例 #23
0
 void XPropertyChangeListener.propertyChange(PropertyChangeEvent evt)
 {
     if (PropertyChange != null)
     {
         try
         {
             PropertyChange.Invoke(this, new ForwardedEventArgs(evt));
         }
         catch (Exception e)
         {
             Logger.Instance.Log(LogPriority.ALWAYS, this, "[ERROR] Could not forward property change event: " + e);
         }
     }
 }
コード例 #24
0
ファイル: ArrayList.cs プロジェクト: onamoni/edriven-gui
        /**
         *  Place the item at the specified index.
         *  If an item was already at that index the new item will replace it and it
         *  will be returned.
         *
         *  Param:  item the new value for the index
         *  Param:  index the index at which to place the item
         *  Returns: the item that was replaced, null if none
         *  @throws RangeError if index is less than 0 or greater than or equal to length
         */
        public virtual object SetItemAt(object item, int index)
        {
            if (index < 0 || index >= Length)
            {
                throw new IndexOutOfRangeException("Range error");
            }

            object oldItem = Source[index];

            Source[index] = item;
            StopTrackUpdates(oldItem);
            StartTrackUpdates(item);

            //dispatch the appropriate events
            if (_dispatchEvents == 0)
            {
                var hasCollectionListener      = HasEventListener(CollectionEvent.COLLECTION_CHANGE);
                var hasPropertyListener        = HasEventListener(PropertyChangeEvent.PROPERTY_CHANGE);
                PropertyChangeEvent updateInfo = null;

                if (hasCollectionListener || hasPropertyListener)
                {
                    updateInfo = new PropertyChangeEvent(PropertyChangeEvent.PROPERTY_CHANGE)
                    {
                        Kind     = PropertyChangeEventKind.UPDATE,
                        OldValue = oldItem,
                        NewValue = item,
                        Property = index.ToString()
                    };
                }

                if (hasCollectionListener)
                {
                    CollectionEvent ce = new CollectionEvent(CollectionEvent.COLLECTION_CHANGE)
                    {
                        Kind     = CollectionEventKind.REPLACE,
                        Location = index
                    };
                    ce.Items.Add(updateInfo);
                    DispatchEvent(ce);
                }

                if (hasPropertyListener)
                {
                    DispatchEvent(updateInfo);
                }
            }
            return(oldItem);
        }
コード例 #25
0
        private void RedispatchLayoutEvent(Event e)
        {
            PropertyChangeEvent pce = e as PropertyChangeEvent;

            if (null != pce)
            {
                switch (pce.Property)
                {
                case "verticalScrollPosition":
                case "horizontalScrollPosition":
                    DispatchEvent(e);
                    break;
                }
            }
        }
コード例 #26
0
ファイル: ArrayList.cs プロジェクト: onamoni/edriven-gui
// ReSharper disable MemberCanBePrivate.Global
        protected void ItemUpdateHandler(Event e)
// ReSharper restore MemberCanBePrivate.Global
        {
            PropertyChangeEvent pce = (PropertyChangeEvent)e;

            InternalDispatchEvent(CollectionEventKind.UPDATE, e);
            // need to dispatch object event now
            if (_dispatchEvents == 0 && HasEventListener(PropertyChangeEvent.PROPERTY_CHANGE))
            {
                var objEvent = (PropertyChangeEvent)pce.Clone();
                var index    = GetItemIndex(e.Target);
                objEvent.Property = index + "." + pce.Property;
                DispatchEvent(objEvent);
            }
        }
コード例 #27
0
        protected internal void  notifyListener(string field, System.Object oldValue, System.Object newValue)
        {
            if (listeners == null || listeners.Count == 0)
            {
                return;
            }
            else
            {
                PropertyChangeEvent event_Renamed = new PropertyChangeEvent(this, field, oldValue, newValue);

                for (int i = 0; i < listeners.Count; i++)
                {
                    ((java.beans.PropertyChangeListener)listeners[i]).propertyChange(event_Renamed);
                }
            }
        }
コード例 #28
0
        protected override void propertyChange(PropertyChangeEvent evt)
        {
            //System.Diagnostics.Debug.WriteLine("property changed: " + evt.PropertyName);
            if (evt.Source == Shape &&
                (evt.PropertyName.Equals("Position") || evt.PropertyName.Equals("Size")) &&
                Shape is XPropertySet)
            {
                XPropertySet shapePropertySet = (XPropertySet)Shape;
                {
                    // Rectangle propertyBoundRect = (Rectangle)shapePropertySet.getPropertyValue("BoundRect").Value;
                    Rectangle propertyBoundRect = (Rectangle)shapePropertySet.getPropertyValue("FrameRect").Value;
                    currentBoundRect.X      = propertyBoundRect.X;
                    currentBoundRect.Y      = propertyBoundRect.Y;
                    currentBoundRect.Width  = propertyBoundRect.Width;
                    currentBoundRect.Height = propertyBoundRect.Height;

                    OnBoundRectChangeEvent();
                }
            }
        }
コード例 #29
0
ファイル: ScrollBarBase.cs プロジェクト: onamoni/edriven-gui
        //---------------------------------
        // Viewport property changes
        //---------------------------------

        private void ViewportPropertyChangeHandler(Event e)
        {
            PropertyChangeEvent pce = (PropertyChangeEvent)e;

            //Debug.Log("ViewportPropertyChangeHandler: " + pce.Property);
            switch (pce.Property)
            {
            case "contentWidth":
                ViewportContentWidthChangeHandler(e);
                break;

            case "contentHeight":
                ViewportContentHeightChangeHandler(e);
                break;

            case "horizontalScrollPosition":
                ViewportHorizontalScrollPositionChangeHandler(e);
                break;

            case "verticalScrollPosition":
                ViewportVerticalScrollPositionChangeHandler(e);
                break;
            }
        }
コード例 #30
0
 /// <summary>
 /// not implemented yet
 /// </summary>
 /// <param name="event_Renamed">The event_ renamed.</param>
 public virtual void propertyChange(PropertyChangeEvent event_Renamed)
 {
     Object source = event_Renamed.getSource;
     try
     {
         modifyObject(source);
     }
     catch (RetractException e)
     {
         TraceLogger.Instance.Debug(e);
     }
     catch (AssertException e)
     {
         TraceLogger.Instance.Debug(e);
     }
 }
コード例 #31
0
 void XVetoableChangeListener.vetoableChange(PropertyChangeEvent aEvent)
 {
     if (VetoableChange != null)
     {
         try
         {
             VetoableChange.Invoke(this, new ForwardedEventArgs(aEvent));
         }
         catch (Exception e)
         {
             Logger.Instance.Log(LogPriority.ALWAYS, this, "[ERROR] Could not forward vetoable property event: " + e);
         }
     }
 }
コード例 #32
0
 // ---- private methods ----
 private static void DispatchPropertyChangeEvent(PropertyChangeEvent evt)
 {
     if (evt != null) evt(changeFlags);
 }
コード例 #33
0
 protected virtual void vetoableChange(PropertyChangeEvent aEvent) { }
コード例 #34
0
 protected virtual void propertyChange(PropertyChangeEvent evt) { }
コード例 #35
0
        protected override void propertyChange(PropertyChangeEvent evt)
        {
            //System.Diagnostics.Debug.WriteLine("property changed: " + evt.PropertyName);
            if (evt.Source == Shape &&
                (evt.PropertyName.Equals("Position") || evt.PropertyName.Equals("Size")) &&
                Shape is XPropertySet)
            {
                XPropertySet shapePropertySet = (XPropertySet)Shape;
                {
                    // Rectangle propertyBoundRect = (Rectangle)shapePropertySet.getPropertyValue("BoundRect").Value;
                    Rectangle propertyBoundRect = (Rectangle)shapePropertySet.getPropertyValue("FrameRect").Value;
                    currentBoundRect.X = propertyBoundRect.X;
                    currentBoundRect.Y = propertyBoundRect.Y;
                    currentBoundRect.Width = propertyBoundRect.Width;
                    currentBoundRect.Height = propertyBoundRect.Height;

                    OnBoundRectChangeEvent();
                }
            }
        }
コード例 #36
0
 protected virtual void propertiesChange(PropertyChangeEvent[] aEvent) { }
コード例 #37
0
 public void propertyChange(PropertyChangeEvent eventJ)
 {
     PropertyChangeListener listener = (PropertyChangeListener)getListener();
     listener.propertyChange(eventJ);
 }
コード例 #38
0
 /// <summary>
 /// implementing XPropertyChangeListener method
 /// </summary>
 /// <param name="evt">The evt.</param>
 protected override void propertyChange(PropertyChangeEvent evt)
 {
     if (evt.Source == ((XModel)this.PagesSupplier).getCurrentController())
     {
         if (evt.PropertyName.Equals("VisibleArea"))
         {
             refreshDrawViewProperties((XPropertySet)evt.Source);
             OnViewOrZoomChangeEvent();
         }
     }
 }
コード例 #39
0
 public virtual void propertyChange(PropertyChangeEvent paramPropertyChangeEvent)
 {
 }
コード例 #40
0
 protected override void propertiesChange(PropertyChangeEvent[] aEvent)
 {
     foreach (PropertyChangeEvent evt in aEvent)
     {
         if (evt.Source == DrawPage)
         {
             System.Diagnostics.Debug.WriteLine(evt.PropertyName + " are changed to " + evt.NewValue.Value.ToString() + ", further: " + evt.Further);
         }
     }
 }
コード例 #41
0
ファイル: AM.cs プロジェクト: GAIPS-INESC-ID/FAtiMA-Toolkit
        private BaseEvent SaveEventHelper(uint eventId, Name eventName, ulong timestamp)
        {
            AssertEventNameValidity(eventName);
            if (eventName.HasSelf())
                throw new Exception("Cannot record an event name containing \"Self\" keywords");

            BaseEvent eventRecord;
            if (ActionEvent.IsActionEvent(eventName))
            {
                eventRecord = new ActionEvent(eventId, eventName, timestamp);
            }
            else if (PropertyChangeEvent.IsPropertyChangeEvent(eventName))
            {
                eventRecord = new PropertyChangeEvent(eventId, eventName, timestamp);
            }else
                throw new Exception("Unknown Event Type");

            AddRecord(eventRecord);
            return eventRecord;
        }
コード例 #42
0
 protected override void propertiesChange(PropertyChangeEvent[] aEvent) { }
コード例 #43
0
 protected override void vetoableChange(PropertyChangeEvent aEvent)
 {
     //TODO: check if the new name is unique
 }
コード例 #44
0
 public void propertyChange(PropertyChangeEvent @event)
 {
     throw new System.NotImplementedException();
 }
コード例 #45
0
 void XPropertyChangeListener.propertyChange(PropertyChangeEvent evt)
 {
     if (PropertyChange != null)
     {
         try
         {
             PropertyChange.Invoke(this, new ForwardedEventArgs(evt));
         }
         catch (Exception e)
         {
             Logger.Instance.Log(LogPriority.ALWAYS, this, "[ERROR] Could not forward property change event: " + e);
         }
     }
 }
コード例 #46
0
        /// <summary>
        /// Forwards the property change event to the listener delegate.
        /// </summary>
        /// <param name="event">  the property change event
        /// </param>
        /// <exception cref="PropertyVetoException"> if the recipient wishes the property
        ///                                  change to be rolled back </exception>
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: public void vetoableChange(PropertyChangeEvent event) throws PropertyVetoException
        public virtual void VetoableChange(PropertyChangeEvent @event)
        {
            Listener.VetoableChange(@event);
        }
コード例 #47
0
 protected override void vetoableChange(PropertyChangeEvent aEvent)
 {
     if (aEvent.Source == DrawPage)
     {
         System.Diagnostics.Debug.WriteLine(aEvent.PropertyName + " vetoable changed to " + aEvent.NewValue.Value.ToString() + ", further: " + aEvent.Further);
     }
 }