Search in sources :

Example 6 with PropsUI

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

the class GUIResource method getResources.

private void getResources() {
    PropsUI props = PropsUI.getInstance();
    imageMap = new HashMap<String, Image>();
    colorMap = new HashMap<RGB, Color>();
    colorBackground = new ManagedColor(display, props.getBackgroundRGB());
    colorGraph = new ManagedColor(display, props.getGraphColorRGB());
    colorTab = new ManagedColor(display, props.getTabColorRGB());
    colorSuccessGreen = new ManagedColor(display, 0, 139, 0);
    colorRed = new ManagedColor(display, 255, 0, 0);
    colorGreen = new ManagedColor(display, 0, 255, 0);
    colorBlue = new ManagedColor(display, 0, 0, 255);
    colorYellow = new ManagedColor(display, 255, 255, 0);
    colorMagenta = new ManagedColor(display, 255, 0, 255);
    colorOrange = new ManagedColor(display, 255, 165, 0);
    colorBlueCustomGrid = new ManagedColor(display, 240, 248, 255);
    colorWhite = new ManagedColor(display, 255, 255, 255);
    colorDemoGray = new ManagedColor(display, 240, 240, 240);
    colorLightGray = new ManagedColor(display, 225, 225, 225);
    colorGray = new ManagedColor(display, 215, 215, 215);
    colorDarkGray = new ManagedColor(display, 100, 100, 100);
    colorBlack = new ManagedColor(display, 0, 0, 0);
    // light sky blue
    colorLightBlue = new ManagedColor(display, 135, 206, 250);
    colorDirectory = new ManagedColor(display, 0, 0, 255);
    // colorPentaho = new ManagedColor(display, 239, 128, 51 ); // Orange
    colorPentaho = new ManagedColor(display, 188, 198, 82);
    colorLightPentaho = new ManagedColor(display, 238, 248, 152);
    colorCreamPentaho = new ManagedColor(display, 248, 246, 231);
    colorCrystalTextPentaho = new ManagedColor(display, 61, 99, 128);
    colorHopDefault = new ManagedColor(display, 61, 99, 128);
    colorHopOK = new ManagedColor(display, 12, 178, 15);
    // Load all images from files...
    loadFonts();
    loadCommonImages();
    loadStepImages();
    loadJobEntryImages();
}
Also used : Color(org.eclipse.swt.graphics.Color) Image(org.eclipse.swt.graphics.Image) SwtUniversalImage(org.pentaho.di.core.SwtUniversalImage) RGB(org.eclipse.swt.graphics.RGB) PropsUI(org.pentaho.di.ui.core.PropsUI)

Example 7 with PropsUI

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

the class GUIResource method loadFonts.

private void loadFonts() {
    PropsUI props = PropsUI.getInstance();
    fontGraph = new ManagedFont(display, props.getGraphFont());
    fontNote = new ManagedFont(display, props.getNoteFont());
    fontFixed = new ManagedFont(display, props.getFixedFont());
    // Create a medium size version of the graph font
    FontData mediumFontData = new FontData(props.getGraphFont().getName(), (int) Math.round(props.getGraphFont().getHeight() * 1.2), props.getGraphFont().getStyle());
    fontMedium = new ManagedFont(display, mediumFontData);
    // Create a medium bold size version of the graph font
    FontData mediumFontBoldData = new FontData(props.getGraphFont().getName(), (int) Math.round(props.getGraphFont().getHeight() * 1.2), props.getGraphFont().getStyle() | SWT.BOLD);
    fontMediumBold = new ManagedFont(display, mediumFontBoldData);
    // Create a large version of the graph font
    FontData largeFontData = new FontData(props.getGraphFont().getName(), props.getGraphFont().getHeight() * 3, props.getGraphFont().getStyle());
    fontLarge = new ManagedFont(display, largeFontData);
    // Create a tiny version of the graph font
    FontData tinyFontData = new FontData(props.getGraphFont().getName(), props.getGraphFont().getHeight() - 2, props.getGraphFont().getStyle());
    fontTiny = new ManagedFont(display, tinyFontData);
    // Create a small version of the graph font
    FontData smallFontData = new FontData(props.getGraphFont().getName(), props.getGraphFont().getHeight() - 1, props.getGraphFont().getStyle());
    fontSmall = new ManagedFont(display, smallFontData);
    FontData boldFontData = new FontData(props.getDefaultFontData().getName(), props.getDefaultFontData().getHeight(), props.getDefaultFontData().getStyle() | SWT.BOLD);
    fontBold = new ManagedFont(display, boldFontData);
}
Also used : FontData(org.eclipse.swt.graphics.FontData) PropsUI(org.pentaho.di.ui.core.PropsUI)

