Exemplo n.º 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;
Exemplo n.º 2
0
        public override void mouseMoved(MouseEvent e)
        {
            Point       p    = e.Point;
            JComponent  comp = (JComponent)e.Source;
            JScrollPane jsp  = (JScrollPane)SwingUtilities.getAncestorOfClass(typeof(JScrollPane), comp);

            if (jsp != null)
            {
                p = SwingUtilities.convertPoint(comp, p, jsp);
                show(jsp, p);
            }
        }