📄 exporttorrentwizardoutputpanel.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: ExportTorrentWizardOutputPanel.java
package org.gudy.azureus2.ui.swt.exporttorrent.wizard;
import java.io.File;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.*;
import org.gudy.azureus2.core3.internat.MessageText;
import org.gudy.azureus2.core3.util.Constants;
import org.gudy.azureus2.ui.swt.Messages;
import org.gudy.azureus2.ui.swt.wizard.*;
// Referenced classes of package org.gudy.azureus2.ui.swt.exporttorrent.wizard:
// ExportTorrentWizard, ExportTorrentWizardFinishPanel
public class ExportTorrentWizardOutputPanel extends AbstractWizardPanel
{
protected boolean file_valid;
public ExportTorrentWizardOutputPanel(Wizard wizard, IWizardPanel previous)
{
AbstractWizardPanel(wizard, previous);
file_valid = false;
}
public void show()
{
wizard.setTitle(MessageText.getString("exportTorrentWizard.exportfile.title"));
Composite rootPanel = wizard.getPanel();
GridLayout layout = new GridLayout();
layout.numColumns = 1;
rootPanel.setLayout(layout);
Composite panel = new Composite(rootPanel, 0);
GridData gridData = new GridData(772);
panel.setLayoutData(gridData);
layout = new GridLayout();
layout.numColumns = 3;
panel.setLayout(layout);
Label label = new Label(panel, 64);
gridData = new GridData();
gridData.horizontalSpan = 3;
gridData.widthHint = 380;
label.setLayoutData(gridData);
Messages.setLanguageText(label, "exportTorrentWizard.exportfile.message");
label = new Label(panel, 0);
Messages.setLanguageText(label, "exportTorrentWizard.exportfile.path");
final Text textPath = new Text(panel, 2048);
gridData = new GridData(768);
textPath.setLayoutData(gridData);
textPath.setText(((ExportTorrentWizard)wizard).getExportFile());
Button browse = new Button(panel, 8);
Messages.setLanguageText(browse, "exportTorrentWizard.exportfile.browse");
browse.addListener(13, new Listener() );
textPath.addListener(24, new Listener() {
final Text val$textPath;
final ExportTorrentWizardOutputPanel this$0;
public void handleEvent(Event event)
{
String path = textPath.getText();
pathSet(path);
}
{
this$0 = ExportTorrentWizardOutputPanel.this;
textPath = text;
Object();
}
});
textPath.setText(((ExportTorrentWizard)wizard).getExportFile());
textPath.setFocus();
}
protected void pathSet(String path)
{
((ExportTorrentWizard)wizard).setExportFile(path);
file_valid = false;
try
{
File f = new File(path);
if (f.exists())
{
if (f.isFile())
{
wizard.setErrorMessage("");
file_valid = true;
} else
{
wizard.setErrorMessage(MessageText.getString("exportTorrentWizard.exportfile.invalidPath"));
}
} else
{
wizard.setErrorMessage("");
file_valid = true;
}
}
catch (Exception e)
{
wizard.setErrorMessage(MessageText.getString("exportTorrentWizard.exportfile.invalidPath"));
}
wizard.setFinishEnabled(file_valid);
}
public boolean isFinishEnabled()
{
return file_valid;
}
public boolean isFinishSelectionOK()
{
return ((ExportTorrentWizard)wizard).performExport();
}
public IWizardPanel getFinishPanel()
{
return new ExportTorrentWizardFinishPanel((ExportTorrentWizard)wizard, this);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -