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);
}
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);
}
}
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());
}
}
}
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());
}
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());
}
}
}
Aggregations