Examples of Canvas


Examples of org.eclipse.swt.widgets.Canvas

      titleLabel.pack();
      titleSize = titleLabel.getSize();

      final Image titleImage = shell.getImage();
      if (titleImageLabel == null && shell.getImage() != null) {
        titleImageLabel = new Canvas(shell, SWT.NONE);
        titleImageLabel.setBackground(shell.getBackground());
        titleImageLabel.setBounds(titleImage.getBounds());
        titleImageLabel.addListener(SWT.Paint, new Listener() {
          public void handleEvent(Event event) {
            event.gc.drawImage(titleImage, 0, 0);
View Full Code Here

Examples of org.eclipse.swt.widgets.Canvas

        details = new Composite(preference, SWT.BORDER);
        details.setLayout(new FillLayout());
        lbDetails = new Label(details, SWT.NONE);
        lbDetails.setText("Details: N/A");
        preference.pack();
        c = new Canvas(topshell, SWT.DOUBLE_BUFFERED | SWT.BORDER);
        c.setLayoutData(new RowData(topshell.getClientArea().width,
                topshell.getClientArea().height - 150));
        c.setBackground(parent.getDisplay().getSystemColor(SWT.COLOR_BLACK));
        c.addPaintListener(this);
        c.addMouseMoveListener(this);
View Full Code Here

Examples of org.eclipse.swt.widgets.Canvas

        lbAccessType = new Label(preference, SWT.READ_ONLY);
        lbAccessType.setText("Visualizing: ");
        visualizing = new List(preference, SWT.READ_ONLY);
        visualizing.setItems(new String[] {"Read" , "Write"});
        visualizing.setSelection(0);
        c = new Canvas(topshell, SWT.DOUBLE_BUFFERED | SWT.BORDER);
        c.setLayoutData(new RowData(topshell.getClientArea().width,
                topshell.getClientArea().height - 75));
        c.addPaintListener(this);
        value = new float[noOfBins];
        for (int i = 0; i < noOfBins; i++) {
View Full Code Here

Examples of org.eclipse.swt.widgets.Canvas

     * @param parent the parent of the Pattern view.
     */
    public final void createPartControl(final Composite parent) {
        cm = new ColorMap(parent.getDisplay());
        this.topshell = parent;
        c = new Canvas(parent, SWT.BORDER | SWT.DOUBLE_BUFFERED);
        c.addPaintListener(new PaintListener()
        {
            public void paintControl(final PaintEvent e) {
                paintLabel(e.gc);
            }
        });
        c2 = new Canvas(parent, SWT.BORDER | SWT.DOUBLE_BUFFERED);
        c2.addPaintListener(new PaintListener()
        {
            public void paintControl(final PaintEvent e) {
                paintPattern(e.gc);
            }
View Full Code Here

Examples of org.eclipse.swt.widgets.Canvas

        details = new Composite(preference, SWT.BORDER);
        details.setLayout(new FillLayout());
        lbDetails = new Label(details, SWT.NONE);
        lbDetails.setText("Details: N/A");
        preference.pack();
        c = new Canvas(topshell, SWT.DOUBLE_BUFFERED | SWT.BORDER);
        c.setLayoutData(new RowData(topshell.getClientArea().width,
                topshell.getClientArea().height - 150));
        c.setBackground(parent.getDisplay().getSystemColor(SWT.COLOR_BLACK));
        c.addPaintListener(this);
        c.addMouseMoveListener(this);
View Full Code Here

Examples of org.eclipse.swt.widgets.Canvas

        lbAccessType = new Label(preference, SWT.READ_ONLY);
        lbAccessType.setText("Visualizing: ");
        visualizing = new List(preference, SWT.READ_ONLY);
        visualizing.setItems(new String[] {"Read" , "Write"});
        visualizing.setSelection(0);
        c = new Canvas(topshell, SWT.DOUBLE_BUFFERED | SWT.BORDER);
        c.setLayoutData(new RowData(topshell.getClientArea().width,
                topshell.getClientArea().height - 75));
        c.addPaintListener(this);
        value = new float[noOfBins];
        for (int i = 0; i < noOfBins; i++) {
View Full Code Here

Examples of org.eclipse.swt.widgets.Canvas

     * @param parent the parent of the Pattern view.
     */
    public final void createPartControl(final Composite parent) {
        cm = new ColorMap(parent.getDisplay());
        this.topshell = parent;
        c = new Canvas(parent, SWT.BORDER | SWT.DOUBLE_BUFFERED);
        c.addPaintListener(new PaintListener()
        {
            public void paintControl(final PaintEvent e) {
                paintLabel(e.gc);
            }
        });
        c2 = new Canvas(parent, SWT.BORDER | SWT.DOUBLE_BUFFERED);
        c2.addPaintListener(new PaintListener()
        {
            public void paintControl(final PaintEvent e) {
                paintPattern(e.gc);
            }
View Full Code Here

Examples of org.eclipse.swt.widgets.Canvas

            @Override
            public void run() {
                final int ms = 1000 / 50;
                final Display display = new Display();
                final Shell shell = new Shell(display, SWT.SHELL_TRIM & ~SWT.RESIZE);
                final Canvas canvas = new Canvas(shell, SWT.DOUBLE_BUFFERED);
                canvas.addPaintListener(Viz.this);
                canvas.setSize(512, 512);
                shell.setText("MDS");
                shell.pack();
                shell.open();
                display.timerExec(ms , new Runnable() {
                    @Override
                    public void run() {
                        if (shell.isDisposed()) return;
                        canvas.redraw();
                        display.timerExec(ms, this);
                    }
                });
                while (!shell.isDisposed()) {
                    if (!display.readAndDispatch())
View Full Code Here

Examples of org.eclipse.swt.widgets.Canvas

            @Override
            public void run() {
                final int ms = 1000 / 50;
                final Display display = new Display();
                final Shell shell = new Shell(display, SWT.SHELL_TRIM & ~SWT.RESIZE);
                final Canvas canvas = new Canvas(shell, SWT.DOUBLE_BUFFERED);
                canvas.addPaintListener(PointsDatavis.this);
                canvas.setSize(512, 512);
                shell.setText("MDS");
                shell.pack();
                shell.open();
                display.timerExec(ms , new Runnable() {
                    @Override
                    public void run() {
                        if (shell.isDisposed()) return;
                        canvas.redraw();
                        display.timerExec(ms, this);
                    }
                });
                while (!shell.isDisposed()) {
                    if (!display.readAndDispatch())
View Full Code Here

Examples of org.eclipse.swt.widgets.Canvas

        mapContainer.setLayout(new FillLayout(SWT.LEFT));
        mapContainer.setLayoutData(new GridData(GridData.FILL_BOTH));
       
        updateBackgroundColors();

        canvas = new Canvas(mapContainer, SWT.DOUBLE_BUFFERED);
        hoverShell = new HoverShell(canvas);
        MenuManager menuMgr= new MenuManager();
        menuMgr.setRemoveAllWhenShown(true);
        menuMgr.addMenuListener(menuListener);
        Menu menu = menuMgr.createContextMenu(canvas);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.