Search in sources :

Example 71 with Canvas

use of org.eclipse.swt.widgets.Canvas in project eclipse.platform.swt by eclipse.

the class ClipboardExample method createImageTransfer.

void createImageTransfer(Composite copyParent, Composite pasteParent) {
    final Image[] copyImage = new Image[] { null };
    Label l = new Label(copyParent, SWT.NONE);
    // $NON-NLS-1$
    l.setText("ImageTransfer:");
    GridData data = new GridData();
    data.verticalSpan = 2;
    l.setLayoutData(data);
    final Canvas copyImageCanvas = new Canvas(copyParent, SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL);
    data = new GridData(GridData.FILL_BOTH);
    data.verticalSpan = 2;
    data.widthHint = HSIZE;
    data.heightHint = VSIZE;
    copyImageCanvas.setLayoutData(data);
    final Point copyOrigin = new Point(0, 0);
    final ScrollBar copyHBar = copyImageCanvas.getHorizontalBar();
    copyHBar.setEnabled(false);
    copyHBar.addListener(SWT.Selection, e -> {
        if (copyImage[0] != null) {
            int hSelection = copyHBar.getSelection();
            int destX = -hSelection - copyOrigin.x;
            Rectangle rect = copyImage[0].getBounds();
            copyImageCanvas.scroll(destX, 0, 0, 0, rect.width, rect.height, false);
            copyOrigin.x = -hSelection;
        }
    });
    final ScrollBar copyVBar = copyImageCanvas.getVerticalBar();
    copyVBar.setEnabled(false);
    copyVBar.addListener(SWT.Selection, e -> {
        if (copyImage[0] != null) {
            int vSelection = copyVBar.getSelection();
            int destY = -vSelection - copyOrigin.y;
            Rectangle rect = copyImage[0].getBounds();
            copyImageCanvas.scroll(0, destY, 0, 0, rect.width, rect.height, false);
            copyOrigin.y = -vSelection;
        }
    });
    copyImageCanvas.addListener(SWT.Paint, e -> {
        if (copyImage[0] != null) {
            GC gc = e.gc;
            gc.drawImage(copyImage[0], copyOrigin.x, copyOrigin.y);
            Rectangle rect = copyImage[0].getBounds();
            Rectangle client = copyImageCanvas.getClientArea();
            int marginWidth = client.width - rect.width;
            if (marginWidth > 0) {
                gc.fillRectangle(rect.width, 0, marginWidth, client.height);
            }
            int marginHeight = client.height - rect.height;
            if (marginHeight > 0) {
                gc.fillRectangle(0, rect.height, client.width, marginHeight);
            }
            gc.dispose();
        }
    });
    Button openButton = new Button(copyParent, SWT.PUSH);
    openButton.setText("Open Image");
    openButton.addSelectionListener(widgetSelectedAdapter(e -> {
        FileDialog dialog = new FileDialog(shell, SWT.OPEN);
        dialog.setText("Open an image file or cancel");
        String string = dialog.open();
        if (string != null) {
            if (copyImage[0] != null) {
                System.out.println("CopyImage");
                copyImage[0].dispose();
            }
            copyImage[0] = new Image(e.display, string);
            copyVBar.setEnabled(true);
            copyHBar.setEnabled(true);
            copyOrigin.x = 0;
            copyOrigin.y = 0;
            Rectangle rect = copyImage[0].getBounds();
            Rectangle client = copyImageCanvas.getClientArea();
            copyHBar.setMaximum(rect.width);
            copyVBar.setMaximum(rect.height);
            copyHBar.setThumb(Math.min(rect.width, client.width));
            copyVBar.setThumb(Math.min(rect.height, client.height));
            copyImageCanvas.scroll(0, 0, 0, 0, rect.width, rect.height, true);
            copyVBar.setSelection(0);
            copyHBar.setSelection(0);
            copyImageCanvas.redraw();
        }
    }));
    Button b = new Button(copyParent, SWT.PUSH);
    b.setText("Copy");
    b.addSelectionListener(widgetSelectedAdapter(e -> {
        if (copyImage[0] != null) {
            status.setText("");
            // Fetch ImageData at current zoom and save in the clip-board.
            clipboard.setContents(new Object[] { copyImage[0].getImageDataAtCurrentZoom() }, new Transfer[] { ImageTransfer.getInstance() });
        } else {
            status.setText("No image to copy");
        }
    }));
    final Image[] pasteImage = new Image[] { null };
    l = new Label(pasteParent, SWT.NONE);
    l.setText("ImageTransfer:");
    final Canvas pasteImageCanvas = new Canvas(pasteParent, SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL);
    data = new GridData(GridData.FILL_BOTH);
    data.widthHint = HSIZE;
    data.heightHint = VSIZE;
    pasteImageCanvas.setLayoutData(data);
    final Point pasteOrigin = new Point(0, 0);
    final ScrollBar pasteHBar = pasteImageCanvas.getHorizontalBar();
    pasteHBar.setEnabled(false);
    pasteHBar.addListener(SWT.Selection, e -> {
        if (pasteImage[0] != null) {
            int hSelection = pasteHBar.getSelection();
            int destX = -hSelection - pasteOrigin.x;
            Rectangle rect = pasteImage[0].getBounds();
            pasteImageCanvas.scroll(destX, 0, 0, 0, rect.width, rect.height, false);
            pasteOrigin.x = -hSelection;
        }
    });
    final ScrollBar pasteVBar = pasteImageCanvas.getVerticalBar();
    pasteVBar.setEnabled(false);
    pasteVBar.addListener(SWT.Selection, e -> {
        if (pasteImage[0] != null) {
            int vSelection = pasteVBar.getSelection();
            int destY = -vSelection - pasteOrigin.y;
            Rectangle rect = pasteImage[0].getBounds();
            pasteImageCanvas.scroll(0, destY, 0, 0, rect.width, rect.height, false);
            pasteOrigin.y = -vSelection;
        }
    });
    pasteImageCanvas.addListener(SWT.Paint, e -> {
        if (pasteImage[0] != null) {
            GC gc = e.gc;
            gc.drawImage(pasteImage[0], pasteOrigin.x, pasteOrigin.y);
            Rectangle rect = pasteImage[0].getBounds();
            Rectangle client = pasteImageCanvas.getClientArea();
            int marginWidth = client.width - rect.width;
            if (marginWidth > 0) {
                gc.fillRectangle(rect.width, 0, marginWidth, client.height);
            }
            int marginHeight = client.height - rect.height;
            if (marginHeight > 0) {
                gc.fillRectangle(0, rect.height, client.width, marginHeight);
            }
        }
    });
    b = new Button(pasteParent, SWT.PUSH);
    b.setText("Paste");
    b.addSelectionListener(widgetSelectedAdapter(e -> {
        ImageData imageData = (ImageData) clipboard.getContents(ImageTransfer.getInstance());
        if (imageData != null) {
            if (pasteImage[0] != null) {
                System.out.println("PasteImage");
                pasteImage[0].dispose();
            }
            status.setText("");
            // Consume the ImageData at current zoom as-is.
            pasteImage[0] = new Image(e.display, new AutoScaleImageDataProvider(imageData));
            pasteVBar.setEnabled(true);
            pasteHBar.setEnabled(true);
            pasteOrigin.x = 0;
            pasteOrigin.y = 0;
            Rectangle rect = pasteImage[0].getBounds();
            Rectangle client = pasteImageCanvas.getClientArea();
            pasteHBar.setMaximum(rect.width);
            pasteVBar.setMaximum(rect.height);
            pasteHBar.setThumb(Math.min(rect.width, client.width));
            pasteVBar.setThumb(Math.min(rect.height, client.height));
            pasteImageCanvas.scroll(0, 0, 0, 0, rect.width, rect.height, true);
            pasteVBar.setSelection(0);
            pasteHBar.setSelection(0);
            pasteImageCanvas.redraw();
        } else {
            status.setText("No image to paste");
        }
    }));
}
Also used : RTFTransfer(org.eclipse.swt.dnd.RTFTransfer) StyledText(org.eclipse.swt.custom.StyledText) Image(org.eclipse.swt.graphics.Image) Rectangle(org.eclipse.swt.graphics.Rectangle) ImageData(org.eclipse.swt.graphics.ImageData) Table(org.eclipse.swt.widgets.Table) GC(org.eclipse.swt.graphics.GC) Point(org.eclipse.swt.graphics.Point) Clipboard(org.eclipse.swt.dnd.Clipboard) ImageDataProvider(org.eclipse.swt.graphics.ImageDataProvider) SelectionListener.widgetSelectedAdapter(org.eclipse.swt.events.SelectionListener.widgetSelectedAdapter) ImageTransfer(org.eclipse.swt.dnd.ImageTransfer) Composite(org.eclipse.swt.widgets.Composite) TextTransfer(org.eclipse.swt.dnd.TextTransfer) Canvas(org.eclipse.swt.widgets.Canvas) GridData(org.eclipse.swt.layout.GridData) FillLayout(org.eclipse.swt.layout.FillLayout) FileTransfer(org.eclipse.swt.dnd.FileTransfer) TableItem(org.eclipse.swt.widgets.TableItem) Text(org.eclipse.swt.widgets.Text) Combo(org.eclipse.swt.widgets.Combo) Shell(org.eclipse.swt.widgets.Shell) Button(org.eclipse.swt.widgets.Button) FileDialog(org.eclipse.swt.widgets.FileDialog) Display(org.eclipse.swt.widgets.Display) Group(org.eclipse.swt.widgets.Group) File(java.io.File) Transfer(org.eclipse.swt.dnd.Transfer) SWT(org.eclipse.swt.SWT) DirectoryDialog(org.eclipse.swt.widgets.DirectoryDialog) HTMLTransfer(org.eclipse.swt.dnd.HTMLTransfer) List(org.eclipse.swt.widgets.List) ScrolledComposite(org.eclipse.swt.custom.ScrolledComposite) ScrollBar(org.eclipse.swt.widgets.ScrollBar) Label(org.eclipse.swt.widgets.Label) GridLayout(org.eclipse.swt.layout.GridLayout) Canvas(org.eclipse.swt.widgets.Canvas) Label(org.eclipse.swt.widgets.Label) Rectangle(org.eclipse.swt.graphics.Rectangle) Point(org.eclipse.swt.graphics.Point) Image(org.eclipse.swt.graphics.Image) Point(org.eclipse.swt.graphics.Point) Button(org.eclipse.swt.widgets.Button) ImageData(org.eclipse.swt.graphics.ImageData) GridData(org.eclipse.swt.layout.GridData) RTFTransfer(org.eclipse.swt.dnd.RTFTransfer) ImageTransfer(org.eclipse.swt.dnd.ImageTransfer) TextTransfer(org.eclipse.swt.dnd.TextTransfer) FileTransfer(org.eclipse.swt.dnd.FileTransfer) Transfer(org.eclipse.swt.dnd.Transfer) HTMLTransfer(org.eclipse.swt.dnd.HTMLTransfer) GC(org.eclipse.swt.graphics.GC) FileDialog(org.eclipse.swt.widgets.FileDialog) ScrollBar(org.eclipse.swt.widgets.ScrollBar)

