Search in sources :

Example 6 with WindowProperty

use of org.pentaho.di.ui.core.gui.WindowProperty in project pentaho-kettle by pentaho.

the class PreviewSelectDialog method dispose.

public void dispose() {
    props.setScreen(new WindowProperty(shell));
    shell.dispose();
}
Also used : WindowProperty(org.pentaho.di.ui.core.gui.WindowProperty)

Example 7 with WindowProperty

use of org.pentaho.di.ui.core.gui.WindowProperty in project pentaho-kettle by pentaho.

the class RegexEvalHelperDialog method dispose.

public void dispose() {
    props.setScreen(new WindowProperty(shell));
    shell.dispose();
}
Also used : WindowProperty(org.pentaho.di.ui.core.gui.WindowProperty)

Example 8 with WindowProperty

use of org.pentaho.di.ui.core.gui.WindowProperty in project pentaho-kettle by pentaho.

the class SlaveServerDialog method dispose.

public void dispose() {
    props.setScreen(new WindowProperty(shell));
    shell.dispose();
}
Also used : WindowProperty(org.pentaho.di.ui.core.gui.WindowProperty)

Example 9 with WindowProperty

use of org.pentaho.di.ui.core.gui.WindowProperty in project pentaho-kettle by pentaho.

the class PropsUI method setDefault.

public void setDefault() {
    FontData fd;
    RGB col;
    lastUsedFiles = new ArrayList<LastUsedFile>();
    lastUsedRepoFiles = new LinkedHashMap<>();
    openTabFiles = new ArrayList<LastUsedFile>();
    screens = new Hashtable<String, WindowProperty>();
    properties.setProperty(STRING_LOG_LEVEL, getLogLevel());
    properties.setProperty(STRING_LOG_FILTER, getLogFilter());
    if (display != null) {
        // Set Default Look for all dialogs and sizes.
        String prop = BasePropertyHandler.getProperty("Default_UI_Properties_Resource", "org.pentaho.di.ui.core.default");
        try {
            ResourceBundle bundle = ResourceBundle.getBundle(prop);
            if (bundle != null) {
                Enumeration<String> enumer = bundle.getKeys();
                String theKey;
                while (enumer.hasMoreElements()) {
                    theKey = enumer.nextElement();
                    properties.setProperty(theKey, bundle.getString(theKey));
                }
            }
        } catch (Exception ex) {
            // don't throw an exception, but log it.
            ex.printStackTrace();
        }
        fd = getFixedFont();
        properties.setProperty(STRING_FONT_FIXED_NAME, fd.getName());
        properties.setProperty(STRING_FONT_FIXED_SIZE, "" + fd.getHeight());
        properties.setProperty(STRING_FONT_FIXED_STYLE, "" + fd.getStyle());
        fd = getDefaultFont();
        properties.setProperty(STRING_FONT_DEFAULT_NAME, fd.getName());
        properties.setProperty(STRING_FONT_DEFAULT_SIZE, "" + fd.getHeight());
        properties.setProperty(STRING_FONT_DEFAULT_STYLE, "" + fd.getStyle());
        fd = getDefaultFont();
        properties.setProperty(STRING_FONT_GRAPH_NAME, fd.getName());
        properties.setProperty(STRING_FONT_GRAPH_SIZE, "" + fd.getHeight());
        properties.setProperty(STRING_FONT_GRAPH_STYLE, "" + fd.getStyle());
        fd = getDefaultFont();
        properties.setProperty(STRING_FONT_GRID_NAME, fd.getName());
        properties.setProperty(STRING_FONT_GRID_SIZE, "" + fd.getHeight());
        properties.setProperty(STRING_FONT_GRID_STYLE, "" + fd.getStyle());
        fd = getDefaultFont();
        properties.setProperty(STRING_FONT_NOTE_NAME, fd.getName());
        properties.setProperty(STRING_FONT_NOTE_SIZE, "" + fd.getHeight());
        properties.setProperty(STRING_FONT_NOTE_STYLE, "" + fd.getStyle());
        col = getBackgroundRGB();
        properties.setProperty(STRING_BACKGROUND_COLOR_R, "" + col.red);
        properties.setProperty(STRING_BACKGROUND_COLOR_G, "" + col.green);
        properties.setProperty(STRING_BACKGROUND_COLOR_B, "" + col.blue);
        col = getGraphColorRGB();
        properties.setProperty(STRING_GRAPH_COLOR_R, "" + col.red);
        properties.setProperty(STRING_GRAPH_COLOR_G, "" + col.green);
        properties.setProperty(STRING_GRAPH_COLOR_B, "" + col.blue);
        properties.setProperty(STRING_ICON_SIZE, "" + getIconSize());
        properties.setProperty(STRING_LINE_WIDTH, "" + getLineWidth());
        properties.setProperty(STRING_SHADOW_SIZE, "" + getShadowSize());
        properties.setProperty(STRING_MAX_UNDO, "" + getMaxUndo());
        setSashWeights(getSashWeights());
    }
}
Also used : WindowProperty(org.pentaho.di.ui.core.gui.WindowProperty) FontData(org.eclipse.swt.graphics.FontData) ResourceBundle(java.util.ResourceBundle) RGB(org.eclipse.swt.graphics.RGB) LastUsedFile(org.pentaho.di.core.LastUsedFile) ParseException(java.text.ParseException)

