Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
ConfigSectionFileMove.java
Package: ~Azureus2.jar.rar [view]
Upload User: bjgf360
Upload Date: 2016-11-11
Package Size: 2434k
Code Size: 6k
Category:
Jsp/Servlet
Development Platform:
Java
- // Decompiled by Jad v1.5.8e2. Copyright 2001 Pavel Kouznetsov.
- // Jad home page: http://kpdus.tripod.com/jad.html
- // Decompiler options: packimports(3) fieldsfirst ansi space
- // Source File Name: ConfigSectionFileMove.java
- package org.gudy.azureus2.ui.swt.views.configsections;
- import com.aelitis.azureus.ui.swt.imageloader.ImageLoader;
- import org.eclipse.swt.graphics.Image;
- import org.eclipse.swt.layout.GridData;
- import org.eclipse.swt.layout.GridLayout;
- import org.eclipse.swt.widgets.*;
- import org.gudy.azureus2.core3.config.COConfigurationManager;
- import org.gudy.azureus2.core3.internat.MessageText;
- import org.gudy.azureus2.ui.swt.Messages;
- import org.gudy.azureus2.ui.swt.config.*;
- import org.gudy.azureus2.ui.swt.plugins.UISWTConfigSection;
- public class ConfigSectionFileMove
- implements UISWTConfigSection
- {
- private Image imgOpenFolder;
- public ConfigSectionFileMove()
- {
- }
- public String configSectionGetParentSection()
- {
- return "files";
- }
- public String configSectionGetName()
- {
- return "files.move";
- }
- public void configSectionSave()
- {
- }
- public void configSectionDelete()
- {
- ImageLoader imageLoader = ImageLoader.getInstance();
- imageLoader.releaseImage("openFolderButton");
- }
- public int maxUserMode()
- {
- return 1;
- }
- public Composite configSectionCreate(Composite parent)
- {
- int userMode = COConfigurationManager.getIntParameter("User Mode");
- Composite gFile = new Composite(parent, 0);
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- layout.marginHeight = 0;
- gFile.setLayout(layout);
- ImageLoader imageLoader = ImageLoader.getInstance();
- imgOpenFolder = imageLoader.getImage("openFolderButton");
- createMoveOnEventGrouping(gFile, "ConfigView.label.movecompleted", "Move Completed When Done", "Completed Files Directory", "Move Torrent When Done", "Move Only When In Default Save Dir", null);
- createMoveOnEventGrouping(gFile, "ConfigView.label.moveremoved", "File.move.download.removed.enabled", "File.move.download.removed.path", "File.move.download.removed.move_torrent", "File.move.download.removed.only_in_default", "File.move.download.removed.move_partial");
- GridData gridData;
- if (userMode > 0)
- {
- BooleanParameter copyDontMove = new BooleanParameter(gFile, "Copy And Delete Data Rather Than Move", "ConfigView.label.copyanddeleteratherthanmove");
- gridData = new GridData();
- gridData.horizontalSpan = 2;
- copyDontMove.setLayoutData(gridData);
- }
- BooleanParameter subdirIsDefault = new BooleanParameter(gFile, "File.move.subdir_is_default", "ConfigView.label.subdir_is_in_default");
- gridData = new GridData();
- gridData.horizontalSpan = 2;
- subdirIsDefault.setLayoutData(gridData);
- return gFile;
- }
- private void createMoveOnEventGrouping(final Composite gFile, String enable_section_label, String move_when_done_setting, String move_path_setting, String move_torrent_setting, String move_when_in_save_dir_setting, String move_partial_downloads_setting)
- {
- BooleanParameter moveCompleted = new BooleanParameter(gFile, move_when_done_setting, enable_section_label);
- GridData gridData = new GridData();
- GridLayout layout = null;
- gridData.horizontalSpan = 2;
- moveCompleted.setLayoutData(gridData);
- Composite gMoveCompleted = new Composite(gFile, 0);
- gridData = new GridData(768);
- gridData.horizontalIndent = 25;
- gridData.horizontalSpan = 2;
- gMoveCompleted.setLayoutData(gridData);
- layout = new GridLayout();
- layout.marginHeight = 0;
- layout.marginWidth = 4;
- layout.numColumns = 3;
- gMoveCompleted.setLayout(layout);
- Label lDir = new Label(gMoveCompleted, 0);
- Messages.setLanguageText(lDir, "ConfigView.label.directory");
- gridData = new GridData(768);
- final StringParameter movePath = new StringParameter(gMoveCompleted, move_path_setting);
- movePath.setLayoutData(gridData);
- Button browse3 = new Button(gMoveCompleted, 8);
- browse3.setImage(imgOpenFolder);
- imgOpenFolder.setBackground(browse3.getBackground());
- browse3.setToolTipText(MessageText.getString("ConfigView.button.browse"));
- browse3.addListener(13, new Listener() {
- final Composite val$gFile;
- final StringParameter val$movePath;
- final ConfigSectionFileMove this$0;
- public void handleEvent(Event event)
- {
- DirectoryDialog dialog = new DirectoryDialog(gFile.getShell(), 0x10000);
- dialog.setFilterPath(movePath.getValue());
- dialog.setText(MessageText.getString("ConfigView.dialog.choosemovepath"));
- String path = dialog.open();
- if (path != null)
- movePath.setValue(path);
- }
- {
- this$0 = ConfigSectionFileMove.this;
- gFile = composite;
- movePath = stringparameter;
- super();
- }
- });
- BooleanParameter moveTorrent = new BooleanParameter(gMoveCompleted, move_torrent_setting, "ConfigView.label.movetorrent");
- gridData = new GridData();
- gridData.horizontalSpan = 2;
- moveTorrent.setLayoutData(gridData);
- BooleanParameter moveOnly = new BooleanParameter(gMoveCompleted, move_when_in_save_dir_setting, "ConfigView.label.moveonlyusingdefaultsave");
- gridData = new GridData();
- gridData.horizontalSpan = 2;
- moveOnly.setLayoutData(gridData);
- if (move_partial_downloads_setting != null)
- {
- BooleanParameter movePartial = new BooleanParameter(gMoveCompleted, move_partial_downloads_setting, "ConfigView.label.movepartialdownloads");
- gridData = new GridData();
- gridData.horizontalSpan = 2;
- movePartial.setLayoutData(gridData);
- }
- Control controls3[] = {
- gMoveCompleted
- };
- org.gudy.azureus2.ui.swt.config.IAdditionalActionPerformer grayPathAndButton2 = new ChangeSelectionActionPerformer(controls3);
- moveCompleted.setAdditionalActionPerformer(grayPathAndButton2);
- }
- }