Package com.aelitis.azureus.ui.swt.imageloader

Examples of com.aelitis.azureus.ui.swt.imageloader.ImageLoader


          imgID = "redled";
          break;
      }

      if (!imgID.equals(lastSRimageID)) {
        ImageLoader imageLoader = ImageLoader.getInstance();
        srStatus.setImage(imageLoader.getImage(imgID));
        if (lastSRimageID != null) {
          imageLoader.releaseImage(lastSRimageID);
        }
        lastSRimageID  = imgID;
      }
     
      last_sr_status = sr_status;
View Full Code Here


      Utils.execSWTThread(new AERunnable() {
        public void runSupport() {
          if (progressViewerImageLabel.isDisposed()) {
            return;
          }
          ImageLoader imageLoader = ImageLoader.getInstance();
          progressViewerImageLabel.setImage(imageLoader.getImage(fImageID));
          if (lastProgressImageID != null) {
            imageLoader.releaseImage(lastProgressImageID);
          }
          lastProgressImageID  = fImageID;
        }
      });
    }
View Full Code Here

    /*
     * Action labels
     */

    ImageLoader imageLoader = ImageLoader.getInstance();
    imageLoader.setLabelImage(actionLabel_cancel, "progress_cancel");
    imageLoader.setLabelImage(actionLabel_remove, "progress_remove");
    imageLoader.setLabelImage(actionLabel_retry, "progress_retry");
   
    actionLabel_cancel.setToolTipText(MessageText.getString("Progress.reporting.action.label.cancel.tooltip"));
    actionLabel_remove.setToolTipText(MessageText.getString("Progress.reporting.action.label.remove.tooltip"));
    actionLabel_retry.setToolTipText(MessageText.getString("Progress.reporting.action.label.retry.tooltip"));

View Full Code Here

  public void configSectionSave() {
  }

  public void configSectionDelete() {
    ImageLoader imageLoader = ImageLoader.getInstance();
    imageLoader.releaseImage("openFolderButton");
  }
View Full Code Here


  public Composite configSectionCreate(final Composite parent) {
    Image imgOpenFolder = null;
    if (!Constants.isOSX) {
      ImageLoader imageLoader = ImageLoader.getInstance();
      imgOpenFolder = imageLoader.getImage("openFolderButton");     
    }

    GridData gridData;
    GridLayout layout;
View Full Code Here

    }
   
    if (filter != null) {
      filter.removeListener(filterListener);
    }
    ImageLoader imageLoader = ImageLoader.getInstance();
    imageLoader.releaseImage("openFolderButton");
    imageLoader.releaseImage("subitem");
  }
View Full Code Here

      Label lblNotAvail = new Label(cSection, SWT.WRAP);
      Messages.setLanguageText(lblNotAvail, "core.not.available");
      return cSection;
    }

    ImageLoader imageLoader = ImageLoader.getInstance();
    Image imgOpenFolder = imageLoader.getImage("openFolderButton");     

    String sCurConfigID;

    GridData gridData;

    int userMode = COConfigurationManager.getIntParameter("User Mode");

    final IpFilterManager ipFilterManager = AzureusCoreFactory.getSingleton().getIpFilterManager();
    filter = ipFilterManager.getIPFilter();

    Composite gFilter = new Composite(parent, SWT.NULL);
    GridLayout layout = new GridLayout();
    layout.marginHeight = 0;
    layout.marginWidth = 0;
    gFilter.setLayout(layout);
    gridData = new GridData(GridData.VERTICAL_ALIGN_FILL | GridData.HORIZONTAL_ALIGN_FILL);
    gFilter.setLayoutData(gridData);
   
   
    // start controls

      // row: enable filter + allow/deny
   
  gridData = new GridData();

    BooleanParameter enabled = new BooleanParameter(gFilter, "Ip Filter Enabled");
  enabled.setLayoutData( gridData );
    Messages.setLanguageText(enabled.getControl(), "ConfigView.section.ipfilter.enable");

  gridData = new GridData();

    BooleanParameter deny = new BooleanParameter(gFilter, "Ip Filter Allow");
  deny.setLayoutData( gridData );
    Messages.setLanguageText(deny.getControl(), "ConfigView.section.ipfilter.allow");
 
    deny.addChangeListener(
      new ParameterChangeAdapter()
    {
        public void
        parameterChanged(
          Parameter  p,
          boolean    caused_internally )
      {
          setPercentageBlocked();
      }
    });
   
      // row persist banning
   
  gridData = new GridData();

  BooleanParameter persist_bad_data_banning = new BooleanParameter(gFilter, "Ip Filter Banning Persistent");
  persist_bad_data_banning.setLayoutData( gridData );
  Messages.setLanguageText(persist_bad_data_banning.getControl(), "ConfigView.section.ipfilter.persistblocking");

    Group gBlockBanning = new Group(gFilter, SWT.NULL);
    Messages.setLanguageText(gBlockBanning, "ConfigView.section.ipfilter.peerblocking.group");
    layout = new GridLayout();
    layout.numColumns = 2;
    gBlockBanning.setLayout(layout);


    // row block bad + group ban

    BooleanParameter enable_bad_data_banning = new BooleanParameter(
        gBlockBanning, "Ip Filter Enable Banning",
        "ConfigView.section.ipfilter.enablebanning");
    gridData = new GridData();
    gridData.horizontalSpan = 2;
    enable_bad_data_banning.setLayoutData(gridData);

    Label discard_label = new Label(gBlockBanning, SWT.NULL);
    Messages.setLanguageText(discard_label,
        "ConfigView.section.ipfilter.discardbanning");

    FloatParameter discard_ratio = new FloatParameter(gBlockBanning, "Ip Filter Ban Discard Ratio");
    gridData = new GridData();
    discard_ratio.setLayoutData(gridData);


    Composite cIndent = new Composite(gBlockBanning, SWT.NONE);
    gridData = new GridData(GridData.FILL_BOTH);
    gridData.horizontalSpan = 2;
    gridData.horizontalIndent = 15;
    cIndent.setLayoutData(gridData);
    layout = new GridLayout(3, false);
    layout.marginHeight = 0;
    layout.marginWidth = 0;
    cIndent.setLayout(layout);
   
    Image img = imageLoader.getImage("subitem");
    Label label = new Label(cIndent, SWT.NULL);
    gridData = new GridData(GridData.VERTICAL_ALIGN_BEGINNING);
    label.setLayoutData(gridData);
    label.setImage(img);
