All Downloads are FREE. Search and download functionalities are using the official Maven repository.

at.spardat.xma.widgets.test.DatePickerTestGui Maven / Gradle / Ivy

The newest version!
/*******************************************************************************
 * Copyright (c) 2003, 2010 s IT Solutions AT Spardat GmbH .
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     s IT Solutions AT Spardat GmbH - initial API and implementation
 *******************************************************************************/
// @(#) $Id:  $
package at.spardat.xma.widgets.test;

import java.io.InputStream;

import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;

import at.spardat.xma.page.messagebox.DetailedMessageBox;
import at.spardat.xma.widgets.DatePicker;

/**
 * GUI Test Class to test LocalizedMessageBox and DetailedMessageBox
 * @author s3945
 * @since 2.1.2
 */
public class DatePickerTestGui {

    private Display display;
    private Shell shell;

    public static void main(String[] args) {
        DatePickerTestGui main = new DatePickerTestGui();
        main.invoke();
    }

    private void invoke() {
        display = new Display();
        shell = new Shell(display);
        shell.setSize(212, 100);
        shell.setText("DatePickerTestGui");
        InputStream copyResource = DatePickerTestGui.class.getClassLoader().getResourceAsStream("at/spardat/xma/page/messagebox/test/imc16x16.gif");
        shell.setImage(new Image(display, copyResource));
        createWidgets();
        shell.open();

        while (!shell.isDisposed()) {
            if (!display.readAndDispatch()) {
                display.sleep();
            }
        }
    }

    private void createWidgets() {
        
        DatePicker datePicker = new DatePicker(shell);
        datePicker.setBounds(2, 2, 200, 25);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy