Package org.pentaho.mantle.client.events

Examples of org.pentaho.mantle.client.events.SolutionBrowserCloseEvent


              if ( getTab( getSelectedTabIndex() ) != null ) {
                selectTabContent = getTab( getSelectedTabIndex() ).getContent();
              }
              List<FileItem> selectedItems =
                  SolutionBrowserPanel.getInstance().getFilesListPanel().getSelectedFileItems();
              EventBusUtil.EVENT_BUS.fireEvent( new SolutionBrowserCloseEvent( selectTabContent, selectedItems ) );
            }
          }
        } );
        confirmDialog.center();
        return;
      }

      ( (CustomFrame) ( (IFrameTabPanel) closeTab.getContent() ).getFrame() ).removeEventListeners( frameElement );
      clearClosingFrame( frameElement );
    }
    super.closeTab( closeTab, invokePreTabCloseHook );

    // since we can't entirely reclaim the frame resources held, keep some around
    // so we can minimize the extra leakage caused by constantly created more
    // let's only keep 5 of these guys around so at least some of the resources
    // can be cleaned up (maybe just wishful thinking)
    Widget w = closeTab.getContent();
    if ( w instanceof IFrameTabPanel && freeFrames.size() < 5 ) {
      // wipe out any file info so it doesn't impact future usages of this frame
      SolutionFileInfo sfi = null;
      IFrameTabPanel iFrameTabPanel = (IFrameTabPanel) w;
      iFrameTabPanel.setFileInfo( sfi );
      freeFrames.add( iFrameTabPanel );
    }

    if ( getTabCount() == 0 ) {
      allTabsClosed();
      Widget selectTabContent = null;
      if ( getTab( getSelectedTabIndex() ) != null ) {
        selectTabContent = getTab( getSelectedTabIndex() ).getContent();
      }
      List<FileItem> selectedItems = SolutionBrowserPanel.getInstance().getFilesListPanel().getSelectedFileItems();
      EventBusUtil.EVENT_BUS.fireEvent( new SolutionBrowserCloseEvent( selectTabContent, selectedItems ) );
    }
  }
View Full Code Here

TOP

Related Classes of org.pentaho.mantle.client.events.SolutionBrowserCloseEvent

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.