View Full Code Here

    return 0;
  }


  public void configSectionDelete() {
    ImageLoader imageLoader = ImageLoader.getInstance();
    imageLoader.releaseImage("redled");
    imageLoader.releaseImage("greenled");
  }
View Full Code Here

    GridLayout layout;
    GridData gridData;

    Label label;
   
    ImageLoader imageLoader = ImageLoader.getInstance();
    imgRedLed = imageLoader.getImage("redled");
    imgGreenLed = imageLoader.getImage("greenled");

    Composite infoGroup = new Composite(parent, SWT.NULL);
    gridData = new GridData(GridData.VERTICAL_ALIGN_FILL
        | GridData.HORIZONTAL_ALIGN_FILL);
    infoGroup.setLayoutData(gridData);
View Full Code Here

    if (!Constants.isOSX)
      rLayout.spacing = 0;
    rLayout.fill = true;
    cTorrentListRight.setLayout(rLayout);

    ImageLoader imageLoader = ImageLoader.getInstance();

    Button torMoveUp = new Button(cTorrentListRight, SWT.PUSH);
    imageLoader.setButtonImage(torMoveUp, "up");
    torMoveUp.setToolTipText(MessageText.getString("Button.moveUp"));
    torMoveUp.addListener(SWT.Selection, new Listener() {
      public void handleEvent(Event event) {
        int[] indices = torrentTable.getSelectionIndices();
        if (indices.length == 0)
          return;

        Arrays.sort(indices);
        if (indices[0] == 0)
          return;

        for (int i = 0; i < indices.length; i++) {
          int pos = indices[i];
          Object save = torrentList.get(pos - 1);
          torrentList.set(pos - 1, torrentList.get(pos));
          torrentList.set(pos, save);

          indices[i]--;
        }
        torrentTable.setSelection(indices);
        torrentTable.clearAll();
      }
    });

    Button torMoveDown = new Button(cTorrentListRight, SWT.PUSH);
    imageLoader.setButtonImage(torMoveDown, "down");
    torMoveDown.setToolTipText(MessageText.getString("Button.moveDown"));
    torMoveDown.addListener(SWT.Selection, new Listener() {
      public void handleEvent(Event event) {
        int[] indices = torrentTable.getSelectionIndices();
        if (indices.length == 0)
          return;

        Arrays.sort(indices);
        int max = indices.length - 1;
        if (indices[max] == torrentList.size() - 1)
          return;

        for (int i = max; i >= 0; i--) {
          int pos = indices[i];
          Object save = torrentList.get(pos + 1);
          torrentList.set(pos + 1, torrentList.get(pos));
          torrentList.set(pos, save);

          indices[i]++;
        }
        torrentTable.setSelection(indices);
        torrentTable.clearAll();
      }
    });

    Button torMoveRemove = new Button(cTorrentListRight, SWT.PUSH);
    torMoveRemove.setToolTipText(MessageText.getString("OpenTorrentWindow.torrent.remove"));
    imageLoader.setButtonImage(torMoveRemove, "delete");
    torMoveRemove.addListener(SWT.Selection, new Listener() {
      public void handleEvent(Event event) {
        deleteSelected(torrentTable, torrentList);
      }
    });
View Full Code Here

TOP

Related Classes of com.aelitis.azureus.ui.swt.imageloader.ImageLoader

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.