Example #1
0
		public virtual void eventDispatched(AWTEvent param1AWTEvent)
		{
		  bool @bool;
		  if (!(param1AWTEvent is MouseEvent))
		  {
			return;
		  }
		  MouseEvent mouseEvent = (MouseEvent)param1AWTEvent;
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final java.awt.Component src = mouseEvent.getComponent();
		  Component src = mouseEvent.Component;
		  JPopupPanel jPopupPanel = (JPopupPanel)SwingUtilities.getAncestorOfClass(typeof(JPopupPanel), component);
		  if (jPopupPanel == null)
		  {
			CostOSRibbonApplicationMenuPopupPanel.CostOSApplicationMenuContainerPanel costOSApplicationMenuContainerPanel = (CostOSRibbonApplicationMenuPopupPanel.CostOSApplicationMenuContainerPanel)SwingUtilities.getAncestorOfClass(typeof(CostOSRibbonApplicationMenuPopupPanel.CostOSApplicationMenuContainerPanel), component);
			if (costOSApplicationMenuContainerPanel != null || param1AWTEvent.Source.ToString().ToLower().IndexOf("weight") != -1 || component is nomitech.common.laf.CostOSTitlePane)
			{
			  return;
			}
		  }
		  switch (mouseEvent.ID)
		  {
			case 501:
			  @bool = false;
			  if (component is JCommandButton)
			  {
				@bool = ((JCommandButton)component).PopupModel.PopupShowing;
			  }
			  if (!@bool && jPopupPanel != null)
			  {
				PopupPanelManager.defaultManager().hidePopups(jPopupPanel);
				return;
			  }
			  if (component is org.pushingpixels.flamingo.@internal.ui.ribbon.JRibbonTaskToggleButton)
			  {
				JRibbon jRibbon = (JRibbon)SwingUtilities.getAncestorOfClass(typeof(JRibbon), component);
				if (jRibbon != null && FlamingoUtilities.isShowingMinimizedRibbonInPopup(jRibbon))
				{
				  return;
				}
			  }
			  if (!@bool && SwingUtilities.getAncestorOfClass(typeof(javax.swing.plaf.basic.ComboPopup), component) == null)
			  {
				PopupPanelManager.defaultManager().hidePopups(component);
			  }
			  break;
			case 502:
			  if (SwingUtilities.getAncestorOfClass(typeof(javax.swing.plaf.basic.ComboPopup), component) != null)
			  {
				SwingUtilities.invokeLater(() =>
				{
				  PopupPanelManager.defaultManager().hidePopups(src);
				}});
			  break;
Example #2
0
        public override void eventDispatched(AWTEvent awte)
        {
            Window window = (Window)((WindowEvent)awte).Component;

            switch (awte.ID)
            {
            case WindowEvent.WINDOW_DEACTIVATED:
                onSavePosition(window);
                break;

            case WindowEvent.WINDOW_OPENED:
                // this is only a fall-back for windows which do not call
                // loadWindowProperties() on GUI construction time
                // failing to do so will lead to a short flicker, as the window
                // is placed at the default position and moved afterwards after
                // signaling the OPENED event
                onLoadPosition(window);
                break;
            }
        }
		/// <summary>
		/// Dispatches an event to the active input method.
		/// </summary>
		public void dispatchEvent(AWTEvent @event)
		{
		}
		/// <summary>
		/// Processes events on this container.
		/// </summary>
		protected void processEvent(AWTEvent @e)
		{
		}
 /// <summary>
 /// Forwards the AWT event to the listener delegate.
 /// </summary>
 /// <param name="event">  the AWT event </param>
 public virtual void EventDispatched(AWTEvent @event)
 {
     Listener.EventDispatched(@event);
 }
Example #6
0
 /// <summary>
 /// Dispatches an event to the active input method. Called by AWT.
 /// If no input method is available, then the event will never be consumed.
 /// </summary>
 /// <param name="event"> The event </param>
 /// <exception cref="NullPointerException"> if <code>event</code> is null </exception>
 public virtual void DispatchEvent(AWTEvent @event)
 {
     // real implementation is in sun.awt.im.InputContext
 }
 /// <summary>
 /// Potentially coalesce an event being posted with an existing
 /// event.
 /// </summary>
 protected AWTEvent coalesceEvents(AWTEvent @existingEvent, AWTEvent @newEvent)
 {
     return default(AWTEvent);
 }
 /// <summary>
 /// Dispatches an event to the active input method.
 /// </summary>
 public void dispatchEvent(AWTEvent @event)
 {
 }