Example 72 with Canvas

use of org.eclipse.swt.widgets.Canvas in project eclipse.platform.swt by eclipse.

the class AccessibleActionExample method main.

public static void main(String[] args) {
    Display display = new Display();
    Shell shell = new Shell(display);
    shell.setLayout(new FillLayout());
    shell.setText("Accessible Action Example");
    Button button = new Button(shell, SWT.PUSH);
    button.setText("Button");
    final Canvas customButton = new Canvas(shell, SWT.NONE) {

        @Override
        public Point computeSize(int wHint, int hHint, boolean changed) {
            GC gc = new GC(this);
            Point point = gc.stringExtent(buttonText);
            gc.dispose();
            point.x += MARGIN;
            point.y += MARGIN;
            return point;
        }
    };
    customButton.addPaintListener(e -> {
        Rectangle clientArea = customButton.getClientArea();
        Point stringExtent = e.gc.stringExtent(buttonText);
        int x = clientArea.x + (clientArea.width - stringExtent.x) / 2;
        int y = clientArea.y + (clientArea.height - stringExtent.y) / 2;
        e.gc.drawString(buttonText, x, y);
    });
    customButton.addMouseListener(MouseListener.mouseDownAdapter(e -> {
        int actionIndex = (e.button == 1) ? 0 : 1;
        customButtonAction(actionIndex);
    }));
    customButton.addKeyListener(new KeyAdapter() {

        @Override
        public void keyPressed(KeyEvent e) {
            int modifierKeys = e.stateMask & SWT.MODIFIER_MASK;
            if (modifierKeys == SWT.CTRL || modifierKeys == 0) {
                if (e.character == '1')
                    customButtonAction(0);
                else if (e.character == '2')
                    customButtonAction(1);
            }
        }
    });
    Accessible accessible = customButton.getAccessible();
    accessible.addAccessibleListener(new AccessibleAdapter() {

        @Override
        public void getName(AccessibleEvent e) {
            e.result = buttonText;
        }

        @Override
        public void getKeyboardShortcut(AccessibleEvent e) {
            // default action is 'action 1'
            e.result = "CTRL+1";
        }
    });
    accessible.addAccessibleControlListener(new AccessibleControlAdapter() {

        @Override
        public void getRole(AccessibleControlEvent e) {
            e.detail = ACC.ROLE_PUSHBUTTON;
        }
    });
    accessible.addAccessibleActionListener(new AccessibleActionAdapter() {

        @Override
        public void getActionCount(AccessibleActionEvent e) {
            e.count = 2;
        }

        @Override
        public void getName(AccessibleActionEvent e) {
            if (0 <= e.index && e.index <= 1) {
                if (e.localized) {
                    e.result = AccessibleActionExample.getResourceString("action" + e.index);
                } else {
                    // $NON-NLS-1$
                    e.result = "Action" + e.index;
                }
            }
        }

        @Override
        public void getDescription(AccessibleActionEvent e) {
            if (0 <= e.index && e.index <= 1) {
                e.result = AccessibleActionExample.getResourceString("action" + e.index + "description");
            }
        }

        @Override
        public void doAction(AccessibleActionEvent e) {
            if (0 <= e.index && e.index <= 1) {
                customButtonAction(e.index);
                e.result = ACC.OK;
            }
        }

        @Override
        public void getKeyBinding(AccessibleActionEvent e) {
            switch(e.index) {
                case 0:
                    e.result = "1;CTRL+1";
                    break;
                case 1:
                    e.result = "2;CTRL+2";
                    break;
                default:
                    e.result = null;
            }
        }
    });
    shell.pack();
    shell.open();
    while (!shell.isDisposed()) {
        if (!display.readAndDispatch())
            display.sleep();
    }
    display.dispose();
}
Also used : AccessibleControlAdapter(org.eclipse.swt.accessibility.AccessibleControlAdapter) Shell(org.eclipse.swt.widgets.Shell) Button(org.eclipse.swt.widgets.Button) ACC(org.eclipse.swt.accessibility.ACC) AccessibleActionAdapter(org.eclipse.swt.accessibility.AccessibleActionAdapter) MissingResourceException(java.util.MissingResourceException) Rectangle(org.eclipse.swt.graphics.Rectangle) Display(org.eclipse.swt.widgets.Display) AccessibleActionEvent(org.eclipse.swt.accessibility.AccessibleActionEvent) AccessibleAdapter(org.eclipse.swt.accessibility.AccessibleAdapter) GC(org.eclipse.swt.graphics.GC) Point(org.eclipse.swt.graphics.Point) AccessibleControlEvent(org.eclipse.swt.accessibility.AccessibleControlEvent) MouseListener(org.eclipse.swt.events.MouseListener) ResourceBundle(java.util.ResourceBundle) SWT(org.eclipse.swt.SWT) KeyEvent(org.eclipse.swt.events.KeyEvent) Accessible(org.eclipse.swt.accessibility.Accessible) AccessibleEvent(org.eclipse.swt.accessibility.AccessibleEvent) Canvas(org.eclipse.swt.widgets.Canvas) FillLayout(org.eclipse.swt.layout.FillLayout) KeyAdapter(org.eclipse.swt.events.KeyAdapter) AccessibleActionAdapter(org.eclipse.swt.accessibility.AccessibleActionAdapter) AccessibleControlEvent(org.eclipse.swt.accessibility.AccessibleControlEvent) AccessibleControlAdapter(org.eclipse.swt.accessibility.AccessibleControlAdapter) Canvas(org.eclipse.swt.widgets.Canvas) KeyAdapter(org.eclipse.swt.events.KeyAdapter) Rectangle(org.eclipse.swt.graphics.Rectangle) AccessibleAdapter(org.eclipse.swt.accessibility.AccessibleAdapter) FillLayout(org.eclipse.swt.layout.FillLayout) Point(org.eclipse.swt.graphics.Point) Point(org.eclipse.swt.graphics.Point) KeyEvent(org.eclipse.swt.events.KeyEvent) Shell(org.eclipse.swt.widgets.Shell) Button(org.eclipse.swt.widgets.Button) AccessibleActionEvent(org.eclipse.swt.accessibility.AccessibleActionEvent) GC(org.eclipse.swt.graphics.GC) AccessibleEvent(org.eclipse.swt.accessibility.AccessibleEvent) Display(org.eclipse.swt.widgets.Display) Accessible(org.eclipse.swt.accessibility.Accessible)

