Examples of Display


Examples of org.eclipse.swt.widgets.Display

  /**
   * Paint the Label's border.
   */
  private void paintBorder(GC gc, Rectangle r) {
    Display disp = getDisplay();

    Color c1 = null;
    Color c2 = null;

    int style = getStyle();
    if ((style & SWT.SHADOW_IN) != 0) {
      c1 = disp.getSystemColor(SWT.COLOR_WIDGET_NORMAL_SHADOW);
      c2 = disp.getSystemColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW);
    }
    if ((style & SWT.SHADOW_OUT) != 0) {
      c1 = disp.getSystemColor(SWT.COLOR_WIDGET_LIGHT_SHADOW);
      c2 = disp.getSystemColor(SWT.COLOR_WIDGET_NORMAL_SHADOW);
    }

    if (c1 != null && c2 != null) {
      gc.setLineWidth(1);
      drawBevelRect(gc, r.x, r.y, r.width - 1, r.height - 1, c1, c2);
View Full Code Here

Examples of org.eclipse.swt.widgets.Display

  /**
   * Paint the Label's border.
   */
  private void paintBorder(GC gc, Rectangle r) {
    Display disp = getDisplay();

    Color c1 = null;
    Color c2 = null;

    int style = getStyle();
    if ((style & SWT.SHADOW_IN) != 0) {
      c1 = disp.getSystemColor(SWT.COLOR_WIDGET_NORMAL_SHADOW);
      c2 = disp.getSystemColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW);
    }
    if ((style & SWT.SHADOW_OUT) != 0) {
      c1 = disp.getSystemColor(SWT.COLOR_WIDGET_LIGHT_SHADOW);
      c2 = disp.getSystemColor(SWT.COLOR_WIDGET_NORMAL_SHADOW);
    }

    if (c1 != null && c2 != null) {
      gc.setLineWidth(1);
      drawBevelRect(gc, r.x, r.y, r.width - 1, r.height - 1, c1, c2);
View Full Code Here

Examples of org.eclipse.swt.widgets.Display

            if (updateUi)
              updateUi();
          }

          private void updateUi() {
            Display display = Display.getDefault();
            try {
              if (!isCanceled() && !display.isDisposed() && dialog.getShell() != null && !dialog.getShell().isDisposed()) {
                display.readAndDispatch();
                display.update();
              }
            }

            /*
             * Ensure to catch any Exception here and disable the update of the
View Full Code Here

Examples of org.eclipse.swt.widgets.Display

  /**
   * @param runnable
   */
  public static void runInBackgroundWithBusyIndicator(final Runnable runnable) {
    final Display display = Display.getCurrent();
    final Integer busyId = Integer.valueOf(nextBusyId++);

    /* Guard against Illegal-Thread-Access */
    if (display == null)
      throw new IllegalStateException("Method was not called from the UI-Thread!"); //$NON-NLS-1$

    /* Set the Cursor */
    Cursor cursor = display.getSystemCursor(SWT.CURSOR_APPSTARTING);
    Shell[] shells = display.getShells();
    for (Shell shell : shells) {
      Integer id = (Integer) shell.getData(BUSYID_NAME);
      if (id == null) {
        shell.setCursor(cursor);
        shell.setData(BUSYID_NAME, busyId);
      }
    }

    /* Run the Runnable and update cursor afterwards */
    runUIUpdater(new UIBackgroundJob(null) {

      @Override
      protected void runInBackground(IProgressMonitor monitor) {
        runnable.run();
      }

      @Override
      protected void runInUI(IProgressMonitor monitor) {
        if (!display.isDisposed()) {
          Shell[] shells = display.getShells();
          for (Shell shell : shells) {
            Integer id = (Integer) shell.getData(BUSYID_NAME);
            if (busyId.equals(id)) {
              shell.setCursor(null);
              shell.setData(BUSYID_NAME, null);
View Full Code Here

Examples of org.jbpm.examples.ch02.Display

  public void testSequence() {
    ProcessDefinition processDefinition = ProcessFactory.build("sequence")
        .compositeNode("sequence").initial().behaviour(new Sequence())
          .needsPrevious()
          .node("one").behaviour(new Display("one"))
          .node("2").behaviour(new WaitState())
          .node("two").behaviour(new Display("two"))
        .compositeEnd()
    .done();

    Execution execution = processDefinition.startExecution();
    execution.signal();
View Full Code Here

Examples of org.jpedal.Display

            }
    }
   
    //scroll to 'location'
        if (location != null) {
            Display pages=(org.jpedal.SingleDisplay) decode_pdf.getExternalHandler(org.jpedal.external.Options.Display);

            double scaling = decode_pdf.getScaling();
            double x = ((decode_pdf.getPdfPageData().getMediaBoxWidth(page) - ((Rectangle)location).getX())*scaling) + pages.getXCordForPage(page);
            double y = ((decode_pdf.getPdfPageData().getCropBoxHeight(page) - ((Rectangle)location).getY())*scaling) + pages.getYCordForPage(page);

            location = new Rectangle((int)x, (int)y, (int)decode_pdf.getVisibleRect().getWidth(), (int)decode_pdf.getVisibleRect().getHeight());

            decode_pdf.scrollRectToVisible((Rectangle) location);
        }
View Full Code Here

Examples of pivot.wtk.Display

    @Override
    public void windowOpened(Window window) {
        super.windowOpened(window);

        // Add this as a display mouse and key listener
        Display display = window.getDisplay();
        display.getComponentMouseListeners().add(closeHandler);
        display.getComponentMouseButtonListeners().add(closeHandler);
        display.getComponentMouseWheelListeners().add(closeHandler);
        display.getComponentKeyListeners().add(closeHandler);
    }
View Full Code Here

Examples of prefuse.Display

        {
            //==== If it is a tree node, then display the title and authors
            if (item.getGroup().equals("tree.nodes"))
            {
                Visualization v = item.getVisualization();
                Display d = v.getDisplay(0);
                String view_text = (((Node)v.getSourceTuple(item)).getString("hoverLabel"));
                d.setToolTipText(view_text);
            }
        }
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.