Package com.aelitis.azureus.ui.swt.views.skin

Examples of com.aelitis.azureus.ui.swt.views.skin.SkinnedDialog


    }
  }

  // @see com.aelitis.azureus.ui.swt.UIFunctionsSWT#showCoreWaitDlg()
  public Shell showCoreWaitDlg() {
    final SkinnedDialog closeDialog = new SkinnedDialog(
        "skin3_dlg_coreloading", "coreloading.body", SWT.TITLE | SWT.BORDER
        | SWT.APPLICATION_MODAL);
   
    closeDialog.setTitle(MessageText.getString("dlg.corewait.title"));
    SWTSkin skin = closeDialog.getSkin();
    SWTSkinObjectButton soButton = (SWTSkinObjectButton) skin.getSkinObject("close");

    final SWTSkinObjectText soWaitTask = (SWTSkinObjectText) skin.getSkinObject("task");

    final SWTSkinObject soWaitProgress = skin.getSkinObject("progress");
    if (soWaitProgress != null) {
      soWaitProgress.getControl().addPaintListener(new PaintListener() {
        public void paintControl(PaintEvent e) {
          Control c = (Control) e.widget;
          Point size = c.getSize();
          e.gc.setBackground(ColorCache.getColor(e.display, "#23a7df"));
          Object data = soWaitProgress.getData("progress");
          if (data instanceof Long) {
            int waitProgress = ((Long) data).intValue();
            int breakX = size.x * waitProgress / 100;
            e.gc.fillRectangle(0, 0, breakX, size.y);
            e.gc.setBackground(ColorCache.getColor(e.display, "#cccccc"));
            e.gc.fillRectangle(breakX, 0, size.x - breakX, size.y);
          }
        }
      });
    }
   
    if (!AzureusCoreFactory.isCoreRunning()) {
      final Initializer initializer = Initializer.getLastInitializer();
      if (initializer != null) {
        initializer.addListener(new InitializerListener() {
          public void reportPercent(final int percent) {
            Utils.execSWTThread(new AERunnable() {
              public void runSupport() {
                if (soWaitProgress != null && !soWaitProgress.isDisposed()) {
                  soWaitProgress.setData("progress", new Long(percent));
                  soWaitProgress.getControl().redraw();
                  soWaitProgress.getControl().update();
                }
              }
            });
            if (percent > 100) {
              initializer.removeListener(this);
            }
          }
       
          public void reportCurrentTask(String currentTask) {
            if (soWaitTask != null && !soWaitTask.isDisposed()) {
              soWaitTask.setText(currentTask);
            }
          }
        });
      }
    }

    if (soButton != null) {
      soButton.addSelectionListener(new ButtonListenerAdapter() {
        public void pressed(SWTSkinButtonUtility buttonUtility,
            SWTSkinObject skinObject, int stateMask) {
          closeDialog.close();
        }
      });
    }

    closeDialog.addCloseListener(new SkinnedDialogClosedListener() {
      public void skinDialogClosed(SkinnedDialog dialog) {
      }
    });

    closeDialog.open();
    return closeDialog.getShell();
  }
View Full Code Here


    PluginInterface piWebUI = getWebUI();

    boolean showFTUX = piWebUI == null || !pairingManager.isEnabled();

    if (skinnedDialog == null || skinnedDialog.isDisposed()) {
      skinnedDialog = new SkinnedDialog("skin3_dlg_remotepairing", "shell",
          SWT.DIALOG_TRIM);

      skin = skinnedDialog.getSkin();

      soCodeArea = skin.getSkinObject("code-area");
View Full Code Here

    this.mf = mf;
  }
 
  public void open(DeviceTemplateClosedListener l) {
    this.listener = l;
    skinnedDialog = new SkinnedDialog("skin3_dlg_deviceadd_mfchooser",
        "shell", SWT.TITLE | SWT.BORDER);
   
    skinnedDialog.addCloseListener(new SkinnedDialogClosedListener() {
      public void skinDialogClosed(SkinnedDialog dialog) {
        if (listener != null) {
View Full Code Here

  private ClosedListener listener;
  protected DeviceManufacturer chosenMF;

  public void open(ClosedListener l) {
    this.listener = l;
    skinnedDialog = new SkinnedDialog("skin3_dlg_deviceadd_mfchooser",
        "shell", SWT.TITLE | SWT.BORDER);
   
    skinnedDialog.addCloseListener(new SkinnedDialogClosedListener() {
      public void skinDialogClosed(SkinnedDialog dialog) {
        if (listener != null) {
View Full Code Here

TOP

Related Classes of com.aelitis.azureus.ui.swt.views.skin.SkinnedDialog

Copyright © 2018 www.massapicom. 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.