Console: Consolidate "checked" code

This commit is contained in:
zzz
2015-12-18 14:43:31 +00:00
parent 8226e92973
commit c59496f30f
9 changed files with 34 additions and 42 deletions

View File

@@ -25,7 +25,6 @@ public class ConfigNetHelper extends HelperBase {
final static String PROP_I2NP_NTCP_PORT = "i2np.ntcp.port";
final static String PROP_I2NP_NTCP_AUTO_PORT = "i2np.ntcp.autoport";
final static String PROP_I2NP_NTCP_AUTO_IP = "i2np.ntcp.autoip";
private final static String CHECKED = " checked=\"checked\" ";
public String getUdphostname() {
return _context.getProperty(UDPTransport.PROP_EXTERNAL_HOST, "");
@@ -78,13 +77,6 @@ public class ConfigNetHelper extends HelperBase {
return _context.getProperty(UDPTransport.PROP_INTERNAL_PORT, "unset");
}
/** @param prop must default to false */
public String getChecked(String prop) {
if (_context.getBooleanProperty(prop))
return CHECKED;
return "";
}
public String getDynamicKeysChecked() {
return getChecked(Router.PROP_DYNAMIC_KEYS);
}