Search in sources :

Example 6 with XulToolbarbutton

use of org.pentaho.ui.xul.components.XulToolbarbutton in project pentaho-platform by pentaho.

the class MantleController method setToolBarButtonEnabled.

public void setToolBarButtonEnabled(String id, boolean enabled) {
    XulToolbarbutton button = (XulToolbarbutton) document.getElementById(id);
    button.setVisible(enabled);
}
Also used : XulToolbarbutton(org.pentaho.ui.xul.components.XulToolbarbutton)

Example 7 with XulToolbarbutton

use of org.pentaho.ui.xul.components.XulToolbarbutton in project pentaho-kettle by pentaho.

the class Spoon method newFileDropDown.

/*
   * public void newFileDropDown() { newFileDropDown(toolbar); }
   */
public void newFileDropDown() {
    // Drop down a list below the "New" icon (new.png)
    // First problem: where is that icon?
    XulToolbarbutton button = (XulToolbarbutton) this.mainToolbar.getElementById("file-new");
    Object object = button.getManagedObject();
    if (object instanceof ToolItem) {
        // OK, let's determine the location of this widget...
        // 
        ToolItem item = (ToolItem) object;
        Rectangle bounds = item.getBounds();
        org.eclipse.swt.graphics.Point p = item.getParent().toDisplay(new org.eclipse.swt.graphics.Point(bounds.x, bounds.y));
        fileMenus.setLocation(p.x, p.y + bounds.height);
        fileMenus.setVisible(true);
    }
}
Also used : Rectangle(org.eclipse.swt.graphics.Rectangle) RepositoryObject(org.pentaho.di.repository.RepositoryObject) SimpleLoggingObject(org.pentaho.di.core.logging.SimpleLoggingObject) FileObject(org.apache.commons.vfs2.FileObject) XulToolbarbutton(org.pentaho.ui.xul.components.XulToolbarbutton) ToolItem(org.eclipse.swt.widgets.ToolItem)

Example 8 with XulToolbarbutton

use of org.pentaho.ui.xul.components.XulToolbarbutton in project pentaho-kettle by pentaho.

the class TransLogDelegate method pauseLog.

public void pauseLog() {
    XulToolbarbutton pauseContinueButton = (XulToolbarbutton) toolbar.getElementById("log-pause");
    ToolItem swtToolItem = (ToolItem) pauseContinueButton.getManagedObject();
    if (logBrowser.isPaused()) {
        logBrowser.setPaused(false);
        if (pauseContinueButton != null) {
            swtToolItem.setImage(GUIResource.getInstance().getImagePauseLog());
        }
    } else {
        logBrowser.setPaused(true);
        if (pauseContinueButton != null) {
            swtToolItem.setImage(GUIResource.getInstance().getImageContinueLog());
        }
    }
}
Also used : XulToolbarbutton(org.pentaho.ui.xul.components.XulToolbarbutton) ToolItem(org.eclipse.swt.widgets.ToolItem)

Example 9 with XulToolbarbutton

use of org.pentaho.ui.xul.components.XulToolbarbutton in project pentaho-kettle by pentaho.

the class JobGraph method disposeExtraView.

private void disposeExtraView() {
    extraViewComposite.dispose();
    sashForm.layout();
    sashForm.setWeights(new int[] { 100 });
    XulToolbarbutton button = (XulToolbarbutton) toolbar.getElementById("job-show-results");
    button.setTooltiptext(BaseMessages.getString(PKG, "Spoon.Tooltip.ShowExecutionResults"));
    ToolItem swtToolItem = (ToolItem) button.getManagedObject();
    swtToolItem.setImage(GUIResource.getInstance().getImageShowResults());
}
Also used : XulToolbarbutton(org.pentaho.ui.xul.components.XulToolbarbutton) ToolItem(org.eclipse.swt.widgets.ToolItem)

Example 10 with XulToolbarbutton

use of org.pentaho.ui.xul.components.XulToolbarbutton in project pentaho-kettle by pentaho.

the class JobLogDelegate method pauseLog.

public void pauseLog() {
    XulToolbarbutton pauseContinueButton = (XulToolbarbutton) toolbar.getElementById("log-pause");
    ToolItem swtToolItem = (ToolItem) pauseContinueButton.getManagedObject();
    if (logBrowser.isPaused()) {
        logBrowser.setPaused(false);
        if (pauseContinueButton != null) {
            swtToolItem.setImage(GUIResource.getInstance().getImagePauseLog());
        }
    } else {
        logBrowser.setPaused(true);
        if (pauseContinueButton != null) {
            swtToolItem.setImage(GUIResource.getInstance().getImageContinueLog());
        }
    }
}
Also used : XulToolbarbutton(org.pentaho.ui.xul.components.XulToolbarbutton) ToolItem(org.eclipse.swt.widgets.ToolItem)

Aggregations

XulToolbarbutton (org.pentaho.ui.xul.components.XulToolbarbutton)12 ToolItem (org.eclipse.swt.widgets.ToolItem)7 XulMenuitem (org.pentaho.ui.xul.components.XulMenuitem)3 CTabItem (org.eclipse.swt.custom.CTabItem)2 EngineMetaInterface (org.pentaho.di.core.EngineMetaInterface)2 PurRepository (org.pentaho.di.repository.pur.PurRepository)2 Spoon (org.pentaho.di.ui.spoon.Spoon)2 XulMenu (org.pentaho.ui.xul.containers.XulMenu)2 FileObject (org.apache.commons.vfs2.FileObject)1 Rectangle (org.eclipse.swt.graphics.Rectangle)1 KettleException (org.pentaho.di.core.exception.KettleException)1 SimpleLoggingObject (org.pentaho.di.core.logging.SimpleLoggingObject)1 JobMeta (org.pentaho.di.job.JobMeta)1 Repository (org.pentaho.di.repository.Repository)1 RepositoryObject (org.pentaho.di.repository.RepositoryObject)1 EEJobMeta (org.pentaho.di.repository.pur.model.EEJobMeta)1 ILockable (org.pentaho.di.repository.pur.model.ILockable)1 RepositoryLock (org.pentaho.di.repository.pur.model.RepositoryLock)1 TransMeta (org.pentaho.di.trans.TransMeta)1 IAbsSecurityProvider (org.pentaho.di.ui.repository.pur.services.IAbsSecurityProvider)1