Example 10 with WindowProperty

use of org.pentaho.di.ui.core.gui.WindowProperty in project pentaho-kettle by pentaho.

the class PropsUI method storeScreens.

public void storeScreens() {
    // Add screens hash table to properties..
    // 
    Enumeration<String> keys = screens.keys();
    int nr = 1;
    while (keys.hasMoreElements()) {
        String name = keys.nextElement();
        properties.setProperty("ScreenName" + nr, name);
        WindowProperty winprop = screens.get(name);
        properties.setProperty(STRING_SIZE_MAX + nr, winprop.isMaximized() ? YES : NO);
        if (winprop.getRectangle() != null) {
            properties.setProperty(STRING_SIZE_X + nr, "" + winprop.getX());
            properties.setProperty(STRING_SIZE_Y + nr, "" + winprop.getY());
            properties.setProperty(STRING_SIZE_W + nr, "" + winprop.getWidth());
            properties.setProperty(STRING_SIZE_H + nr, "" + winprop.getHeight());
        }
        nr++;
    }
}
Also used : WindowProperty(org.pentaho.di.ui.core.gui.WindowProperty) Point(org.pentaho.di.core.gui.Point)

Aggregations

WindowProperty (org.pentaho.di.ui.core.gui.WindowProperty)151 Point (org.pentaho.di.core.gui.Point)4 Rectangle (org.eclipse.swt.graphics.Rectangle)3 Monitor (org.eclipse.swt.widgets.Monitor)3 PropsUI (org.pentaho.di.ui.core.PropsUI)3 Composite (org.eclipse.swt.widgets.Composite)2 KettleExtensionPoint (org.pentaho.di.core.extension.KettleExtensionPoint)2 ValueMetaString (org.pentaho.di.core.row.value.ValueMetaString)2 MalformedURLException (java.net.MalformedURLException)1 ParseException (java.text.ParseException)1 ResourceBundle (java.util.ResourceBundle)1 MessagingException (javax.mail.MessagingException)1 FileObject (org.apache.commons.vfs2.FileObject)1 FileSystemException (org.apache.commons.vfs2.FileSystemException)1 SWTException (org.eclipse.swt.SWTException)1 SashForm (org.eclipse.swt.custom.SashForm)1 DropTarget (org.eclipse.swt.dnd.DropTarget)1 DropTargetEvent (org.eclipse.swt.dnd.DropTargetEvent)1 DropTargetListener (org.eclipse.swt.dnd.DropTargetListener)1 FileTransfer (org.eclipse.swt.dnd.FileTransfer)1