Example 73 with Canvas

use of org.eclipse.swt.widgets.Canvas in project eclipse.platform.swt by eclipse.

the class Test_situational method test_fastStringDrawing.

public void test_fastStringDrawing() {
    PerformanceMeter meter = createMeterWithoutSummary("Draw strings using GC.drawString()");
    int samples;
    for (samples = 0; samples < 10; samples++) {
        int width = 640;
        int height = 480;
        Shell shell = new Shell(display);
        shell.setLayout(new GridLayout());
        Canvas c = new Canvas(shell, SWT.NONE);
        GridData data = new GridData();
        data.widthHint = width;
        data.heightHint = height;
        c.setLayoutData(data);
        shell.pack();
        shell.open();
        while (display.readAndDispatch()) {
        /*empty*/
        }
        try {
            Thread.sleep(2000);
        } catch (Exception e) {
        }
        while (display.readAndDispatch()) {
        /*empty*/
        }
        Color color1 = new Color(display, 0xff, 0, 0xff);
        Color color2 = new Color(display, 0, 0xff, 0xff);
        Font font1 = new Font(display, "Helvetica", 20, SWT.NONE);
        Font font2 = new Font(display, "Helvetica", 10, SWT.BOLD);
        String testString = "The quick brown SWT jumped foxily over the lazy dog.";
        int x1 = 0, y1 = height / 2, x2 = width / 2, y2 = 0;
        meter.start();
        GC gc = new GC(c);
        for (int i = 0; i < 2000; i++) {
            x1 = (x1 + 5) % width;
            y1 = (y1 + 5) % height;
            x2 = (x2 + 5) % width;
            y2 = (y2 + 5) % height;
            gc.setFont((i & 1) == 0 ? font1 : font2);
            gc.setForeground((i & 1) == 0 ? color1 : color2);
            gc.stringExtent(testString);
            gc.drawString(testString, x1, y2);
            gc.drawString(testString, x1, y1, true);
        }
        gc.dispose();
        meter.stop();
        shell.dispose();
        color1.dispose();
        color2.dispose();
        font1.dispose();
        font2.dispose();
        while (display.readAndDispatch()) {
        /*empty*/
        }
    }
    disposeMeter(meter);
}
Also used : Shell(org.eclipse.swt.widgets.Shell) GridLayout(org.eclipse.swt.layout.GridLayout) Canvas(org.eclipse.swt.widgets.Canvas) Color(org.eclipse.swt.graphics.Color) GridData(org.eclipse.swt.layout.GridData) PerformanceMeter(org.eclipse.test.performance.PerformanceMeter) GC(org.eclipse.swt.graphics.GC) Font(org.eclipse.swt.graphics.Font)

