use of org.pentaho.di.ui.core.gui.WindowProperty in project pentaho-kettle by pentaho.
the class BaseStepDialog method setSize.
public static void setSize(Shell shell, int prefWidth, int prefHeight) {
PropsUI props = PropsUI.getInstance();
WindowProperty winprop = props.getScreen(shell.getText());
if (winprop != null) {
winprop.setShell(shell, prefWidth, prefHeight);
} else {
shell.layout();
winprop = new WindowProperty(shell.getText(), false, new Rectangle(0, 0, prefWidth, prefHeight));
winprop.setShell(shell);
// Now, as this is the first time it gets opened, try to put it in the middle of the screen...
Rectangle shellBounds = shell.getBounds();
Monitor monitor = shell.getDisplay().getPrimaryMonitor();
if (shell.getParent() != null) {
monitor = shell.getParent().getMonitor();
}
Rectangle monitorClientArea = monitor.getClientArea();
int middleX = monitorClientArea.x + (monitorClientArea.width - shellBounds.width) / 2;
int middleY = monitorClientArea.y + (monitorClientArea.height - shellBounds.height) / 2;
shell.setLocation(middleX, middleY);
}
}
use of org.pentaho.di.ui.core.gui.WindowProperty in project pentaho-kettle by pentaho.
the class StepErrorMetaDialog method dispose.
public void dispose() {
props.setScreen(new WindowProperty(shell));
shell.dispose();
}
use of org.pentaho.di.ui.core.gui.WindowProperty in project pentaho-kettle by pentaho.
the class EnterPreviewRowsDialog method dispose.
public void dispose() {
props.setScreen(new WindowProperty(shell));
shell.dispose();
}
use of org.pentaho.di.ui.core.gui.WindowProperty in project pentaho-kettle by pentaho.
the class LogSettingsDialog method dispose.
public void dispose() {
props.setScreen(new WindowProperty(shell));
shell.dispose();
}
use of org.pentaho.di.ui.core.gui.WindowProperty in project pentaho-kettle by pentaho.
the class NewSubtransDialog method dispose.
public void dispose() {
props.setScreen(new WindowProperty(shell));
shell.dispose();
}
Aggregations