Package org.pentaho.gwt.widgets.client.toolbar

Examples of org.pentaho.gwt.widgets.client.toolbar.ToolbarButton


    Toolbar bar = new Toolbar();
    bar.setStyleName( "select-folder-toolbar" );
    bar.add( new Label( Messages.getString( "newFolderColon" ), false ) );
    bar.add( Toolbar.GLUE );

    ToolbarButton add = new ToolbarButton( ImageUtil.getThemeableImage( "icon-small", "pentaho-addbutton" ) );
    add.setToolTip( Messages.getString( "createNewFolder" ) );
    add.setCommand( new Command() {
      public void execute() {
        final NewFolderCommand nfc =
            new NewFolderCommand( ( (FileTreeItem) tree.getSelectedItem() ).getRepositoryFile() );
        nfc.setCallback( new ICallback<String>() {
          public void onHandle( String path ) {
View Full Code Here


  }

  private void createTableControls( final ClickHandler newBlockoutHandler ) {
    tableControls.addSpacer( 10 );
    tableControls.add( Toolbar.GLUE );
    ToolbarButton addButton = new ToolbarButton( ImageUtil.getThemeableImage( "pentaho-addbutton" ) );
    addButton.setCommand( new Command() {
      @Override
      public void execute() {
        newBlockoutHandler.onClick( null );
      }
    } );
    addButton.setToolTip( Messages.getString( "blockoutAdd" ) );
    editButton = new ToolbarButton( ImageUtil.getThemeableImage( "pentaho-editbutton" ) );
    editButton.setEnabled( false );
    editButton.setCommand( new Command() {
      @Override
      public void execute() {
        Set<JsJob> jobs = getSelectedSet();
        final JsJob jsJob = jobs.iterator().next();

        IDialogCallback callback = new IDialogCallback() {
          public void okPressed() {
            // delete the old one
            removeBlockout( jsJob );
            refreshCallBack.okPressed();
          }

          public void cancelPressed() {
            refreshCallBack.cancelPressed();
          }
        };

        NewBlockoutScheduleDialog blockoutDialog = new NewBlockoutScheduleDialog( jsJob, callback, false, true );
        table.selectRow( list.indexOf( jsJob ) );
        blockoutDialog.setUpdateMode();
        blockoutDialog.center();
      }
    } );
    editButton.setToolTip( Messages.getString( "blockoutEdit" ) );
    removeButton = new ToolbarButton( ImageUtil.getThemeableImage( "pentaho-deletebutton" ) );
    removeButton.setEnabled( false );
    removeButton.setCommand( new Command() {
      public void execute() {

        final Set<JsJob> selectedSet = getSelectedSet();
View Full Code Here

    bar.add( Toolbar.GLUE );

    // Add control scheduler button
    if ( isAdmin ) {
      final ToolbarButton controlSchedulerButton =
          new ToolbarButton( ImageUtil.getThemeableImage( "icon-small", "icon-start-scheduler" ) );

      controlSchedulerButton.setCommand( new Command() {
        public void execute() {
          toggleSchedulerOnOff( controlSchedulerButton, isScheduler );
        }
      } );
      updateControlSchedulerButtonState( controlSchedulerButton, isScheduler );

      bar.add( controlSchedulerButton );
      bar.addSpacer( 20 );
    }

    // Add filter button
    filterButton.setCommand( new Command() {
      public void execute() {
        if ( filterDialog == null ) {
          filterDialog = new FilterDialog( allJobs, filterDialogCallback );
        } else {
          filterDialog.initUI( allJobs );
        }
        filterDialog.center();
      }
    } );
    filterButton.setToolTip( Messages.getString( "filterSchedules" ) );
    if ( isAdmin ) {
      bar.add( filterButton );
    }

    // Add remove filters button
    filterRemoveButton.setCommand( new Command() {
      public void execute() {
        filterDialog = null;
        filters.clear();
        filterAndShowData();
        filterRemoveButton.setEnabled( false );
        filterButton.setImage( ImageUtil.getThemeableImage( "icon-small", "icon-filter-add" ) );
      }
    } );
    filterRemoveButton.setToolTip( Messages.getString( "removeFilters" ) );
    filterRemoveButton.setEnabled( filters.size() > 0 );
    if ( isAdmin ) {
      bar.add( filterRemoveButton );
    }

    // Add refresh button
    ToolbarButton refresh = new ToolbarButton( ImageUtil.getThemeableImage( "icon-small", "icon-refresh" ) );
    refresh.setToolTip( Messages.getString( "refreshTooltip" ) );
    refresh.setCommand( new Command() {
      public void execute() {
        RefreshSchedulesCommand cmd = new RefreshSchedulesCommand();
        cmd.execute();
      }
    } );
View Full Code Here

    add( GLUE );

    Image refreshImage = ImageUtil.getThemeableImage( "icon-small", "icon-refresh" );
    Image refreshDisabledImage = ImageUtil.getThemeableImage( "icon-small", "icon-refresh", "disabled" );

    refreshBtn = new ToolbarButton( refreshImage, refreshDisabledImage );
    refreshBtn.setCommand( new RefreshRepositoryCommand() );
    refreshBtn.setToolTip( Messages.getString( "refresh" ) ); //$NON-NLS-1$
    add( refreshBtn );
  }
View Full Code Here

TOP

Related Classes of org.pentaho.gwt.widgets.client.toolbar.ToolbarButton

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.