📄 configsectionsharing.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: ConfigSectionSharing.java
package org.gudy.azureus2.ui.swt.views.configsections;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.*;
import org.gudy.azureus2.ui.swt.Messages;
import org.gudy.azureus2.ui.swt.config.*;
import org.gudy.azureus2.ui.swt.plugins.UISWTConfigSection;
public class ConfigSectionSharing
implements UISWTConfigSection
{
public ConfigSectionSharing()
{
}
public String configSectionGetParentSection()
{
return "root";
}
public String configSectionGetName()
{
return "sharing";
}
public void configSectionSave()
{
}
public void configSectionDelete()
{
}
public int maxUserMode()
{
return 0;
}
public Composite configSectionCreate(Composite parent)
{
Composite gSharing = new Composite(parent, 64);
GridData gridData = new GridData(272);
gSharing.setLayoutData(gridData);
GridLayout layout = new GridLayout();
layout.numColumns = 2;
layout.marginHeight = 0;
gSharing.setLayout(layout);
gridData = new GridData();
Label protocol_lab = new Label(gSharing, 0);
Messages.setLanguageText(protocol_lab, "ConfigView.section.sharing.protocol");
protocol_lab.setLayoutData(gridData);
String protocols[] = {
"HTTP", "HTTPS", "UDP", "DHT"
};
String descs[] = {
"HTTP", "HTTPS (SSL)", "UDP", "Decentralised"
};
new StringListParameter(gSharing, "Sharing Protocol", "DHT", descs, protocols);
GridData grid_data = new GridData();
grid_data.horizontalSpan = 2;
final BooleanParameter private_torrent = new BooleanParameter(gSharing, "Sharing Torrent Private", "ConfigView.section.sharing.privatetorrent");
private_torrent.setLayoutData(grid_data);
gridData = new GridData();
gridData.horizontalSpan = 2;
final BooleanParameter permit_dht = new BooleanParameter(gSharing, "Sharing Permit DHT", "ConfigView.section.sharing.permitdht");
permit_dht.setLayoutData(gridData);
private_torrent.setAdditionalActionPerformer(new ChangeSelectionActionPerformer(permit_dht.getControls(), true));
private_torrent.addChangeListener(new ParameterChangeAdapter() {
final BooleanParameter val$private_torrent;
final BooleanParameter val$permit_dht;
final ConfigSectionSharing this$0;
public void parameterChanged(Parameter p, boolean caused_internally)
{
if (private_torrent.isSelected())
permit_dht.setSelected(false);
}
{
this$0 = ConfigSectionSharing.this;
private_torrent = booleanparameter;
permit_dht = booleanparameter1;
super();
}
});
gridData = new GridData();
gridData.horizontalSpan = 2;
(new BooleanParameter(gSharing, "Sharing Add Hashes", "wizard.createtorrent.extrahashes")).setLayoutData(gridData);
gridData = new GridData();
gridData.horizontalSpan = 2;
BooleanParameter rescan_enable = new BooleanParameter(gSharing, "Sharing Rescan Enable", "ConfigView.section.sharing.rescanenable");
rescan_enable.setLayoutData(gridData);
gridData = new GridData();
gridData.horizontalIndent = 25;
Label period_label = new Label(gSharing, 0);
Messages.setLanguageText(period_label, "ConfigView.section.sharing.rescanperiod");
period_label.setLayoutData(gridData);
gridData = new GridData();
gridData.widthHint = 30;
IntParameter rescan_period = new IntParameter(gSharing, "Sharing Rescan Period");
rescan_period.setMinimumValue(1);
rescan_period.setLayoutData(gridData);
rescan_enable.setAdditionalActionPerformer(new ChangeSelectionActionPerformer(rescan_period.getControls()));
rescan_enable.setAdditionalActionPerformer(new ChangeSelectionActionPerformer(new Control[] {
period_label
}));
Label comment_label = new Label(gSharing, 0);
Messages.setLanguageText(comment_label, "ConfigView.section.sharing.torrentcomment");
new Label(gSharing, 0);
gridData = new GridData(768);
gridData.horizontalIndent = 25;
gridData.horizontalSpan = 2;
StringParameter torrent_comment = new StringParameter(gSharing, "Sharing Torrent Comment", "");
torrent_comment.setLayoutData(gridData);
return gSharing;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -