Package org.pentaho.mantle.client.solutionbrowser

Examples of org.pentaho.mantle.client.solutionbrowser.SolutionBrowserPanel


public class ShowBrowserCommand implements Command {
  private boolean state;

  public ShowBrowserCommand() {
    final SolutionBrowserPanel solutionBrowserPerspective = SolutionBrowserPanel.getInstance();
    this.state = !solutionBrowserPerspective.isNavigatorShowing();
  }
View Full Code Here


  public ShowBrowserCommand( boolean flag ) {
    this.state = flag;
  }

  public void execute() {
    final SolutionBrowserPanel solutionBrowserPerspective = SolutionBrowserPanel.getInstance();
    solutionBrowserPerspective.setNavigatorShowing( state );
    if ( solutionBrowserPerspective != null ) {
      if ( PerspectiveManager.getInstance().getActivePerspective().getId().equalsIgnoreCase(
          PerspectiveManager.OPENED_PERSPECTIVE ) ) {
        PerspectiveManager.getInstance().setPerspective( PerspectiveManager.OPENED_PERSPECTIVE );
      }
View Full Code Here

  }

  protected void performOperation() {

    if ( this.getSolutionPath() != null ) {
      SolutionBrowserPanel sbp = SolutionBrowserPanel.getInstance();
      sbp.getFile( this.getSolutionPath(), new SolutionFileHandler() {
        @Override
        public void handle( RepositoryFile repositoryFile ) {
          ImportFileCommand.this.repositoryFile = repositoryFile;
          performOperation( true );
        }
View Full Code Here

    this.solutionPath = solutionPath;
  }

  protected void performOperation() {

    final SolutionBrowserPanel sbp = SolutionBrowserPanel.getInstance();
    if ( this.getSolutionPath() != null ) {
      sbp.getFile( this.getSolutionPath(), new SolutionFileHandler() {
        @Override
        public void handle( RepositoryFile repositoryFile ) {
          ExportFileCommand.this.setRepositoryFile( repositoryFile );
          performOperation( true );
        }
View Full Code Here

          if ( event.getKeyCode() == KeyCodes.KEY_UP ) {
            selectPreviousItem( selectedFileItems );
          } else if ( event.getKeyCode() == KeyCodes.KEY_DOWN ) {
            selectNextItem( selectedFileItems );
          } else if ( event.getKeyCode() == KeyCodes.KEY_ENTER ) {
            SolutionBrowserPanel sbp = SolutionBrowserPanel.getInstance();
            FilesListPanel flp = sbp.getFilesListPanel();
            List<FileItem> items = flp.getSelectedFileItems();
            if ( items != null && items.size() == 1 ) {
              sbp.openFile( items.get( 0 ).getRepositoryFile(), COMMAND.RUN );
            }
          }
        }
        super.onBrowserEvent( event );
      }
View Full Code Here

  public void execute() {
    if ( popupMenu != null ) {
      popupMenu.hide();
    }

    SolutionBrowserPanel sbp = SolutionBrowserPanel.getInstance();
    FilesListPanel flp = sbp.getFilesListPanel();
    if ( flp.getSelectedFileItems() == null || flp.getSelectedFileItems().size() < 1 ) {
      return;
    }

    List<FileItem> selectedItems = flp.getSelectedFileItems();
    FileItem selectedItem = selectedItems.get( 0 );

    if ( mode == COMMAND.RUN || mode == COMMAND.NEWWINDOW ) {
      if ( selectedItem != null ) {
        sbp.openFile( selectedItem.getRepositoryFile(), mode );
      }
    } else if ( mode == COMMAND.PROPERTIES ) {
      new FilePropertiesCommand( fileSummary == null ? fileSummaryProvider.getRepositoryFiles().get( 0 ) : fileSummary )
          .execute();
    } else if ( mode == COMMAND.EDIT ) {
      sbp.editFile();
    } else if ( mode == COMMAND.CREATE_FOLDER ) {
      new NewFolderCommand( fileSummary ).execute();
    } else if ( mode == COMMAND.BACKGROUND ) {
      new RunInBackgroundCommand( selectedItem ).execute( true );
    } else if ( mode == COMMAND.SCHEDULE_NEW ) {
      ScheduleHelper.createSchedule( selectedItem.getRepositoryFile() );
    } else if ( mode == COMMAND.SHARE ) {
      new ShareFileCommand().execute();
    } else if ( mode == COMMAND.IMPORT ) {
      new ImportFileCommand( fileSummary == null ? fileSummaryProvider.getRepositoryFiles().get( 0 ) : fileSummary )
          .execute();
    } else if ( mode == COMMAND.EXPORT ) {
      new ExportFileCommand( fileSummary == null ? fileSummaryProvider.getRepositoryFiles().get( 0 ) : fileSummary )
          .execute();
    } else if ( mode == COMMAND.FAVORITE ) {
      sbp.addFavorite( selectedItem.getRepositoryFile().getPath(), selectedItem.getRepositoryFile().getTitle() );
      FavoritePickList.getInstance().save( "favorites" );
    } else if ( mode == COMMAND.FAVORITE_REMOVE ) {
      sbp.removeFavorite( selectedItem.getRepositoryFile().getPath() );
      FavoritePickList.getInstance().save( "favorites" );
    }
  }
View Full Code Here

TOP

Related Classes of org.pentaho.mantle.client.solutionbrowser.SolutionBrowserPanel

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.