use of com.biglybt.pifimpl.local.ui.config.HyperlinkParameterImpl in project BiglyBT by BiglySoftware.
the class ConfigSectionConnectionDNS method build.
@Override
public void build() {
add(new LabelParameterImpl("ConfigView.section.dns.info"));
add(new HyperlinkParameterImpl("ConfigView.label.please.visit.here", Wiki.DNS));
add(new StringParameterImpl(Connection.SCFG_DNS_ALT_SERVERS, "ConfigView.section.dns.alts"));
add(new BooleanParameterImpl(Connection.BCFG_DNS_ALT_SERVERS_SOCKS_ENABLE, "ConfigView.section.dns.allow_socks"));
}
use of com.biglybt.pifimpl.local.ui.config.HyperlinkParameterImpl in project BiglyBT by BiglySoftware.
the class ConfigSectionPlugins method build.
@Override
public void build() {
if (!CoreFactory.isCoreRunning()) {
add(new LabelParameterImpl("core.not.available"));
}
String sep = File.separator;
File fUserPluginDir = FileUtil.getUserFile("plugins");
String sUserPluginDir;
try {
sUserPluginDir = fUserPluginDir.getCanonicalPath();
} catch (Throwable e) {
sUserPluginDir = fUserPluginDir.toString();
}
if (!sUserPluginDir.endsWith(sep)) {
sUserPluginDir += sep;
}
File fAppPluginDir = FileUtil.getApplicationFile("plugins");
String sAppPluginDir;
try {
sAppPluginDir = fAppPluginDir.getCanonicalPath();
} catch (Throwable e) {
sAppPluginDir = fAppPluginDir.toString();
}
if (!sAppPluginDir.endsWith(sep)) {
sAppPluginDir += sep;
}
add(new LabelParameterImpl("ConfigView.pluginlist.whereToPut"));
File dirUserPlugin = FileUtil.newFile(sUserPluginDir);
if (!(dirUserPlugin.exists() && dirUserPlugin.isDirectory())) {
dirUserPlugin = dirUserPlugin.getParentFile();
}
HyperlinkParameterImpl paramUserPluginDir = new HyperlinkParameterImpl("!" + sUserPluginDir.replaceAll("&", "&&") + "!", dirUserPlugin.getAbsolutePath());
add(paramUserPluginDir);
paramUserPluginDir.setIndent(1, false);
add(new LabelParameterImpl("ConfigView.pluginlist.whereToPutOr"));
File dirAppPlugin = FileUtil.newFile(sAppPluginDir);
if (!(dirAppPlugin.exists() && dirAppPlugin.isDirectory())) {
dirAppPlugin = dirAppPlugin.getParentFile();
}
HyperlinkParameterImpl paramAppPluginDir = new HyperlinkParameterImpl("!" + sAppPluginDir.replaceAll("&", "&&") + "!", dirAppPlugin.getAbsolutePath());
add(paramAppPluginDir);
paramAppPluginDir.setIndent(1, false);
if (paramContextPluginList != null) {
add(new LabelParameterImpl("ConfigView.pluginlist.info"));
add("PluginList", new UIParameterImpl(paramContextPluginList, null));
} else {
// could setup params for each plugin
}
}
Aggregations