Example 8 with PropsUI

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

the class DatabaseConfigurationImportRuleComposite method getComposite.

public Composite getComposite(Composite parent, ImportRuleInterface importRule) {
    rule = (DatabaseConfigurationImportRule) importRule;
    databaseMeta = rule.getDatabaseMeta();
    PropsUI props = PropsUI.getInstance();
    composite = new Composite(parent, SWT.NONE);
    props.setLook(composite);
    composite.setLayout(new FillLayout());
    label = new Label(composite, SWT.SINGLE | SWT.BORDER | SWT.LEFT);
    props.setLook(label);
    label.setText("Database configuration : (not configured)");
    button = new Button(composite, SWT.PUSH);
    button.setText("Edit...");
    button.addSelectionListener(new SelectionAdapter() {

        public void widgetSelected(SelectionEvent event) {
            editDatabase();
        }
    });
    return composite;
}
Also used : Composite(org.eclipse.swt.widgets.Composite) Button(org.eclipse.swt.widgets.Button) SelectionAdapter(org.eclipse.swt.events.SelectionAdapter) Label(org.eclipse.swt.widgets.Label) SelectionEvent(org.eclipse.swt.events.SelectionEvent) FillLayout(org.eclipse.swt.layout.FillLayout) PropsUI(org.pentaho.di.ui.core.PropsUI)

Example 9 with PropsUI

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

the class JobHasJobLogConfiguredImportRuleComposite method getComposite.

public Composite getComposite(Composite parent, ImportRuleInterface importRule) {
    PropsUI props = PropsUI.getInstance();
    composite = new Composite(parent, SWT.BACKGROUND);
    props.setLook(composite);
    FormLayout formLayout = new FormLayout();
    formLayout.marginWidth = Const.FORM_MARGIN;
    formLayout.marginHeight = Const.FORM_MARGIN;
    composite.setLayout(formLayout);
    // Schema input field...
    // 
    Label schemaLabel = new Label(composite, SWT.SINGLE | SWT.BORDER | SWT.LEFT);
    props.setLook(schemaLabel);
    schemaLabel.setText("Schema ");
    FormData fdSchemaLabel = new FormData();
    fdSchemaLabel.left = new FormAttachment(0, 0);
    fdSchemaLabel.top = new FormAttachment(0, 0);
    schemaLabel.setLayoutData(fdSchemaLabel);
    schemaText = new Text(composite, SWT.SINGLE | SWT.BORDER | SWT.LEFT);
    props.setLook(schemaText);
    FormData fdSchemaText = new FormData();
    fdSchemaText.left = new FormAttachment(schemaLabel, Const.MARGIN);
    fdSchemaText.top = new FormAttachment(0, 0);
    fdSchemaText.right = new FormAttachment(schemaLabel, 150);
    schemaText.setLayoutData(fdSchemaText);
    // Table name input field...
    // 
    Label tableLabel = new Label(composite, SWT.SINGLE | SWT.BORDER | SWT.LEFT);
    props.setLook(tableLabel);
    tableLabel.setText("Table ");
    FormData fdTableLabel = new FormData();
    fdTableLabel.left = new FormAttachment(schemaText, Const.MARGIN);
    fdTableLabel.top = new FormAttachment(0, 0);
    tableLabel.setLayoutData(fdTableLabel);
    tableText = new Text(composite, SWT.SINGLE | SWT.BORDER | SWT.LEFT);
    props.setLook(tableText);
    FormData fdTableText = new FormData();
    fdTableText.left = new FormAttachment(tableLabel, Const.MARGIN);
    fdTableText.top = new FormAttachment(0, 0);
    fdTableText.right = new FormAttachment(tableLabel, 150);
    tableText.setLayoutData(fdTableText);
    // Connection name input field...
    // 
    Label connectionLabel = new Label(composite, SWT.SINGLE | SWT.BORDER | SWT.LEFT);
    props.setLook(connectionLabel);
    connectionLabel.setText("Connection ");
    FormData fdConnectionLabel = new FormData();
    fdConnectionLabel.left = new FormAttachment(tableText, Const.MARGIN);
    fdConnectionLabel.top = new FormAttachment(0, 0);
    connectionLabel.setLayoutData(fdConnectionLabel);
    connectionText = new Text(composite, SWT.SINGLE | SWT.BORDER | SWT.LEFT);
    props.setLook(connectionText);
    FormData fdConnectionText = new FormData();
    fdConnectionText.left = new FormAttachment(connectionLabel, Const.MARGIN);
    fdConnectionText.top = new FormAttachment(0, 0);
    fdConnectionText.right = new FormAttachment(connectionLabel, 200);
    connectionText.setLayoutData(fdConnectionText);
    return composite;
}
Also used : FormLayout(org.eclipse.swt.layout.FormLayout) FormData(org.eclipse.swt.layout.FormData) Composite(org.eclipse.swt.widgets.Composite) Label(org.eclipse.swt.widgets.Label) Text(org.eclipse.swt.widgets.Text) FormAttachment(org.eclipse.swt.layout.FormAttachment) PropsUI(org.pentaho.di.ui.core.PropsUI)