Example 74 with Canvas

use of org.eclipse.swt.widgets.Canvas in project eclipse.platform.swt by eclipse.

the class Test_org_eclipse_swt_widgets_Canvas method setUp.

@Override
@Before
public void setUp() {
    super.setUp();
    canvas = new Canvas(shell, 0);
    super.setWidget(canvas);
}
Also used : Canvas(org.eclipse.swt.widgets.Canvas) Before(org.junit.Before)

Example 75 with Canvas

use of org.eclipse.swt.widgets.Canvas in project eclipse.platform.swt by eclipse.

the class DNDExample method createDragWidget.

private void createDragWidget(Composite parent) {
    parent.setLayout(new FormLayout());
    Combo combo = new Combo(parent, SWT.READ_ONLY);
    combo.setItems("Toggle Button", "Radio Button", "Checkbox", "Canvas", "Label", "List", "Table", "Tree", "Text", "StyledText", "Combo");
    combo.select(LABEL);
    dragControlType = combo.getSelectionIndex();
    dragControl = createWidget(dragControlType, parent, "Drag Source");
    combo.addSelectionListener(widgetSelectedAdapter(e -> {
        Object data = dragControl.getLayoutData();
        Composite dragParent = dragControl.getParent();
        dragControl.dispose();
        Combo c = (Combo) e.widget;
        dragControlType = c.getSelectionIndex();
        dragControl = createWidget(dragControlType, dragParent, "Drag Source");
        dragControl.setLayoutData(data);
        if (dragEnabled)
            createDragSource();
        dragParent.layout();
    }));
    Button b = new Button(parent, SWT.CHECK);
    b.setText("DragSource");
    b.addSelectionListener(widgetSelectedAdapter(e -> {
        Button b1 = (Button) e.widget;
        dragEnabled = b1.getSelection();
        if (dragEnabled) {
            createDragSource();
        } else {
            if (dragSource != null) {
                dragSource.dispose();
            }
            dragSource = null;
        }
    }));
    b.setSelection(true);
    dragEnabled = true;
    FormData data = new FormData();
    data.top = new FormAttachment(0, 10);
    data.bottom = new FormAttachment(combo, -10);
    data.left = new FormAttachment(0, 10);
    data.right = new FormAttachment(100, -10);
    dragControl.setLayoutData(data);
    data = new FormData();
    data.bottom = new FormAttachment(100, -10);
    data.left = new FormAttachment(0, 10);
    combo.setLayoutData(data);
    data = new FormData();
    data.bottom = new FormAttachment(100, -10);
    data.left = new FormAttachment(combo, 10);
    b.setLayoutData(data);
}
Also used : FormLayout(org.eclipse.swt.layout.FormLayout) StyledText(org.eclipse.swt.custom.StyledText) URL(java.net.URL) DND(org.eclipse.swt.dnd.DND) TableColumn(org.eclipse.swt.widgets.TableColumn) FontMetrics(org.eclipse.swt.graphics.FontMetrics) Point(org.eclipse.swt.graphics.Point) SWTError(org.eclipse.swt.SWTError) DropTargetEvent(org.eclipse.swt.dnd.DropTargetEvent) URLTransfer(org.eclipse.swt.dnd.URLTransfer) Composite(org.eclipse.swt.widgets.Composite) TreeColumn(org.eclipse.swt.widgets.TreeColumn) DropTarget(org.eclipse.swt.dnd.DropTarget) Text(org.eclipse.swt.widgets.Text) Button(org.eclipse.swt.widgets.Button) Display(org.eclipse.swt.widgets.Display) Transfer(org.eclipse.swt.dnd.Transfer) MenuItem(org.eclipse.swt.widgets.MenuItem) Tree(org.eclipse.swt.widgets.Tree) SWT(org.eclipse.swt.SWT) HTMLTransfer(org.eclipse.swt.dnd.HTMLTransfer) List(org.eclipse.swt.widgets.List) DragSourceEvent(org.eclipse.swt.dnd.DragSourceEvent) Label(org.eclipse.swt.widgets.Label) RTFTransfer(org.eclipse.swt.dnd.RTFTransfer) DragSourceListener(org.eclipse.swt.dnd.DragSourceListener) Image(org.eclipse.swt.graphics.Image) Rectangle(org.eclipse.swt.graphics.Rectangle) Table(org.eclipse.swt.widgets.Table) SelectionListener.widgetSelectedAdapter(org.eclipse.swt.events.SelectionListener.widgetSelectedAdapter) TextTransfer(org.eclipse.swt.dnd.TextTransfer) Canvas(org.eclipse.swt.widgets.Canvas) GridData(org.eclipse.swt.layout.GridData) FillLayout(org.eclipse.swt.layout.FillLayout) FileTransfer(org.eclipse.swt.dnd.FileTransfer) DragSource(org.eclipse.swt.dnd.DragSource) TableItem(org.eclipse.swt.widgets.TableItem) Combo(org.eclipse.swt.widgets.Combo) Shell(org.eclipse.swt.widgets.Shell) MalformedURLException(java.net.MalformedURLException) DropTargetListener(org.eclipse.swt.dnd.DropTargetListener) FormLayout(org.eclipse.swt.layout.FormLayout) FileDialog(org.eclipse.swt.widgets.FileDialog) FormData(org.eclipse.swt.layout.FormData) FormAttachment(org.eclipse.swt.layout.FormAttachment) Group(org.eclipse.swt.widgets.Group) TreeItem(org.eclipse.swt.widgets.TreeItem) File(java.io.File) RowLayout(org.eclipse.swt.layout.RowLayout) Menu(org.eclipse.swt.widgets.Menu) ScrolledComposite(org.eclipse.swt.custom.ScrolledComposite) Control(org.eclipse.swt.widgets.Control) GridLayout(org.eclipse.swt.layout.GridLayout) FormData(org.eclipse.swt.layout.FormData) Composite(org.eclipse.swt.widgets.Composite) ScrolledComposite(org.eclipse.swt.custom.ScrolledComposite) Button(org.eclipse.swt.widgets.Button) Combo(org.eclipse.swt.widgets.Combo) FormAttachment(org.eclipse.swt.layout.FormAttachment)

Aggregations

Canvas (org.eclipse.swt.widgets.Canvas)111 GridData (org.eclipse.swt.layout.GridData)47 GridLayout (org.eclipse.swt.layout.GridLayout)38 Composite (org.eclipse.swt.widgets.Composite)38 PaintEvent (org.eclipse.swt.events.PaintEvent)36 PaintListener (org.eclipse.swt.events.PaintListener)35 Point (org.eclipse.swt.graphics.Point)32 Rectangle (org.eclipse.swt.graphics.Rectangle)32 Label (org.eclipse.swt.widgets.Label)31 Text (org.eclipse.swt.widgets.Text)24 Button (org.eclipse.swt.widgets.Button)22 Color (org.eclipse.swt.graphics.Color)20 Shell (org.eclipse.swt.widgets.Shell)20 MouseEvent (org.eclipse.swt.events.MouseEvent)18 GC (org.eclipse.swt.graphics.GC)17 FillLayout (org.eclipse.swt.layout.FillLayout)17 Event (org.eclipse.swt.widgets.Event)17 SelectionEvent (org.eclipse.swt.events.SelectionEvent)16 Listener (org.eclipse.swt.widgets.Listener)16 Display (org.eclipse.swt.widgets.Display)15