Search in sources :

Example 1 with RefreshRepositoryCommand

use of org.pentaho.mantle.client.commands.RefreshRepositoryCommand in project pentaho-platform by pentaho.

the class BrowserToolbar method createMenus.

/**
 */
private void createMenus() {
    addSpacer(5);
    Label label = new Label(Messages.getString("browse"));
    label.setStyleName("pentaho-titled-toolbar-label");
    // $NON-NLS-1$
    add(label);
    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());
    // $NON-NLS-1$
    refreshBtn.setToolTip(Messages.getString("refresh"));
    add(refreshBtn);
}
Also used : ToolbarButton(org.pentaho.gwt.widgets.client.toolbar.ToolbarButton) RefreshRepositoryCommand(org.pentaho.mantle.client.commands.RefreshRepositoryCommand) Label(com.google.gwt.user.client.ui.Label) Image(com.google.gwt.user.client.ui.Image)

Example 2 with RefreshRepositoryCommand

use of org.pentaho.mantle.client.commands.RefreshRepositoryCommand in project pentaho-platform by pentaho.

the class MantleModel method refreshContent.

@Bindable
public void refreshContent() {
    if (PerspectiveManager.SCHEDULES_PERSPECTIVE.equals(PerspectiveManager.getInstance().getActivePerspective().getId())) {
        Command cmd = new RefreshSchedulesCommand();
        cmd.execute();
    } else {
        Command cmd = new RefreshRepositoryCommand();
        cmd.execute();
    }
}
Also used : RefreshSchedulesCommand(org.pentaho.mantle.client.commands.RefreshSchedulesCommand) RefreshRepositoryCommand(org.pentaho.mantle.client.commands.RefreshRepositoryCommand) OpenKettleStatusCommand(org.pentaho.mantle.client.commands.OpenKettleStatusCommand) FilePropertiesCommand(org.pentaho.mantle.client.commands.FilePropertiesCommand) OpenFileCommand(org.pentaho.mantle.client.commands.OpenFileCommand) NewDropdownCommand(org.pentaho.mantle.client.commands.NewDropdownCommand) Command(com.google.gwt.user.client.Command) PrintCommand(org.pentaho.mantle.client.commands.PrintCommand) OpenDocCommand(org.pentaho.mantle.client.commands.OpenDocCommand) RefreshSchedulesCommand(org.pentaho.mantle.client.commands.RefreshSchedulesCommand) RefreshRepositoryCommand(org.pentaho.mantle.client.commands.RefreshRepositoryCommand) SaveCommand(org.pentaho.mantle.client.commands.SaveCommand) Bindable(org.pentaho.ui.xul.stereotype.Bindable)

Aggregations

RefreshRepositoryCommand (org.pentaho.mantle.client.commands.RefreshRepositoryCommand)2 Command (com.google.gwt.user.client.Command)1 Image (com.google.gwt.user.client.ui.Image)1 Label (com.google.gwt.user.client.ui.Label)1 ToolbarButton (org.pentaho.gwt.widgets.client.toolbar.ToolbarButton)1 FilePropertiesCommand (org.pentaho.mantle.client.commands.FilePropertiesCommand)1 NewDropdownCommand (org.pentaho.mantle.client.commands.NewDropdownCommand)1 OpenDocCommand (org.pentaho.mantle.client.commands.OpenDocCommand)1 OpenFileCommand (org.pentaho.mantle.client.commands.OpenFileCommand)1 OpenKettleStatusCommand (org.pentaho.mantle.client.commands.OpenKettleStatusCommand)1 PrintCommand (org.pentaho.mantle.client.commands.PrintCommand)1 RefreshSchedulesCommand (org.pentaho.mantle.client.commands.RefreshSchedulesCommand)1 SaveCommand (org.pentaho.mantle.client.commands.SaveCommand)1 Bindable (org.pentaho.ui.xul.stereotype.Bindable)1