Example 10 with PropsUI

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

the class TransformationHasDescriptionImportRuleComposite method getComposite.

public Composite getComposite(Composite parent, ImportRuleInterface importRule) {
    PropsUI props = PropsUI.getInstance();
    composite = new Composite(parent, SWT.NONE);
    props.setLook(composite);
    composite.setLayout(new FillLayout());
    Label label = new Label(composite, SWT.SINGLE | SWT.BORDER | SWT.LEFT);
    props.setLook(label);
    label.setText("Minimum length: ");
    text = new Text(composite, SWT.SINGLE | SWT.BORDER | SWT.LEFT);
    props.setLook(text);
    return composite;
}
Also used : Composite(org.eclipse.swt.widgets.Composite) Label(org.eclipse.swt.widgets.Label) Text(org.eclipse.swt.widgets.Text) FillLayout(org.eclipse.swt.layout.FillLayout) PropsUI(org.pentaho.di.ui.core.PropsUI)

Aggregations

PropsUI (org.pentaho.di.ui.core.PropsUI)28 Label (org.eclipse.swt.widgets.Label)9 FormLayout (org.eclipse.swt.layout.FormLayout)6 Composite (org.eclipse.swt.widgets.Composite)6 FormAttachment (org.eclipse.swt.layout.FormAttachment)5 FormData (org.eclipse.swt.layout.FormData)5 Text (org.eclipse.swt.widgets.Text)5 SelectionAdapter (org.eclipse.swt.events.SelectionAdapter)4 SelectionEvent (org.eclipse.swt.events.SelectionEvent)4 Rectangle (org.eclipse.swt.graphics.Rectangle)4 FillLayout (org.eclipse.swt.layout.FillLayout)4 Button (org.eclipse.swt.widgets.Button)4 KettleException (org.pentaho.di.core.exception.KettleException)4 Field (java.lang.reflect.Field)3 Group (org.eclipse.swt.widgets.Group)3 Monitor (org.eclipse.swt.widgets.Monitor)3 BeforeClass (org.junit.BeforeClass)3 TabMapEntry (org.pentaho.di.ui.spoon.TabMapEntry)3 TabItem (org.pentaho.xul.swt.tab.TabItem)3 WindowEvent (org.eclipse.swt.browser.WindowEvent)2