link start!
This commit is contained in:
@@ -0,0 +1,169 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* com.tridium.ui.theme.Theme
|
||||
* com.tridium.workbench.fieldeditors.BBooleanFE
|
||||
* javax.baja.gx.BBrush
|
||||
* javax.baja.gx.BInsets
|
||||
* javax.baja.naming.BOrd
|
||||
* javax.baja.sys.Action
|
||||
* javax.baja.sys.BBoolean
|
||||
* javax.baja.sys.BComponent
|
||||
* javax.baja.sys.BObject
|
||||
* javax.baja.sys.BasicContext
|
||||
* javax.baja.sys.Context
|
||||
* javax.baja.sys.Slot
|
||||
* javax.baja.sys.Sys
|
||||
* javax.baja.sys.Type
|
||||
* javax.baja.ui.BBorder
|
||||
* javax.baja.ui.BDialog
|
||||
* javax.baja.ui.BWidget
|
||||
* javax.baja.ui.enums.BHalign
|
||||
* javax.baja.ui.enums.BValign
|
||||
* javax.baja.ui.pane.BBorderPane
|
||||
* javax.baja.ui.pane.BEdgePane
|
||||
* javax.baja.ui.pane.BGridPane
|
||||
* javax.baja.ui.pane.BScrollPane
|
||||
* javax.baja.util.LexiconText
|
||||
* javax.baja.workbench.fieldeditor.BWbFieldEditor
|
||||
* javax.baja.workbench.view.BWbComponentView
|
||||
*/
|
||||
package com.tridium.platform.ui.ntp;
|
||||
|
||||
import com.tridium.platform.BSystemPlatformService;
|
||||
import com.tridium.platform.daemon.BDaemonAccessLevel;
|
||||
import com.tridium.platform.ntp.BNtpPlatformService;
|
||||
import com.tridium.platform.ui.ntp.BNtpServerVectorFE;
|
||||
import com.tridium.platform.ui.util.BButtonPane;
|
||||
import com.tridium.platform.ui.util.LabelUtil;
|
||||
import com.tridium.platform.win32.BNtpPlatformServiceWin32;
|
||||
import com.tridium.ui.theme.Theme;
|
||||
import com.tridium.workbench.fieldeditors.BBooleanFE;
|
||||
import javax.baja.gx.BBrush;
|
||||
import javax.baja.gx.BInsets;
|
||||
import javax.baja.naming.BOrd;
|
||||
import javax.baja.sys.Action;
|
||||
import javax.baja.sys.BBoolean;
|
||||
import javax.baja.sys.BComponent;
|
||||
import javax.baja.sys.BObject;
|
||||
import javax.baja.sys.BasicContext;
|
||||
import javax.baja.sys.Context;
|
||||
import javax.baja.sys.Slot;
|
||||
import javax.baja.sys.Sys;
|
||||
import javax.baja.sys.Type;
|
||||
import javax.baja.ui.BBorder;
|
||||
import javax.baja.ui.BDialog;
|
||||
import javax.baja.ui.BWidget;
|
||||
import javax.baja.ui.enums.BHalign;
|
||||
import javax.baja.ui.enums.BValign;
|
||||
import javax.baja.ui.pane.BBorderPane;
|
||||
import javax.baja.ui.pane.BEdgePane;
|
||||
import javax.baja.ui.pane.BGridPane;
|
||||
import javax.baja.ui.pane.BScrollPane;
|
||||
import javax.baja.util.LexiconText;
|
||||
import javax.baja.workbench.fieldeditor.BWbFieldEditor;
|
||||
import javax.baja.workbench.view.BWbComponentView;
|
||||
|
||||
public abstract class BNtpPlatformServiceEditor
|
||||
extends BWbComponentView {
|
||||
public static final Action onEnabledChanged = BNtpPlatformServiceEditor.newAction((int)0, null);
|
||||
public static final Type TYPE = Sys.loadType((Class)(class$com$tridium$platform$ui$ntp$BNtpPlatformServiceEditor == null ? (class$com$tridium$platform$ui$ntp$BNtpPlatformServiceEditor = BNtpPlatformServiceEditor.class$("com.tridium.platform.ui.ntp.BNtpPlatformServiceEditor")) : class$com$tridium$platform$ui$ntp$BNtpPlatformServiceEditor));
|
||||
protected BGridPane ledgerPane;
|
||||
protected BNtpServerVectorFE serversFe;
|
||||
protected BButtonPane buttonPane;
|
||||
protected BBooleanFE enabledFe;
|
||||
static /* synthetic */ Class class$com$tridium$platform$ui$ntp$BNtpPlatformServiceEditor;
|
||||
|
||||
public void onEnabledChanged() {
|
||||
this.invoke(onEnabledChanged, null, null);
|
||||
}
|
||||
|
||||
public Type getType() {
|
||||
return TYPE;
|
||||
}
|
||||
|
||||
public BNtpPlatformServiceEditor() {
|
||||
this.autoRegisterForComponentEvents = false;
|
||||
this.ledgerPane = new BGridPane(2);
|
||||
this.ledgerPane.setHalign(BHalign.left);
|
||||
this.ledgerPane.setValign(BValign.top);
|
||||
this.ledgerPane.setColumnGap(10.0);
|
||||
this.ledgerPane.setRowGap(6.0);
|
||||
this.ledgerPane.setColorRows(true);
|
||||
this.enabledFe = new BBooleanFE();
|
||||
LabelUtil.addLabelWidgetPair(this.ledgerPane, LexiconText.make((Type)TYPE, (String)"NtpPlatformService.enabled.label"), (BWidget)this.enabledFe);
|
||||
this.linkTo(null, (BComponent)this.enabledFe, (Slot)BWbFieldEditor.pluginModified, (Slot)setModified);
|
||||
this.linkTo(null, (BComponent)this.enabledFe, (Slot)BWbFieldEditor.pluginModified, (Slot)onEnabledChanged);
|
||||
BWidget[] bWidgetArray = new BWidget[1];
|
||||
this.serversFe = new BNtpServerVectorFE();
|
||||
bWidgetArray[0] = this.serversFe;
|
||||
BGridPane bGridPane = new BGridPane(bWidgetArray);
|
||||
this.linkTo(null, (BComponent)this.serversFe, (Slot)BWbFieldEditor.pluginModified, (Slot)setModified);
|
||||
bGridPane.setHalign(BHalign.left);
|
||||
bGridPane.setValign(BValign.top);
|
||||
BBorderPane bBorderPane = new BBorderPane((BWidget)this.ledgerPane);
|
||||
bBorderPane.setBorder(BBorder.solid);
|
||||
bBorderPane.setLabel((BWidget)LabelUtil.makeLabel(LexiconText.make((String)"platform", (String)"NtpPlatformService.settings.label"), true));
|
||||
bBorderPane.setMargin(BInsets.make((double)0.0, (double)0.0, (double)6.0, (double)0.0));
|
||||
BBorderPane bBorderPane2 = new BBorderPane((BWidget)bGridPane);
|
||||
bBorderPane2.setBorder(BBorder.solid);
|
||||
bBorderPane2.setLabel((BWidget)LabelUtil.makeLabel(LexiconText.make((String)"platform", (String)"NtpPlatformService.timeServers.label"), true));
|
||||
BBrush bBrush = Theme.scrollPane().getControlBackground();
|
||||
BScrollPane bScrollPane = new BScrollPane((BWidget)new BBorderPane((BWidget)new BEdgePane((BWidget)bBorderPane, null, null, null, (BWidget)bBorderPane2)));
|
||||
bScrollPane.setViewportBackground(bBrush);
|
||||
this.buttonPane = new BButtonPane();
|
||||
this.setContent((BWidget)new BEdgePane(null, (BWidget)new BBorderPane((BWidget)this.buttonPane, 5.0, 5.0, 0.0, 5.0), null, null, (BWidget)new BBorderPane((BWidget)bScrollPane, BBorder.inset, BInsets.DEFAULT)));
|
||||
}
|
||||
|
||||
protected void doLoadValue(BObject bObject, Context context) throws Exception {
|
||||
Context context2 = context == null ? new BasicContext() : context;
|
||||
BNtpPlatformService bNtpPlatformService = (BNtpPlatformService)bObject;
|
||||
bNtpPlatformService.lease(Integer.MAX_VALUE);
|
||||
bNtpPlatformService.poll();
|
||||
this.buttonPane.removeAll();
|
||||
this.buttonPane.addWorkbenchButtons((BWidget)this);
|
||||
this.enabledFe.loadValue((BObject)BBoolean.make((boolean)bNtpPlatformService.getEnabled()), context2);
|
||||
this.serversFe.loadValue((BObject)bNtpPlatformService.getTimeServers(), context2);
|
||||
this.doSetReadonly(this.isReadonly());
|
||||
}
|
||||
|
||||
protected BObject doSaveValue(BObject bObject, Context context) throws Exception {
|
||||
BNtpPlatformService bNtpPlatformService = (BNtpPlatformService)bObject;
|
||||
this.doValidate(bNtpPlatformService, context);
|
||||
boolean bl = !(bNtpPlatformService instanceof BNtpPlatformServiceWin32);
|
||||
bNtpPlatformService.setEnabled(((BBoolean)this.enabledFe.saveValue()).getBoolean());
|
||||
this.serversFe.saveValue(context);
|
||||
BSystemPlatformService bSystemPlatformService = (BSystemPlatformService)BOrd.make((String)"service:platform:SystemPlatformService").get((BObject)bNtpPlatformService);
|
||||
if (bSystemPlatformService.getLocalDaemonAccess() != BDaemonAccessLevel.restricted) {
|
||||
bNtpPlatformService.savePlatformServiceProperties();
|
||||
if (bl && 4 == BDialog.confirm((BWidget)this, (String)this.getLexicon().getText("NtpPlatformService.rebootRequired.dlgTitle"), (Object)this.getLexicon().getText("NtpPlatformService.rebootRequired.dlgMessage"), (int)12)) {
|
||||
bSystemPlatformService.reboot();
|
||||
}
|
||||
}
|
||||
return bNtpPlatformService;
|
||||
}
|
||||
|
||||
protected void doValidate(BNtpPlatformService bNtpPlatformService, Context context) throws Exception {
|
||||
this.serversFe.doValidate(context);
|
||||
}
|
||||
|
||||
protected void doSetReadonly(boolean bl) {
|
||||
this.enabledFe.setReadonly(bl);
|
||||
this.serversFe.setReadonly(bl);
|
||||
this.serversFe.setEnabled(!bl);
|
||||
}
|
||||
|
||||
public void doOnEnabledChanged(Context context) throws Exception {
|
||||
}
|
||||
|
||||
static /* synthetic */ Class class$(String string) {
|
||||
try {
|
||||
return Class.forName(string);
|
||||
}
|
||||
catch (ClassNotFoundException classNotFoundException) {
|
||||
throw new NoClassDefFoundError(classNotFoundException.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,156 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* com.tridium.workbench.fieldeditors.BBooleanFE
|
||||
* javax.baja.naming.BOrd
|
||||
* javax.baja.sys.BBoolean
|
||||
* javax.baja.sys.BComponent
|
||||
* javax.baja.sys.BInteger
|
||||
* javax.baja.sys.BObject
|
||||
* javax.baja.sys.BasicContext
|
||||
* javax.baja.sys.Context
|
||||
* javax.baja.sys.Slot
|
||||
* javax.baja.sys.Sys
|
||||
* javax.baja.sys.Type
|
||||
* javax.baja.ui.BWidget
|
||||
* javax.baja.util.LexiconText
|
||||
* javax.baja.workbench.fieldeditor.BWbFieldEditor
|
||||
*/
|
||||
package com.tridium.platform.ui.ntp;
|
||||
|
||||
import com.tridium.platform.BSystemPlatformService;
|
||||
import com.tridium.platform.daemon.BDaemonAccessLevel;
|
||||
import com.tridium.platform.linux.BNtpPlatformServiceLinux;
|
||||
import com.tridium.platform.ui.ntp.BNtpPlatformServiceEditor;
|
||||
import com.tridium.platform.ui.util.LabelUtil;
|
||||
import com.tridium.workbench.fieldeditors.BBooleanFE;
|
||||
import javax.baja.naming.BOrd;
|
||||
import javax.baja.sys.BBoolean;
|
||||
import javax.baja.sys.BComponent;
|
||||
import javax.baja.sys.BInteger;
|
||||
import javax.baja.sys.BObject;
|
||||
import javax.baja.sys.BasicContext;
|
||||
import javax.baja.sys.Context;
|
||||
import javax.baja.sys.Slot;
|
||||
import javax.baja.sys.Sys;
|
||||
import javax.baja.sys.Type;
|
||||
import javax.baja.ui.BWidget;
|
||||
import javax.baja.util.LexiconText;
|
||||
import javax.baja.workbench.fieldeditor.BWbFieldEditor;
|
||||
|
||||
public class BNtpPlatformServiceEditorLinux
|
||||
extends BNtpPlatformServiceEditor {
|
||||
public static final Type TYPE = Sys.loadType((Class)(class$com$tridium$platform$ui$ntp$BNtpPlatformServiceEditorLinux == null ? (class$com$tridium$platform$ui$ntp$BNtpPlatformServiceEditorLinux = BNtpPlatformServiceEditorLinux.class$("com.tridium.platform.ui.ntp.BNtpPlatformServiceEditorLinux")) : class$com$tridium$platform$ui$ntp$BNtpPlatformServiceEditorLinux));
|
||||
protected BBooleanFE statsFe;
|
||||
protected BBooleanFE ntpFe;
|
||||
protected BBooleanFE localBackupFe;
|
||||
protected BBooleanFE monitorFe;
|
||||
protected BBooleanFE authFe;
|
||||
protected BWbFieldEditor revokeIntervalFe;
|
||||
protected BWbFieldEditor autokeyRegenIntervalFe;
|
||||
static /* synthetic */ Class class$com$tridium$platform$ui$ntp$BNtpPlatformServiceEditorLinux;
|
||||
|
||||
public Type getType() {
|
||||
return TYPE;
|
||||
}
|
||||
|
||||
public BNtpPlatformServiceEditorLinux() {
|
||||
this.autoRegisterForComponentEvents = false;
|
||||
this.ntpFe = new BBooleanFE();
|
||||
LabelUtil.addLabelWidgetPair(this.ledgerPane, LexiconText.make((Type)TYPE, (String)"NtpPlatformServicePosix.ntp.label"), (BWidget)this.ntpFe);
|
||||
this.linkTo(null, (BComponent)this.ntpFe, (Slot)BBooleanFE.pluginModified, (Slot)setModified);
|
||||
this.localBackupFe = new BBooleanFE();
|
||||
LabelUtil.addLabelWidgetPair(this.ledgerPane, LexiconText.make((Type)TYPE, (String)"NtpPlatformServicePosix.localBackup.label"), (BWidget)this.localBackupFe);
|
||||
this.linkTo(null, (BComponent)this.localBackupFe, (Slot)BBooleanFE.pluginModified, (Slot)setModified);
|
||||
this.statsFe = new BBooleanFE();
|
||||
LabelUtil.addLabelWidgetPair(this.ledgerPane, LexiconText.make((Type)TYPE, (String)"NtpPlatformServicePosix.stats.label"), (BWidget)this.statsFe);
|
||||
this.linkTo(null, (BComponent)this.statsFe, (Slot)BBooleanFE.pluginModified, (Slot)setModified);
|
||||
this.authFe = new BBooleanFE();
|
||||
LabelUtil.addLabelWidgetPair(this.ledgerPane, LexiconText.make((Type)TYPE, (String)"NtpPlatformServicePosix.auth.label"), (BWidget)this.authFe);
|
||||
this.linkTo(null, (BComponent)this.authFe, (Slot)BBooleanFE.pluginModified, (Slot)setModified);
|
||||
this.autokeyRegenIntervalFe = BWbFieldEditor.makeFor((BObject)BInteger.DEFAULT, (Context)BNtpPlatformServiceLinux.autokey.getFacets());
|
||||
LabelUtil.addLabelWidgetPair(this.ledgerPane, LexiconText.make((Type)TYPE, (String)"NtpPlatformServicePosix.autoKeyRegen.label"), (BWidget)this.autokeyRegenIntervalFe);
|
||||
this.linkTo(null, (BComponent)this.autokeyRegenIntervalFe, (Slot)BWbFieldEditor.pluginModified, (Slot)setModified);
|
||||
this.revokeIntervalFe = BWbFieldEditor.makeFor((BObject)BInteger.DEFAULT, (Context)BNtpPlatformServiceLinux.revoke.getFacets());
|
||||
LabelUtil.addLabelWidgetPair(this.ledgerPane, LexiconText.make((Type)TYPE, (String)"NtpPlatformServicePosix.autoKeyRevoke.label"), (BWidget)this.revokeIntervalFe);
|
||||
this.linkTo(null, (BComponent)this.revokeIntervalFe, (Slot)BWbFieldEditor.pluginModified, (Slot)setModified);
|
||||
this.monitorFe = new BBooleanFE();
|
||||
LabelUtil.addLabelWidgetPair(this.ledgerPane, LexiconText.make((Type)TYPE, (String)"NtpPlatformServicePosix.monitor.label"), (BWidget)this.monitorFe);
|
||||
this.linkTo(null, (BComponent)this.monitorFe, (Slot)BBooleanFE.pluginModified, (Slot)setModified);
|
||||
}
|
||||
|
||||
protected void doLoadValue(BObject bObject, Context context) throws Exception {
|
||||
Context context2 = context == null ? new BasicContext() : context;
|
||||
BNtpPlatformServiceLinux bNtpPlatformServiceLinux = (BNtpPlatformServiceLinux)bObject;
|
||||
bNtpPlatformServiceLinux.lease(Integer.MAX_VALUE);
|
||||
bNtpPlatformServiceLinux.poll();
|
||||
super.doLoadValue(bObject, context2);
|
||||
BasicContext basicContext = new BasicContext(context2, BNtpPlatformServiceLinux.ntp.getFacets());
|
||||
this.ntpFe.loadValue((BObject)BBoolean.make((boolean)bNtpPlatformServiceLinux.getNtp()), (Context)basicContext);
|
||||
basicContext = new BasicContext(context2, BNtpPlatformServiceLinux.localBackup.getFacets());
|
||||
this.localBackupFe.loadValue((BObject)BBoolean.make((boolean)bNtpPlatformServiceLinux.getLocalBackup()), (Context)basicContext);
|
||||
basicContext = new BasicContext(context2, BNtpPlatformServiceLinux.statistics.getFacets());
|
||||
this.statsFe.loadValue((BObject)BBoolean.make((boolean)bNtpPlatformServiceLinux.getStatistics()), (Context)basicContext);
|
||||
basicContext = new BasicContext(context2, BNtpPlatformServiceLinux.authentication.getFacets());
|
||||
this.authFe.loadValue((BObject)BBoolean.make((boolean)bNtpPlatformServiceLinux.getAuthentication()), (Context)basicContext);
|
||||
basicContext = new BasicContext(context2, BNtpPlatformServiceLinux.autokey.getFacets());
|
||||
this.autokeyRegenIntervalFe.loadValue((BObject)BInteger.make((int)bNtpPlatformServiceLinux.getAutokey()), (Context)basicContext);
|
||||
basicContext = new BasicContext(context2, BNtpPlatformServiceLinux.revoke.getFacets());
|
||||
this.revokeIntervalFe.loadValue((BObject)BInteger.make((int)bNtpPlatformServiceLinux.getRevoke()), (Context)basicContext);
|
||||
basicContext = new BasicContext(context2, BNtpPlatformServiceLinux.monitor.getFacets());
|
||||
this.monitorFe.loadValue((BObject)BBoolean.make((boolean)bNtpPlatformServiceLinux.getMonitor()), (Context)basicContext);
|
||||
BSystemPlatformService bSystemPlatformService = (BSystemPlatformService)BOrd.make((String)"service:platform:SystemPlatformService").get((BObject)bNtpPlatformServiceLinux);
|
||||
bSystemPlatformService.poll();
|
||||
this.setReadonly(bSystemPlatformService.getLocalDaemonAccess() == BDaemonAccessLevel.restricted);
|
||||
}
|
||||
|
||||
protected BObject doSaveValue(BObject bObject, Context context) throws Exception {
|
||||
BNtpPlatformServiceLinux bNtpPlatformServiceLinux = (BNtpPlatformServiceLinux)bObject;
|
||||
this.doValidate(bNtpPlatformServiceLinux, context);
|
||||
bNtpPlatformServiceLinux.setNtp(((BBoolean)this.ntpFe.saveValue()).getBoolean());
|
||||
bNtpPlatformServiceLinux.setLocalBackup(((BBoolean)this.localBackupFe.saveValue()).getBoolean());
|
||||
bNtpPlatformServiceLinux.setStatistics(((BBoolean)this.statsFe.saveValue()).getBoolean());
|
||||
bNtpPlatformServiceLinux.setAutokey(((BInteger)this.autokeyRegenIntervalFe.saveValue()).getInt());
|
||||
bNtpPlatformServiceLinux.setRevoke(((BInteger)this.revokeIntervalFe.saveValue()).getInt());
|
||||
bNtpPlatformServiceLinux.setAuthentication(((BBoolean)this.authFe.saveValue()).getBoolean());
|
||||
bNtpPlatformServiceLinux.setMonitor(((BBoolean)this.monitorFe.saveValue()).getBoolean());
|
||||
return super.doSaveValue(bObject, context);
|
||||
}
|
||||
|
||||
protected void doSetReadonly(boolean bl) {
|
||||
super.doSetReadonly(bl);
|
||||
this.ntpFe.setReadonly(bl);
|
||||
this.localBackupFe.setReadonly(bl);
|
||||
this.statsFe.setReadonly(bl);
|
||||
this.autokeyRegenIntervalFe.setReadonly(bl);
|
||||
this.revokeIntervalFe.setReadonly(bl);
|
||||
this.authFe.setReadonly(bl);
|
||||
this.monitorFe.setReadonly(bl);
|
||||
}
|
||||
|
||||
public BNtpPlatformServiceLinux service() {
|
||||
return (BNtpPlatformServiceLinux)this.getCurrentValue();
|
||||
}
|
||||
|
||||
public void doOnEnabledChanged(Context context) throws Exception {
|
||||
boolean bl = ((BBoolean)this.enabledFe.saveValue()).getBoolean();
|
||||
this.ntpFe.setEnabled(bl);
|
||||
this.statsFe.setEnabled(bl);
|
||||
this.autokeyRegenIntervalFe.setEnabled(bl);
|
||||
this.revokeIntervalFe.setEnabled(bl);
|
||||
this.authFe.setEnabled(bl);
|
||||
this.monitorFe.setEnabled(bl);
|
||||
this.serversFe.setEnabled(bl);
|
||||
}
|
||||
|
||||
static /* synthetic */ Class class$(String string) {
|
||||
try {
|
||||
return Class.forName(string);
|
||||
}
|
||||
catch (ClassNotFoundException classNotFoundException) {
|
||||
throw new NoClassDefFoundError(classNotFoundException.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,116 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* com.tridium.workbench.fieldeditors.BBooleanFE
|
||||
* javax.baja.naming.BOrd
|
||||
* javax.baja.sys.BBoolean
|
||||
* javax.baja.sys.BComponent
|
||||
* javax.baja.sys.BObject
|
||||
* javax.baja.sys.BasicContext
|
||||
* javax.baja.sys.Context
|
||||
* javax.baja.sys.Slot
|
||||
* javax.baja.sys.Sys
|
||||
* javax.baja.sys.Type
|
||||
* javax.baja.ui.BWidget
|
||||
* javax.baja.util.LexiconText
|
||||
*/
|
||||
package com.tridium.platform.ui.ntp;
|
||||
|
||||
import com.tridium.platform.BSystemPlatformService;
|
||||
import com.tridium.platform.daemon.BDaemonAccessLevel;
|
||||
import com.tridium.platform.npsdk.BNtpPlatformServiceNpsdk;
|
||||
import com.tridium.platform.ui.ntp.BNtpPlatformServiceEditor;
|
||||
import com.tridium.platform.ui.util.LabelUtil;
|
||||
import com.tridium.workbench.fieldeditors.BBooleanFE;
|
||||
import javax.baja.naming.BOrd;
|
||||
import javax.baja.sys.BBoolean;
|
||||
import javax.baja.sys.BComponent;
|
||||
import javax.baja.sys.BObject;
|
||||
import javax.baja.sys.BasicContext;
|
||||
import javax.baja.sys.Context;
|
||||
import javax.baja.sys.Slot;
|
||||
import javax.baja.sys.Sys;
|
||||
import javax.baja.sys.Type;
|
||||
import javax.baja.ui.BWidget;
|
||||
import javax.baja.util.LexiconText;
|
||||
|
||||
public class BNtpPlatformServiceEditorNpsdk
|
||||
extends BNtpPlatformServiceEditor {
|
||||
public static final Type TYPE = Sys.loadType((Class)(class$com$tridium$platform$ui$ntp$BNtpPlatformServiceEditorNpsdk == null ? (class$com$tridium$platform$ui$ntp$BNtpPlatformServiceEditorNpsdk = BNtpPlatformServiceEditorNpsdk.class$("com.tridium.platform.ui.ntp.BNtpPlatformServiceEditorNpsdk")) : class$com$tridium$platform$ui$ntp$BNtpPlatformServiceEditorNpsdk));
|
||||
protected BBooleanFE statsFe;
|
||||
protected BBooleanFE ntpFe;
|
||||
protected BBooleanFE localBackupFe;
|
||||
static /* synthetic */ Class class$com$tridium$platform$ui$ntp$BNtpPlatformServiceEditorNpsdk;
|
||||
|
||||
public Type getType() {
|
||||
return TYPE;
|
||||
}
|
||||
|
||||
public BNtpPlatformServiceEditorNpsdk() {
|
||||
this.autoRegisterForComponentEvents = false;
|
||||
this.ntpFe = new BBooleanFE();
|
||||
LabelUtil.addLabelWidgetPair(this.ledgerPane, LexiconText.make((Type)TYPE, (String)"NtpPlatformServicePosix.ntp.label"), (BWidget)this.ntpFe);
|
||||
this.linkTo(null, (BComponent)this.ntpFe, (Slot)BBooleanFE.pluginModified, (Slot)setModified);
|
||||
this.localBackupFe = new BBooleanFE();
|
||||
LabelUtil.addLabelWidgetPair(this.ledgerPane, LexiconText.make((Type)TYPE, (String)"NtpPlatformServicePosix.localBackup.label"), (BWidget)this.localBackupFe);
|
||||
this.linkTo(null, (BComponent)this.localBackupFe, (Slot)BBooleanFE.pluginModified, (Slot)setModified);
|
||||
this.statsFe = new BBooleanFE();
|
||||
LabelUtil.addLabelWidgetPair(this.ledgerPane, LexiconText.make((Type)TYPE, (String)"NtpPlatformServicePosix.stats.label"), (BWidget)this.statsFe);
|
||||
this.linkTo(null, (BComponent)this.statsFe, (Slot)BBooleanFE.pluginModified, (Slot)setModified);
|
||||
}
|
||||
|
||||
protected void doLoadValue(BObject bObject, Context context) throws Exception {
|
||||
Context context2 = context == null ? new BasicContext() : context;
|
||||
BNtpPlatformServiceNpsdk bNtpPlatformServiceNpsdk = (BNtpPlatformServiceNpsdk)bObject;
|
||||
bNtpPlatformServiceNpsdk.lease(Integer.MAX_VALUE);
|
||||
bNtpPlatformServiceNpsdk.poll();
|
||||
super.doLoadValue(bObject, context2);
|
||||
BasicContext basicContext = new BasicContext(context2, BNtpPlatformServiceNpsdk.ntp.getFacets());
|
||||
this.ntpFe.loadValue((BObject)BBoolean.make((boolean)bNtpPlatformServiceNpsdk.getNtp()), (Context)basicContext);
|
||||
basicContext = new BasicContext(context2, BNtpPlatformServiceNpsdk.localBackup.getFacets());
|
||||
this.localBackupFe.loadValue((BObject)BBoolean.make((boolean)bNtpPlatformServiceNpsdk.getLocalBackup()), (Context)basicContext);
|
||||
basicContext = new BasicContext(context2, BNtpPlatformServiceNpsdk.statistics.getFacets());
|
||||
this.statsFe.loadValue((BObject)BBoolean.make((boolean)bNtpPlatformServiceNpsdk.getStatistics()), (Context)basicContext);
|
||||
BSystemPlatformService bSystemPlatformService = (BSystemPlatformService)BOrd.make((String)"service:platform:SystemPlatformService").get((BObject)bNtpPlatformServiceNpsdk);
|
||||
bSystemPlatformService.poll();
|
||||
this.setReadonly(bSystemPlatformService.getLocalDaemonAccess() == BDaemonAccessLevel.restricted);
|
||||
}
|
||||
|
||||
protected BObject doSaveValue(BObject bObject, Context context) throws Exception {
|
||||
BNtpPlatformServiceNpsdk bNtpPlatformServiceNpsdk = (BNtpPlatformServiceNpsdk)bObject;
|
||||
this.doValidate(bNtpPlatformServiceNpsdk, context);
|
||||
bNtpPlatformServiceNpsdk.setNtp(((BBoolean)this.ntpFe.saveValue()).getBoolean());
|
||||
bNtpPlatformServiceNpsdk.setLocalBackup(((BBoolean)this.localBackupFe.saveValue()).getBoolean());
|
||||
bNtpPlatformServiceNpsdk.setStatistics(((BBoolean)this.statsFe.saveValue()).getBoolean());
|
||||
return super.doSaveValue(bObject, context);
|
||||
}
|
||||
|
||||
protected void doSetReadonly(boolean bl) {
|
||||
super.doSetReadonly(bl);
|
||||
this.ntpFe.setReadonly(bl);
|
||||
this.localBackupFe.setReadonly(bl);
|
||||
this.statsFe.setReadonly(bl);
|
||||
}
|
||||
|
||||
public BNtpPlatformServiceNpsdk service() {
|
||||
return (BNtpPlatformServiceNpsdk)this.getCurrentValue();
|
||||
}
|
||||
|
||||
public void doOnEnabledChanged(Context context) throws Exception {
|
||||
boolean bl = ((BBoolean)this.enabledFe.saveValue()).getBoolean();
|
||||
this.ntpFe.setEnabled(bl);
|
||||
this.statsFe.setEnabled(bl);
|
||||
this.serversFe.setEnabled(bl);
|
||||
}
|
||||
|
||||
static /* synthetic */ Class class$(String string) {
|
||||
try {
|
||||
return Class.forName(string);
|
||||
}
|
||||
catch (ClassNotFoundException classNotFoundException) {
|
||||
throw new NoClassDefFoundError(classNotFoundException.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,126 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* com.tridium.workbench.fieldeditors.BBooleanFE
|
||||
* javax.baja.naming.BOrd
|
||||
* javax.baja.sys.BBoolean
|
||||
* javax.baja.sys.BComponent
|
||||
* javax.baja.sys.BObject
|
||||
* javax.baja.sys.BasicContext
|
||||
* javax.baja.sys.Context
|
||||
* javax.baja.sys.Slot
|
||||
* javax.baja.sys.Sys
|
||||
* javax.baja.sys.Type
|
||||
* javax.baja.ui.BWidget
|
||||
* javax.baja.util.LexiconText
|
||||
*/
|
||||
package com.tridium.platform.ui.ntp;
|
||||
|
||||
import com.tridium.platform.BSystemPlatformService;
|
||||
import com.tridium.platform.daemon.BDaemonAccessLevel;
|
||||
import com.tridium.platform.qnx.BNtpPlatformServiceQnx;
|
||||
import com.tridium.platform.ui.ntp.BNtpPlatformServiceEditor;
|
||||
import com.tridium.platform.ui.util.LabelUtil;
|
||||
import com.tridium.workbench.fieldeditors.BBooleanFE;
|
||||
import javax.baja.naming.BOrd;
|
||||
import javax.baja.sys.BBoolean;
|
||||
import javax.baja.sys.BComponent;
|
||||
import javax.baja.sys.BObject;
|
||||
import javax.baja.sys.BasicContext;
|
||||
import javax.baja.sys.Context;
|
||||
import javax.baja.sys.Slot;
|
||||
import javax.baja.sys.Sys;
|
||||
import javax.baja.sys.Type;
|
||||
import javax.baja.ui.BWidget;
|
||||
import javax.baja.util.LexiconText;
|
||||
|
||||
public class BNtpPlatformServiceEditorQnx
|
||||
extends BNtpPlatformServiceEditor {
|
||||
public static final Type TYPE = Sys.loadType((Class)(class$com$tridium$platform$ui$ntp$BNtpPlatformServiceEditorQnx == null ? (class$com$tridium$platform$ui$ntp$BNtpPlatformServiceEditorQnx = BNtpPlatformServiceEditorQnx.class$("com.tridium.platform.ui.ntp.BNtpPlatformServiceEditorQnx")) : class$com$tridium$platform$ui$ntp$BNtpPlatformServiceEditorQnx));
|
||||
protected BBooleanFE statsFe;
|
||||
protected BBooleanFE ntpFe;
|
||||
protected BBooleanFE localBackupFe;
|
||||
protected BBooleanFE syncAtBootFe;
|
||||
static /* synthetic */ Class class$com$tridium$platform$ui$ntp$BNtpPlatformServiceEditorQnx;
|
||||
|
||||
public Type getType() {
|
||||
return TYPE;
|
||||
}
|
||||
|
||||
public BNtpPlatformServiceEditorQnx() {
|
||||
this.autoRegisterForComponentEvents = false;
|
||||
this.ntpFe = new BBooleanFE();
|
||||
LabelUtil.addLabelWidgetPair(this.ledgerPane, LexiconText.make((Type)TYPE, (String)"NtpPlatformServicePosix.ntp.label"), (BWidget)this.ntpFe);
|
||||
this.linkTo(null, (BComponent)this.ntpFe, (Slot)BBooleanFE.pluginModified, (Slot)setModified);
|
||||
this.syncAtBootFe = new BBooleanFE();
|
||||
LabelUtil.addLabelWidgetPair(this.ledgerPane, LexiconText.make((Type)TYPE, (String)"NtpPlatformService.syncAtBoot.label"), (BWidget)this.syncAtBootFe);
|
||||
this.linkTo(null, (BComponent)this.syncAtBootFe, (Slot)BBooleanFE.pluginModified, (Slot)setModified);
|
||||
this.localBackupFe = new BBooleanFE();
|
||||
LabelUtil.addLabelWidgetPair(this.ledgerPane, LexiconText.make((Type)TYPE, (String)"NtpPlatformServicePosix.localBackup.label"), (BWidget)this.localBackupFe);
|
||||
this.linkTo(null, (BComponent)this.localBackupFe, (Slot)BBooleanFE.pluginModified, (Slot)setModified);
|
||||
this.statsFe = new BBooleanFE();
|
||||
LabelUtil.addLabelWidgetPair(this.ledgerPane, LexiconText.make((Type)TYPE, (String)"NtpPlatformServicePosix.stats.label"), (BWidget)this.statsFe);
|
||||
this.linkTo(null, (BComponent)this.statsFe, (Slot)BBooleanFE.pluginModified, (Slot)setModified);
|
||||
}
|
||||
|
||||
protected void doLoadValue(BObject bObject, Context context) throws Exception {
|
||||
Context context2 = context == null ? new BasicContext() : context;
|
||||
BNtpPlatformServiceQnx bNtpPlatformServiceQnx = (BNtpPlatformServiceQnx)bObject;
|
||||
bNtpPlatformServiceQnx.lease(Integer.MAX_VALUE);
|
||||
bNtpPlatformServiceQnx.poll();
|
||||
super.doLoadValue(bObject, context2);
|
||||
BasicContext basicContext = new BasicContext(context2, BNtpPlatformServiceQnx.ntp.getFacets());
|
||||
this.ntpFe.loadValue((BObject)BBoolean.make((boolean)bNtpPlatformServiceQnx.getNtp()), (Context)basicContext);
|
||||
basicContext = new BasicContext(context2, BNtpPlatformServiceQnx.syncAtBoot.getFacets());
|
||||
this.syncAtBootFe.loadValue((BObject)BBoolean.make((boolean)bNtpPlatformServiceQnx.getSyncAtBoot()), (Context)basicContext);
|
||||
basicContext = new BasicContext(context2, BNtpPlatformServiceQnx.localBackup.getFacets());
|
||||
this.localBackupFe.loadValue((BObject)BBoolean.make((boolean)bNtpPlatformServiceQnx.getLocalBackup()), (Context)basicContext);
|
||||
basicContext = new BasicContext(context2, BNtpPlatformServiceQnx.statistics.getFacets());
|
||||
this.statsFe.loadValue((BObject)BBoolean.make((boolean)bNtpPlatformServiceQnx.getStatistics()), (Context)basicContext);
|
||||
BSystemPlatformService bSystemPlatformService = (BSystemPlatformService)BOrd.make((String)"service:platform:SystemPlatformService").get((BObject)bNtpPlatformServiceQnx);
|
||||
bSystemPlatformService.poll();
|
||||
this.setReadonly(bSystemPlatformService.getLocalDaemonAccess() == BDaemonAccessLevel.restricted);
|
||||
}
|
||||
|
||||
protected BObject doSaveValue(BObject bObject, Context context) throws Exception {
|
||||
BNtpPlatformServiceQnx bNtpPlatformServiceQnx = (BNtpPlatformServiceQnx)bObject;
|
||||
this.doValidate(bNtpPlatformServiceQnx, context);
|
||||
bNtpPlatformServiceQnx.setNtp(((BBoolean)this.ntpFe.saveValue()).getBoolean());
|
||||
bNtpPlatformServiceQnx.setSyncAtBoot(((BBoolean)this.syncAtBootFe.saveValue()).getBoolean());
|
||||
bNtpPlatformServiceQnx.setLocalBackup(((BBoolean)this.localBackupFe.saveValue()).getBoolean());
|
||||
bNtpPlatformServiceQnx.setStatistics(((BBoolean)this.statsFe.saveValue()).getBoolean());
|
||||
return super.doSaveValue(bObject, context);
|
||||
}
|
||||
|
||||
protected void doSetReadonly(boolean bl) {
|
||||
super.doSetReadonly(bl);
|
||||
this.ntpFe.setReadonly(bl);
|
||||
this.localBackupFe.setReadonly(bl);
|
||||
this.statsFe.setReadonly(bl);
|
||||
this.syncAtBootFe.setReadonly(bl);
|
||||
}
|
||||
|
||||
public BNtpPlatformServiceQnx service() {
|
||||
return (BNtpPlatformServiceQnx)this.getCurrentValue();
|
||||
}
|
||||
|
||||
public void doOnEnabledChanged(Context context) throws Exception {
|
||||
boolean bl = ((BBoolean)this.enabledFe.saveValue()).getBoolean();
|
||||
this.ntpFe.setReadonly(!bl);
|
||||
this.statsFe.setReadonly(!bl);
|
||||
this.localBackupFe.setReadonly(!bl);
|
||||
this.serversFe.setReadonly(!bl);
|
||||
this.syncAtBootFe.setReadonly(!bl);
|
||||
}
|
||||
|
||||
static /* synthetic */ Class class$(String string) {
|
||||
try {
|
||||
return Class.forName(string);
|
||||
}
|
||||
catch (ClassNotFoundException classNotFoundException) {
|
||||
throw new NoClassDefFoundError(classNotFoundException.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,169 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* javax.baja.data.BIDataValue
|
||||
* javax.baja.naming.BOrd
|
||||
* javax.baja.sys.BBoolean
|
||||
* javax.baja.sys.BComponent
|
||||
* javax.baja.sys.BEnumRange
|
||||
* javax.baja.sys.BFacets
|
||||
* javax.baja.sys.BInteger
|
||||
* javax.baja.sys.BObject
|
||||
* javax.baja.sys.BasicContext
|
||||
* javax.baja.sys.Context
|
||||
* javax.baja.sys.Slot
|
||||
* javax.baja.sys.Sys
|
||||
* javax.baja.sys.Type
|
||||
* javax.baja.ui.BWidget
|
||||
* javax.baja.util.LexiconText
|
||||
* javax.baja.workbench.fieldeditor.BWbFieldEditor
|
||||
*/
|
||||
package com.tridium.platform.ui.ntp;
|
||||
|
||||
import com.tridium.platform.BSystemPlatformService;
|
||||
import com.tridium.platform.daemon.BDaemonAccessLevel;
|
||||
import com.tridium.platform.ui.ntp.BNtpPlatformServiceEditor;
|
||||
import com.tridium.platform.ui.util.BLimitedFrozenEnumFE;
|
||||
import com.tridium.platform.ui.util.LabelUtil;
|
||||
import com.tridium.platform.win32.BNtpPlatformServiceWin32;
|
||||
import com.tridium.platform.win32.BNtpSyncPolicyWin32;
|
||||
import javax.baja.data.BIDataValue;
|
||||
import javax.baja.naming.BOrd;
|
||||
import javax.baja.sys.BBoolean;
|
||||
import javax.baja.sys.BComponent;
|
||||
import javax.baja.sys.BEnumRange;
|
||||
import javax.baja.sys.BFacets;
|
||||
import javax.baja.sys.BInteger;
|
||||
import javax.baja.sys.BObject;
|
||||
import javax.baja.sys.BasicContext;
|
||||
import javax.baja.sys.Context;
|
||||
import javax.baja.sys.Slot;
|
||||
import javax.baja.sys.Sys;
|
||||
import javax.baja.sys.Type;
|
||||
import javax.baja.ui.BWidget;
|
||||
import javax.baja.util.LexiconText;
|
||||
import javax.baja.workbench.fieldeditor.BWbFieldEditor;
|
||||
|
||||
public class BNtpPlatformServiceEditorWin32
|
||||
extends BNtpPlatformServiceEditor {
|
||||
public static final Type TYPE = Sys.loadType((Class)(class$com$tridium$platform$ui$ntp$BNtpPlatformServiceEditorWin32 == null ? (class$com$tridium$platform$ui$ntp$BNtpPlatformServiceEditorWin32 = BNtpPlatformServiceEditorWin32.class$("com.tridium.platform.ui.ntp.BNtpPlatformServiceEditorWin32")) : class$com$tridium$platform$ui$ntp$BNtpPlatformServiceEditorWin32));
|
||||
protected BLimitedFrozenEnumFE syncPolicyFe;
|
||||
protected BWbFieldEditor maxPosPhaseFe;
|
||||
protected BWbFieldEditor maxNegPhaseFe;
|
||||
protected BWbFieldEditor minPollFe;
|
||||
protected BWbFieldEditor maxPollFe;
|
||||
protected BWbFieldEditor specialPollFe;
|
||||
protected boolean domainMember;
|
||||
static /* synthetic */ Class class$com$tridium$platform$ui$ntp$BNtpPlatformServiceEditorWin32;
|
||||
|
||||
public Type getType() {
|
||||
return TYPE;
|
||||
}
|
||||
|
||||
public BNtpPlatformServiceEditorWin32() {
|
||||
this.autoRegisterForComponentEvents = false;
|
||||
this.syncPolicyFe = new BLimitedFrozenEnumFE();
|
||||
LabelUtil.addLabelWidgetPair(this.ledgerPane, LexiconText.make((Type)TYPE, (String)"NtpPlatformServiceWin32.syncPolicy.label"), (BWidget)this.syncPolicyFe);
|
||||
this.linkTo(null, (BComponent)this.syncPolicyFe, (Slot)BWbFieldEditor.pluginModified, (Slot)setModified);
|
||||
this.maxPosPhaseFe = BWbFieldEditor.makeFor((BObject)BInteger.DEFAULT, (Context)BNtpPlatformServiceWin32.maxPosPhaseCorrection.getFacets());
|
||||
LabelUtil.addLabelWidgetPair(this.ledgerPane, LexiconText.make((Type)TYPE, (String)"NtpPlatformServiceWin32.maxPosPhaseCorrection.label"), (BWidget)this.maxPosPhaseFe);
|
||||
this.linkTo(null, (BComponent)this.maxPosPhaseFe, (Slot)BWbFieldEditor.pluginModified, (Slot)setModified);
|
||||
this.maxNegPhaseFe = BWbFieldEditor.makeFor((BObject)BInteger.DEFAULT, (Context)BNtpPlatformServiceWin32.maxNegPhaseCorrection.getFacets());
|
||||
LabelUtil.addLabelWidgetPair(this.ledgerPane, LexiconText.make((Type)TYPE, (String)"NtpPlatformServiceWin32.maxNegPhaseCorrection.label"), (BWidget)this.maxNegPhaseFe);
|
||||
this.linkTo(null, (BComponent)this.maxNegPhaseFe, (Slot)BWbFieldEditor.pluginModified, (Slot)setModified);
|
||||
this.minPollFe = BWbFieldEditor.makeFor((BObject)BInteger.DEFAULT, (Context)BNtpPlatformServiceWin32.minPollInterval.getFacets());
|
||||
LabelUtil.addLabelWidgetPair(this.ledgerPane, LexiconText.make((Type)TYPE, (String)"NtpPlatformServiceWin32.minPollInterval.label"), (BWidget)this.minPollFe);
|
||||
this.linkTo(null, (BComponent)this.minPollFe, (Slot)BWbFieldEditor.pluginModified, (Slot)setModified);
|
||||
this.maxPollFe = BWbFieldEditor.makeFor((BObject)BInteger.DEFAULT, (Context)BNtpPlatformServiceWin32.maxPollInterval.getFacets());
|
||||
LabelUtil.addLabelWidgetPair(this.ledgerPane, LexiconText.make((Type)TYPE, (String)"NtpPlatformServiceWin32.maxPollInterval.label"), (BWidget)this.maxPollFe);
|
||||
this.linkTo(null, (BComponent)this.maxPollFe, (Slot)BWbFieldEditor.pluginModified, (Slot)setModified);
|
||||
this.specialPollFe = BWbFieldEditor.makeFor((BObject)BInteger.DEFAULT, (Context)BNtpPlatformServiceWin32.specialPollInterval.getFacets());
|
||||
LabelUtil.addLabelWidgetPair(this.ledgerPane, LexiconText.make((Type)TYPE, (String)"NtpPlatformServiceWin32.specialPollInterval.label"), (BWidget)this.specialPollFe);
|
||||
this.linkTo(null, (BComponent)this.specialPollFe, (Slot)BWbFieldEditor.pluginModified, (Slot)setModified);
|
||||
}
|
||||
|
||||
protected void doLoadValue(BObject bObject, Context context) throws Exception {
|
||||
Context context2 = context == null ? new BasicContext() : context;
|
||||
super.doLoadValue(bObject, context2);
|
||||
BNtpPlatformServiceWin32 bNtpPlatformServiceWin32 = (BNtpPlatformServiceWin32)bObject;
|
||||
bNtpPlatformServiceWin32.lease(Integer.MAX_VALUE);
|
||||
bNtpPlatformServiceWin32.poll();
|
||||
this.domainMember = bNtpPlatformServiceWin32.getDomainMember();
|
||||
this.loadSyncPolicyFe(bNtpPlatformServiceWin32.getEnabled(), bNtpPlatformServiceWin32.getSyncPolicy(), context2);
|
||||
BasicContext basicContext = new BasicContext(context2, BNtpPlatformServiceWin32.maxPosPhaseCorrection.getFacets());
|
||||
this.maxPosPhaseFe.loadValue((BObject)BInteger.make((int)bNtpPlatformServiceWin32.getMaxPosPhaseCorrection()), (Context)basicContext);
|
||||
basicContext = new BasicContext(context2, BNtpPlatformServiceWin32.maxNegPhaseCorrection.getFacets());
|
||||
this.maxNegPhaseFe.loadValue((BObject)BInteger.make((int)bNtpPlatformServiceWin32.getMaxNegPhaseCorrection()), (Context)basicContext);
|
||||
basicContext = new BasicContext(context2, BNtpPlatformServiceWin32.minPollInterval.getFacets());
|
||||
this.minPollFe.loadValue((BObject)BInteger.make((int)bNtpPlatformServiceWin32.getMinPollInterval()), (Context)basicContext);
|
||||
basicContext = new BasicContext(context2, BNtpPlatformServiceWin32.maxPollInterval.getFacets());
|
||||
this.maxPollFe.loadValue((BObject)BInteger.make((int)bNtpPlatformServiceWin32.getMaxPollInterval()), (Context)basicContext);
|
||||
basicContext = new BasicContext(context2, BNtpPlatformServiceWin32.specialPollInterval.getFacets());
|
||||
this.specialPollFe.loadValue((BObject)BInteger.make((int)bNtpPlatformServiceWin32.getSpecialPollInterval()), (Context)basicContext);
|
||||
BSystemPlatformService bSystemPlatformService = (BSystemPlatformService)BOrd.make((String)"service:platform:SystemPlatformService").get((BObject)bNtpPlatformServiceWin32);
|
||||
bSystemPlatformService.poll();
|
||||
this.setReadonly(bSystemPlatformService.getLocalDaemonAccess() == BDaemonAccessLevel.restricted);
|
||||
}
|
||||
|
||||
protected BObject doSaveValue(BObject bObject, Context context) throws Exception {
|
||||
BNtpPlatformServiceWin32 bNtpPlatformServiceWin32 = (BNtpPlatformServiceWin32)bObject;
|
||||
this.doValidate(bNtpPlatformServiceWin32, context);
|
||||
bNtpPlatformServiceWin32.setSyncPolicy((BNtpSyncPolicyWin32)this.syncPolicyFe.saveValue());
|
||||
bNtpPlatformServiceWin32.setMaxPosPhaseCorrection(((BInteger)this.maxPosPhaseFe.saveValue()).getInt());
|
||||
bNtpPlatformServiceWin32.setMaxNegPhaseCorrection(((BInteger)this.maxNegPhaseFe.saveValue()).getInt());
|
||||
bNtpPlatformServiceWin32.setMinPollInterval(((BInteger)this.minPollFe.saveValue()).getInt());
|
||||
bNtpPlatformServiceWin32.setMaxPollInterval(((BInteger)this.maxPollFe.saveValue()).getInt());
|
||||
bNtpPlatformServiceWin32.setSpecialPollInterval(((BInteger)this.specialPollFe.saveValue()).getInt());
|
||||
return super.doSaveValue(bObject, context);
|
||||
}
|
||||
|
||||
protected void doSetReadonly(boolean bl) {
|
||||
super.doSetReadonly(bl);
|
||||
this.syncPolicyFe.setReadonly(bl);
|
||||
this.maxPosPhaseFe.setReadonly(bl);
|
||||
this.maxNegPhaseFe.setReadonly(bl);
|
||||
this.minPollFe.setReadonly(bl);
|
||||
this.maxPollFe.setReadonly(bl);
|
||||
this.specialPollFe.setReadonly(bl);
|
||||
}
|
||||
|
||||
public BNtpPlatformServiceWin32 service() {
|
||||
return (BNtpPlatformServiceWin32)this.getCurrentValue();
|
||||
}
|
||||
|
||||
protected void loadSyncPolicyFe(boolean bl, BNtpSyncPolicyWin32 bNtpSyncPolicyWin32, Context context) {
|
||||
BEnumRange bEnumRange;
|
||||
Context context2;
|
||||
Object object = context2 = context == null ? new BasicContext() : context;
|
||||
if (bl) {
|
||||
if (this.domainMember) {
|
||||
bEnumRange = BEnumRange.make(null, (int[])new int[]{2, 1, 3}, (String[])new String[]{BNtpSyncPolicyWin32.domain.getTag(), BNtpSyncPolicyWin32.ntp.getTag(), BNtpSyncPolicyWin32.both.getTag()});
|
||||
if (bNtpSyncPolicyWin32 == null || bNtpSyncPolicyWin32 == BNtpSyncPolicyWin32.none) {
|
||||
bNtpSyncPolicyWin32 = BNtpSyncPolicyWin32.domain;
|
||||
}
|
||||
} else {
|
||||
bEnumRange = BEnumRange.make(null, (int[])new int[]{1}, (String[])new String[]{BNtpSyncPolicyWin32.ntp.getTag()});
|
||||
bNtpSyncPolicyWin32 = BNtpSyncPolicyWin32.ntp;
|
||||
}
|
||||
} else {
|
||||
bEnumRange = BEnumRange.make(null, (int[])new int[]{0}, (String[])new String[]{BNtpSyncPolicyWin32.none.getTag()});
|
||||
bNtpSyncPolicyWin32 = BNtpSyncPolicyWin32.none;
|
||||
}
|
||||
this.syncPolicyFe.loadValue((BObject)bNtpSyncPolicyWin32, (Context)new BasicContext(context2, BFacets.make((String)"range", (BIDataValue)bEnumRange)));
|
||||
}
|
||||
|
||||
public void doOnEnabledChanged(Context context) throws Exception {
|
||||
this.loadSyncPolicyFe(((BBoolean)this.enabledFe.saveValue()).getBoolean(), null, context);
|
||||
}
|
||||
|
||||
static /* synthetic */ Class class$(String string) {
|
||||
try {
|
||||
return Class.forName(string);
|
||||
}
|
||||
catch (ClassNotFoundException classNotFoundException) {
|
||||
throw new NoClassDefFoundError(classNotFoundException.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,159 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* javax.baja.sys.Action
|
||||
* javax.baja.sys.BComplex
|
||||
* javax.baja.sys.BComponent
|
||||
* javax.baja.sys.BObject
|
||||
* javax.baja.sys.BValue
|
||||
* javax.baja.sys.Context
|
||||
* javax.baja.sys.LocalizableRuntimeException
|
||||
* javax.baja.sys.Slot
|
||||
* javax.baja.sys.Sys
|
||||
* javax.baja.sys.Type
|
||||
* javax.baja.ui.BTextField
|
||||
* javax.baja.ui.BWidget
|
||||
* javax.baja.ui.enums.BHalign
|
||||
* javax.baja.ui.event.BFocusEvent
|
||||
* javax.baja.ui.event.BKeyEvent
|
||||
* javax.baja.ui.event.BMouseEvent
|
||||
* javax.baja.ui.event.BMouseWheelEvent
|
||||
* javax.baja.util.LexiconText
|
||||
* javax.baja.workbench.fieldeditor.BWbFieldEditor
|
||||
*/
|
||||
package com.tridium.platform.ui.ntp;
|
||||
|
||||
import com.tridium.platform.ntp.BNtpServer;
|
||||
import com.tridium.platform.ui.util.BCoordinatedGridPane;
|
||||
import com.tridium.platform.ui.util.LabelUtil;
|
||||
import javax.baja.sys.Action;
|
||||
import javax.baja.sys.BComplex;
|
||||
import javax.baja.sys.BComponent;
|
||||
import javax.baja.sys.BObject;
|
||||
import javax.baja.sys.BValue;
|
||||
import javax.baja.sys.Context;
|
||||
import javax.baja.sys.LocalizableRuntimeException;
|
||||
import javax.baja.sys.Slot;
|
||||
import javax.baja.sys.Sys;
|
||||
import javax.baja.sys.Type;
|
||||
import javax.baja.ui.BTextField;
|
||||
import javax.baja.ui.BWidget;
|
||||
import javax.baja.ui.enums.BHalign;
|
||||
import javax.baja.ui.event.BFocusEvent;
|
||||
import javax.baja.ui.event.BKeyEvent;
|
||||
import javax.baja.ui.event.BMouseEvent;
|
||||
import javax.baja.ui.event.BMouseWheelEvent;
|
||||
import javax.baja.util.LexiconText;
|
||||
import javax.baja.workbench.fieldeditor.BWbFieldEditor;
|
||||
|
||||
public class BNtpServerFE
|
||||
extends BWbFieldEditor {
|
||||
public static final Action propagateFocusEvent = BNtpServerFE.newAction((int)4, (BValue)new BFocusEvent(), null);
|
||||
public static final Action propagateKeyEvent = BNtpServerFE.newAction((int)4, (BValue)new BKeyEvent(), null);
|
||||
public static final Action propagateMouseEvent = BNtpServerFE.newAction((int)4, (BValue)new BMouseEvent(), null);
|
||||
public static final Type TYPE = Sys.loadType((Class)(class$com$tridium$platform$ui$ntp$BNtpServerFE == null ? (class$com$tridium$platform$ui$ntp$BNtpServerFE = BNtpServerFE.class$("com.tridium.platform.ui.ntp.BNtpServerFE")) : class$com$tridium$platform$ui$ntp$BNtpServerFE));
|
||||
protected BCoordinatedGridPane grid = new BCoordinatedGridPane(1);
|
||||
protected BTextField addressFe;
|
||||
protected boolean readonlyInitialized = false;
|
||||
static /* synthetic */ Class class$com$tridium$platform$ui$ntp$BNtpServerFE;
|
||||
|
||||
public void propagateFocusEvent(BFocusEvent bFocusEvent) {
|
||||
this.invoke(propagateFocusEvent, (BValue)bFocusEvent, null);
|
||||
}
|
||||
|
||||
public void propagateKeyEvent(BKeyEvent bKeyEvent) {
|
||||
this.invoke(propagateKeyEvent, (BValue)bKeyEvent, null);
|
||||
}
|
||||
|
||||
public void propagateMouseEvent(BMouseEvent bMouseEvent) {
|
||||
this.invoke(propagateMouseEvent, (BValue)bMouseEvent, null);
|
||||
}
|
||||
|
||||
public Type getType() {
|
||||
return TYPE;
|
||||
}
|
||||
|
||||
public BNtpServerFE() {
|
||||
this.grid.setHalign(BHalign.left);
|
||||
this.grid.setColumnAlign(BHalign.center);
|
||||
this.addressFe = new BTextField("", 32);
|
||||
this.grid.add(null, (BValue)this.addressFe);
|
||||
this.linkTo((BComponent)this.addressFe, (Slot)BTextField.textModified, (Slot)setModified);
|
||||
this.linkTo((BComponent)this.addressFe, (Slot)BTextField.actionPerformed, (Slot)actionPerformed);
|
||||
this.linkTo((BComponent)this.addressFe, (Slot)BTextField.focusEvent, (Slot)propagateFocusEvent);
|
||||
this.linkTo((BComponent)this.addressFe, (Slot)BTextField.keyEvent, (Slot)propagateKeyEvent);
|
||||
this.linkTo((BComponent)this.addressFe, (Slot)BTextField.mouseEvent, (Slot)propagateMouseEvent);
|
||||
this.setContent((BWidget)this.grid);
|
||||
}
|
||||
|
||||
public void doValidate(Context context) throws Exception {
|
||||
if (this.addressFe.getText().trim().length() == 0) {
|
||||
throw new LocalizableRuntimeException("platform", "NtpServerFE.nullAddress");
|
||||
}
|
||||
}
|
||||
|
||||
public String getServerPropertyName(Context context) throws Exception {
|
||||
return ((BNtpServer)this.getCurrentValue()).getPropertyName(this.addressFe.getText());
|
||||
}
|
||||
|
||||
public BWidget makeHeader() {
|
||||
BCoordinatedGridPane bCoordinatedGridPane = new BCoordinatedGridPane(1);
|
||||
bCoordinatedGridPane.setHalign(BHalign.left);
|
||||
bCoordinatedGridPane.setColumnAlign(BHalign.center);
|
||||
bCoordinatedGridPane.add(null, (BValue)LabelUtil.makeLabel(LexiconText.make((String)"platform", (String)"NtpPlatformService.address.label"), true));
|
||||
return bCoordinatedGridPane;
|
||||
}
|
||||
|
||||
public void useHeader(BWidget bWidget) {
|
||||
if (bWidget != null) {
|
||||
this.grid.setMaster((BCoordinatedGridPane)bWidget);
|
||||
}
|
||||
}
|
||||
|
||||
public void doPropagateFocusEvent(BFocusEvent bFocusEvent) {
|
||||
this.fireFocusEvent(new BFocusEvent(bFocusEvent.getId(), (BWidget)this, bFocusEvent.isTemporary()));
|
||||
}
|
||||
|
||||
public void doPropagateKeyEvent(BKeyEvent bKeyEvent) {
|
||||
this.fireKeyEvent(new BKeyEvent(bKeyEvent.getId(), (BWidget)this, bKeyEvent.getModifiers(), bKeyEvent.getKeyCode(), bKeyEvent.getKeyChar()));
|
||||
}
|
||||
|
||||
public void doPropagateMouseEvent(BMouseEvent bMouseEvent) {
|
||||
if (bMouseEvent instanceof BMouseWheelEvent) {
|
||||
this.fireMouseEvent((BMouseEvent)new BMouseWheelEvent(bMouseEvent.getId(), (BWidget)this, bMouseEvent.getModifiers(), bMouseEvent.getX(), bMouseEvent.getY(), bMouseEvent.getClickCount(), bMouseEvent.isPopupTrigger(), ((BMouseWheelEvent)bMouseEvent).getWheelRotation()));
|
||||
} else {
|
||||
this.fireMouseEvent(new BMouseEvent(bMouseEvent.getId(), (BWidget)this, bMouseEvent.getModifiers(), bMouseEvent.getX(), bMouseEvent.getY(), bMouseEvent.getClickCount(), bMouseEvent.isPopupTrigger()));
|
||||
}
|
||||
}
|
||||
|
||||
protected void doLoadValue(BObject bObject, Context context) throws Exception {
|
||||
BComplex bComplex;
|
||||
BNtpServer bNtpServer = (BNtpServer)bObject;
|
||||
if (!this.readonlyInitialized && (bComplex = bNtpServer.getParent()) != null) {
|
||||
this.setReadonly((bComplex.loadSlots().getFlags((Slot)bNtpServer.getPropertyInParent()) & 1) > 0);
|
||||
}
|
||||
this.addressFe.setText(bNtpServer.getAddress());
|
||||
}
|
||||
|
||||
protected BObject doSaveValue(BObject bObject, Context context) throws Exception {
|
||||
BNtpServer bNtpServer = (BNtpServer)bObject;
|
||||
bNtpServer.setAddress(this.addressFe.getText());
|
||||
return bNtpServer;
|
||||
}
|
||||
|
||||
protected void doSetReadonly(boolean bl) {
|
||||
this.readonlyInitialized = true;
|
||||
this.addressFe.setEditable(!bl);
|
||||
}
|
||||
|
||||
static /* synthetic */ Class class$(String string) {
|
||||
try {
|
||||
return Class.forName(string);
|
||||
}
|
||||
catch (ClassNotFoundException classNotFoundException) {
|
||||
throw new NoClassDefFoundError(classNotFoundException.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,254 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* com.tridium.workbench.fieldeditors.BBooleanFE
|
||||
* com.tridium.workbench.fieldeditors.BIntegerFE
|
||||
* javax.baja.data.BIDataValue
|
||||
* javax.baja.sys.Action
|
||||
* javax.baja.sys.BBoolean
|
||||
* javax.baja.sys.BComplex
|
||||
* javax.baja.sys.BComponent
|
||||
* javax.baja.sys.BEnumRange
|
||||
* javax.baja.sys.BFacets
|
||||
* javax.baja.sys.BInteger
|
||||
* javax.baja.sys.BObject
|
||||
* javax.baja.sys.BValue
|
||||
* javax.baja.sys.BasicContext
|
||||
* javax.baja.sys.Context
|
||||
* javax.baja.sys.Slot
|
||||
* javax.baja.sys.Sys
|
||||
* javax.baja.sys.Type
|
||||
* javax.baja.ui.BTextField
|
||||
* javax.baja.ui.BWidget
|
||||
* javax.baja.ui.enums.BHalign
|
||||
* javax.baja.util.LexiconText
|
||||
*/
|
||||
package com.tridium.platform.ui.ntp;
|
||||
|
||||
import com.tridium.platform.linux.BNtpServerLinux;
|
||||
import com.tridium.platform.posix.BNtpModePosix;
|
||||
import com.tridium.platform.ui.ntp.BNtpServerFE;
|
||||
import com.tridium.platform.ui.util.BCoordinatedGridPane;
|
||||
import com.tridium.platform.ui.util.BLimitedFrozenEnumFE;
|
||||
import com.tridium.platform.ui.util.LabelUtil;
|
||||
import com.tridium.workbench.fieldeditors.BBooleanFE;
|
||||
import com.tridium.workbench.fieldeditors.BIntegerFE;
|
||||
import javax.baja.data.BIDataValue;
|
||||
import javax.baja.sys.Action;
|
||||
import javax.baja.sys.BBoolean;
|
||||
import javax.baja.sys.BComplex;
|
||||
import javax.baja.sys.BComponent;
|
||||
import javax.baja.sys.BEnumRange;
|
||||
import javax.baja.sys.BFacets;
|
||||
import javax.baja.sys.BInteger;
|
||||
import javax.baja.sys.BObject;
|
||||
import javax.baja.sys.BValue;
|
||||
import javax.baja.sys.BasicContext;
|
||||
import javax.baja.sys.Context;
|
||||
import javax.baja.sys.Slot;
|
||||
import javax.baja.sys.Sys;
|
||||
import javax.baja.sys.Type;
|
||||
import javax.baja.ui.BTextField;
|
||||
import javax.baja.ui.BWidget;
|
||||
import javax.baja.ui.enums.BHalign;
|
||||
import javax.baja.util.LexiconText;
|
||||
|
||||
public class BNtpServerLinuxFE
|
||||
extends BNtpServerFE {
|
||||
public static final Action setEnabledStates = BNtpServerLinuxFE.newAction((int)0, null);
|
||||
public static final Type TYPE = Sys.loadType((Class)(class$com$tridium$platform$ui$ntp$BNtpServerLinuxFE == null ? (class$com$tridium$platform$ui$ntp$BNtpServerLinuxFE = BNtpServerLinuxFE.class$("com.tridium.platform.ui.ntp.BNtpServerLinuxFE")) : class$com$tridium$platform$ui$ntp$BNtpServerLinuxFE));
|
||||
protected BBooleanFE autoKeyFe;
|
||||
protected BBooleanFE preferredFe;
|
||||
protected BBooleanFE burstFe;
|
||||
protected BLimitedFrozenEnumFE peerModeFe;
|
||||
protected BIntegerFE minPollIntervalFe;
|
||||
protected BIntegerFE maxPollIntervalFe;
|
||||
protected BTextField keyFe;
|
||||
protected String additionalArgs;
|
||||
protected final BFacets PEER_MODE_FACETS = BFacets.make((String)"range", (BIDataValue)BEnumRange.make(null, (int[])new int[]{2, 1, 3, 4}, (String[])new String[]{BNtpModePosix.server.getTag(), BNtpModePosix.peer.getTag(), BNtpModePosix.broadcast.getTag(), BNtpModePosix.manycastclient.getTag()}));
|
||||
static /* synthetic */ Class class$com$tridium$platform$ui$ntp$BNtpServerLinuxFE;
|
||||
|
||||
public void setEnabledStates() {
|
||||
this.invoke(setEnabledStates, null, null);
|
||||
}
|
||||
|
||||
public Type getType() {
|
||||
return TYPE;
|
||||
}
|
||||
|
||||
public BNtpServerLinuxFE() {
|
||||
this.grid = new BCoordinatedGridPane(8);
|
||||
this.grid.setHalign(BHalign.left);
|
||||
this.grid.setColumnAlign(BHalign.center);
|
||||
this.addressFe = new BTextField("", 32);
|
||||
this.grid.add(null, (BValue)this.addressFe);
|
||||
this.linkTo((BComponent)this.addressFe, (Slot)BTextField.textModified, (Slot)setModified);
|
||||
this.linkTo((BComponent)this.addressFe, (Slot)BTextField.actionPerformed, (Slot)actionPerformed);
|
||||
this.linkTo((BComponent)this.addressFe, (Slot)BTextField.focusEvent, (Slot)propagateFocusEvent);
|
||||
this.linkTo((BComponent)this.addressFe, (Slot)BTextField.keyEvent, (Slot)propagateKeyEvent);
|
||||
this.linkTo((BComponent)this.addressFe, (Slot)BTextField.mouseEvent, (Slot)propagateMouseEvent);
|
||||
this.peerModeFe = new BLimitedFrozenEnumFE();
|
||||
this.grid.add(null, (BValue)this.peerModeFe);
|
||||
this.linkTo((BComponent)this.peerModeFe, (Slot)BLimitedFrozenEnumFE.pluginModified, (Slot)setModified);
|
||||
this.linkTo((BComponent)this.peerModeFe, (Slot)BLimitedFrozenEnumFE.focusEvent, (Slot)propagateFocusEvent);
|
||||
this.linkTo((BComponent)this.peerModeFe, (Slot)BLimitedFrozenEnumFE.mouseEvent, (Slot)propagateMouseEvent);
|
||||
this.linkTo((BComponent)this.peerModeFe, (Slot)BLimitedFrozenEnumFE.pluginModified, (Slot)setEnabledStates);
|
||||
this.linkTo((BComponent)this.peerModeFe, (Slot)BLimitedFrozenEnumFE.actionPerformed, (Slot)setEnabledStates);
|
||||
this.autoKeyFe = new BBooleanFE();
|
||||
this.grid.add(null, (BValue)this.autoKeyFe);
|
||||
this.linkTo((BComponent)this.autoKeyFe, (Slot)BBooleanFE.pluginModified, (Slot)setModified);
|
||||
this.linkTo((BComponent)this.autoKeyFe, (Slot)BBooleanFE.pluginModified, (Slot)setEnabledStates);
|
||||
this.linkTo((BComponent)this.autoKeyFe, (Slot)BBooleanFE.focusEvent, (Slot)propagateFocusEvent);
|
||||
this.linkTo((BComponent)this.autoKeyFe, (Slot)BBooleanFE.mouseEvent, (Slot)propagateMouseEvent);
|
||||
this.linkTo((BComponent)this.autoKeyFe, (Slot)BBooleanFE.actionPerformed, (Slot)actionPerformed);
|
||||
this.linkTo((BComponent)this.autoKeyFe, (Slot)BBooleanFE.actionPerformed, (Slot)setEnabledStates);
|
||||
this.keyFe = new BTextField("", 6);
|
||||
this.grid.add(null, (BValue)this.keyFe);
|
||||
this.linkTo((BComponent)this.keyFe, (Slot)BTextField.textModified, (Slot)setModified);
|
||||
this.linkTo((BComponent)this.keyFe, (Slot)BTextField.actionPerformed, (Slot)actionPerformed);
|
||||
this.linkTo((BComponent)this.keyFe, (Slot)BTextField.focusEvent, (Slot)propagateFocusEvent);
|
||||
this.linkTo((BComponent)this.keyFe, (Slot)BTextField.keyEvent, (Slot)propagateKeyEvent);
|
||||
this.linkTo((BComponent)this.keyFe, (Slot)BTextField.mouseEvent, (Slot)propagateMouseEvent);
|
||||
this.burstFe = new BBooleanFE();
|
||||
this.grid.add(null, (BValue)this.burstFe);
|
||||
this.linkTo((BComponent)this.burstFe, (Slot)BBooleanFE.pluginModified, (Slot)setModified);
|
||||
this.linkTo((BComponent)this.burstFe, (Slot)BBooleanFE.focusEvent, (Slot)propagateFocusEvent);
|
||||
this.linkTo((BComponent)this.burstFe, (Slot)BBooleanFE.mouseEvent, (Slot)propagateMouseEvent);
|
||||
this.linkTo((BComponent)this.burstFe, (Slot)BBooleanFE.actionPerformed, (Slot)actionPerformed);
|
||||
this.preferredFe = new BBooleanFE();
|
||||
this.grid.add(null, (BValue)this.preferredFe);
|
||||
this.linkTo((BComponent)this.preferredFe, (Slot)BBooleanFE.pluginModified, (Slot)setModified);
|
||||
this.linkTo((BComponent)this.preferredFe, (Slot)BBooleanFE.focusEvent, (Slot)propagateFocusEvent);
|
||||
this.linkTo((BComponent)this.preferredFe, (Slot)BBooleanFE.mouseEvent, (Slot)propagateMouseEvent);
|
||||
this.linkTo((BComponent)this.preferredFe, (Slot)BBooleanFE.actionPerformed, (Slot)actionPerformed);
|
||||
this.minPollIntervalFe = new BIntegerFE();
|
||||
this.grid.add(null, (BValue)this.minPollIntervalFe);
|
||||
this.linkTo((BComponent)this.minPollIntervalFe, (Slot)BIntegerFE.pluginModified, (Slot)setModified);
|
||||
this.linkTo((BComponent)this.minPollIntervalFe, (Slot)BIntegerFE.actionPerformed, (Slot)actionPerformed);
|
||||
this.linkTo((BComponent)this.minPollIntervalFe, (Slot)BIntegerFE.focusEvent, (Slot)propagateFocusEvent);
|
||||
this.linkTo((BComponent)this.minPollIntervalFe, (Slot)BIntegerFE.keyEvent, (Slot)propagateKeyEvent);
|
||||
this.linkTo((BComponent)this.minPollIntervalFe, (Slot)BIntegerFE.mouseEvent, (Slot)propagateMouseEvent);
|
||||
this.maxPollIntervalFe = new BIntegerFE();
|
||||
this.grid.add(null, (BValue)this.maxPollIntervalFe);
|
||||
this.linkTo((BComponent)this.maxPollIntervalFe, (Slot)BIntegerFE.pluginModified, (Slot)setModified);
|
||||
this.linkTo((BComponent)this.maxPollIntervalFe, (Slot)BIntegerFE.actionPerformed, (Slot)actionPerformed);
|
||||
this.linkTo((BComponent)this.maxPollIntervalFe, (Slot)BIntegerFE.focusEvent, (Slot)propagateFocusEvent);
|
||||
this.linkTo((BComponent)this.maxPollIntervalFe, (Slot)BIntegerFE.keyEvent, (Slot)propagateKeyEvent);
|
||||
this.linkTo((BComponent)this.maxPollIntervalFe, (Slot)BIntegerFE.mouseEvent, (Slot)propagateMouseEvent);
|
||||
this.setContent((BWidget)this.grid);
|
||||
}
|
||||
|
||||
public BWidget makeHeader() {
|
||||
BCoordinatedGridPane bCoordinatedGridPane = new BCoordinatedGridPane(8);
|
||||
bCoordinatedGridPane.setHalign(BHalign.left);
|
||||
bCoordinatedGridPane.setColumnAlign(BHalign.center);
|
||||
bCoordinatedGridPane.add(null, (BValue)LabelUtil.makeLabel(LexiconText.make((String)"platform", (String)"NtpPlatformService.address.label"), true));
|
||||
bCoordinatedGridPane.add(null, (BValue)LabelUtil.makeLabel(LexiconText.make((String)"platform", (String)"NtpPlatformServicePosix.peerMode.label"), true));
|
||||
bCoordinatedGridPane.add(null, (BValue)LabelUtil.makeLabel(LexiconText.make((String)"platform", (String)"NtpPlatformServicePosix.autoKey.label"), true));
|
||||
bCoordinatedGridPane.add(null, (BValue)LabelUtil.makeLabel(LexiconText.make((String)"platform", (String)"NtpPlatformServicePosix.manualKey.label"), true));
|
||||
bCoordinatedGridPane.add(null, (BValue)LabelUtil.makeLabel(LexiconText.make((String)"platform", (String)"NtpPlatformServicePosix.burst.label"), true));
|
||||
bCoordinatedGridPane.add(null, (BValue)LabelUtil.makeLabel(LexiconText.make((String)"platform", (String)"NtpPlatformServicePosix.prefer.label"), true));
|
||||
bCoordinatedGridPane.add(null, (BValue)LabelUtil.makeLabel(LexiconText.make((String)"platform", (String)"NtpPlatformServicePosix.minPollInterval.label"), true));
|
||||
bCoordinatedGridPane.add(null, (BValue)LabelUtil.makeLabel(LexiconText.make((String)"platform", (String)"NtpPlatformServicePosix.maxPollInterval.label"), true));
|
||||
return bCoordinatedGridPane;
|
||||
}
|
||||
|
||||
public String getServerPropertyName(Context context) throws Exception {
|
||||
BNtpServerLinux bNtpServerLinux = (BNtpServerLinux)this.getCurrentValue();
|
||||
return bNtpServerLinux.getPropertyName(bNtpServerLinux.getServerString((BNtpModePosix)this.peerModeFe.saveValue(context), this.addressFe.getText().trim(), ((BBoolean)this.autoKeyFe.saveValue(context)).getBoolean(), this.keyFe.getText().trim().length() != 0 ? Integer.valueOf(this.keyFe.getText()) : 0, ((BBoolean)this.burstFe.saveValue(context)).getBoolean(), ((BBoolean)this.preferredFe.saveValue(context)).getBoolean(), ((BInteger)this.minPollIntervalFe.saveValue(context)).getInt(), ((BInteger)this.maxPollIntervalFe.saveValue(context)).getInt(), this.additionalArgs));
|
||||
}
|
||||
|
||||
protected void doLoadValue(BObject bObject, Context context) throws Exception {
|
||||
BComplex bComplex;
|
||||
BNtpServerLinux bNtpServerLinux = (BNtpServerLinux)bObject;
|
||||
if (!this.readonlyInitialized && (bComplex = bNtpServerLinux.getParent()) != null) {
|
||||
this.setReadonly((bComplex.loadSlots().getFlags((Slot)bNtpServerLinux.getPropertyInParent()) & 1) > 0);
|
||||
}
|
||||
this.peerModeFe.loadValue((BObject)bNtpServerLinux.getPeerMode(), (Context)this.PEER_MODE_FACETS);
|
||||
this.addressFe.setText(bNtpServerLinux.getAddress());
|
||||
this.autoKeyFe.loadValue((BObject)BBoolean.make((boolean)bNtpServerLinux.getUseAutokey()));
|
||||
this.keyFe.setText(bNtpServerLinux.getUseKey() != 0 ? String.valueOf(bNtpServerLinux.getUseKey()) : "");
|
||||
this.burstFe.loadValue((BObject)BBoolean.make((boolean)bNtpServerLinux.getUseBurst()));
|
||||
this.preferredFe.loadValue((BObject)BBoolean.make((boolean)bNtpServerLinux.getServerPreferred()));
|
||||
bComplex = new BasicContext(context, BNtpServerLinux.minPollInterval.getFacets());
|
||||
this.minPollIntervalFe.loadValue((BObject)BInteger.make((int)bNtpServerLinux.getMinPollInterval()), (Context)bComplex);
|
||||
bComplex = new BasicContext(context, BNtpServerLinux.maxPollInterval.getFacets());
|
||||
this.maxPollIntervalFe.loadValue((BObject)BInteger.make((int)bNtpServerLinux.getMaxPollInterval()), (Context)bComplex);
|
||||
this.additionalArgs = bNtpServerLinux.getAdditionalArgs();
|
||||
this.doSetEnabledStates();
|
||||
}
|
||||
|
||||
protected BObject doSaveValue(BObject bObject, Context context) throws Exception {
|
||||
BNtpServerLinux bNtpServerLinux = (BNtpServerLinux)bObject;
|
||||
bNtpServerLinux.setPeerMode((BNtpModePosix)this.peerModeFe.saveValue(context));
|
||||
bNtpServerLinux.setAddress(this.addressFe.getText());
|
||||
bNtpServerLinux.setUseAutokey(((BBoolean)this.autoKeyFe.saveValue(context)).getBoolean());
|
||||
bNtpServerLinux.setUseKey(this.keyFe.getText().trim().length() != 0 ? Integer.valueOf(this.keyFe.getText()) : 0);
|
||||
bNtpServerLinux.setUseBurst(((BBoolean)this.burstFe.saveValue(context)).getBoolean());
|
||||
bNtpServerLinux.setServerPreferred(((BBoolean)this.preferredFe.saveValue(context)).getBoolean());
|
||||
bNtpServerLinux.setMinPollInterval(((BInteger)this.minPollIntervalFe.saveValue(context)).getInt());
|
||||
bNtpServerLinux.setMaxPollInterval(((BInteger)this.maxPollIntervalFe.saveValue(context)).getInt());
|
||||
bNtpServerLinux.setAdditionalArgs(this.additionalArgs);
|
||||
return bNtpServerLinux;
|
||||
}
|
||||
|
||||
public final void doSetEnabledStates() {
|
||||
try {
|
||||
this.keyFe.setEnabled(!((BBoolean)this.autoKeyFe.saveValue()).getBoolean());
|
||||
BNtpModePosix bNtpModePosix = (BNtpModePosix)this.peerModeFe.saveValue();
|
||||
this.preferredFe.setEnabled(bNtpModePosix != BNtpModePosix.broadcast && bNtpModePosix != BNtpModePosix.manycastclient);
|
||||
}
|
||||
catch (Exception exception) {
|
||||
// empty catch block
|
||||
}
|
||||
}
|
||||
|
||||
public void setEnabled(boolean bl) {
|
||||
super.setEnabled(bl);
|
||||
this.burstFe.setEnabled(bl);
|
||||
this.keyFe.setEnabled(bl);
|
||||
this.autoKeyFe.setEnabled(bl);
|
||||
this.peerModeFe.setEnabled(bl);
|
||||
this.preferredFe.setEnabled(bl);
|
||||
this.minPollIntervalFe.setEnabled(bl);
|
||||
this.maxPollIntervalFe.setEnabled(bl);
|
||||
this.doSetEnabledStates();
|
||||
}
|
||||
|
||||
protected void doSetReadonly(boolean bl) {
|
||||
super.doSetReadonly(bl);
|
||||
this.burstFe.setReadonly(bl);
|
||||
this.keyFe.setEditable(!bl);
|
||||
this.autoKeyFe.setReadonly(bl);
|
||||
this.peerModeFe.setReadonly(bl);
|
||||
this.preferredFe.setReadonly(bl);
|
||||
this.minPollIntervalFe.setReadonly(bl);
|
||||
this.maxPollIntervalFe.setReadonly(bl);
|
||||
}
|
||||
|
||||
public void doValidate(Context context) throws Exception {
|
||||
super.doValidate(context);
|
||||
int n = ((BInteger)this.minPollIntervalFe.saveValue(context)).getInt();
|
||||
int n2 = ((BInteger)this.maxPollIntervalFe.saveValue(context)).getInt();
|
||||
if (n < 4 || n > 16) {
|
||||
throw new Exception("Invalid minPoll value for " + this.addressFe.getText() + ". Use (4-16)");
|
||||
}
|
||||
if (n2 < 5 || n2 > 17) {
|
||||
throw new Exception("Invalid maxPoll value for " + this.addressFe.getText() + ". Use (5-17)");
|
||||
}
|
||||
if (n2 < n) {
|
||||
throw new Exception("Invalid configuration for " + this.addressFe.getText() + ": maxPoll < minPoll");
|
||||
}
|
||||
}
|
||||
|
||||
static /* synthetic */ Class class$(String string) {
|
||||
try {
|
||||
return Class.forName(string);
|
||||
}
|
||||
catch (ClassNotFoundException classNotFoundException) {
|
||||
throw new NoClassDefFoundError(classNotFoundException.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,223 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* com.tridium.workbench.fieldeditors.BBooleanFE
|
||||
* com.tridium.workbench.fieldeditors.BIntegerFE
|
||||
* javax.baja.data.BIDataValue
|
||||
* javax.baja.sys.Action
|
||||
* javax.baja.sys.BBoolean
|
||||
* javax.baja.sys.BComplex
|
||||
* javax.baja.sys.BComponent
|
||||
* javax.baja.sys.BEnumRange
|
||||
* javax.baja.sys.BFacets
|
||||
* javax.baja.sys.BInteger
|
||||
* javax.baja.sys.BObject
|
||||
* javax.baja.sys.BValue
|
||||
* javax.baja.sys.BasicContext
|
||||
* javax.baja.sys.Context
|
||||
* javax.baja.sys.Slot
|
||||
* javax.baja.sys.Sys
|
||||
* javax.baja.sys.Type
|
||||
* javax.baja.ui.BTextField
|
||||
* javax.baja.ui.BWidget
|
||||
* javax.baja.ui.enums.BHalign
|
||||
* javax.baja.util.LexiconText
|
||||
*/
|
||||
package com.tridium.platform.ui.ntp;
|
||||
|
||||
import com.tridium.platform.npsdk.BNtpServerNpsdk;
|
||||
import com.tridium.platform.posix.BNtpModePosix;
|
||||
import com.tridium.platform.ui.ntp.BNtpServerFE;
|
||||
import com.tridium.platform.ui.util.BCoordinatedGridPane;
|
||||
import com.tridium.platform.ui.util.BLimitedFrozenEnumFE;
|
||||
import com.tridium.platform.ui.util.LabelUtil;
|
||||
import com.tridium.workbench.fieldeditors.BBooleanFE;
|
||||
import com.tridium.workbench.fieldeditors.BIntegerFE;
|
||||
import javax.baja.data.BIDataValue;
|
||||
import javax.baja.sys.Action;
|
||||
import javax.baja.sys.BBoolean;
|
||||
import javax.baja.sys.BComplex;
|
||||
import javax.baja.sys.BComponent;
|
||||
import javax.baja.sys.BEnumRange;
|
||||
import javax.baja.sys.BFacets;
|
||||
import javax.baja.sys.BInteger;
|
||||
import javax.baja.sys.BObject;
|
||||
import javax.baja.sys.BValue;
|
||||
import javax.baja.sys.BasicContext;
|
||||
import javax.baja.sys.Context;
|
||||
import javax.baja.sys.Slot;
|
||||
import javax.baja.sys.Sys;
|
||||
import javax.baja.sys.Type;
|
||||
import javax.baja.ui.BTextField;
|
||||
import javax.baja.ui.BWidget;
|
||||
import javax.baja.ui.enums.BHalign;
|
||||
import javax.baja.util.LexiconText;
|
||||
|
||||
public class BNtpServerNpsdkFE
|
||||
extends BNtpServerFE {
|
||||
public static final Action setEnabledStates = BNtpServerNpsdkFE.newAction((int)0, null);
|
||||
public static final Type TYPE = Sys.loadType((Class)(class$com$tridium$platform$ui$ntp$BNtpServerNpsdkFE == null ? (class$com$tridium$platform$ui$ntp$BNtpServerNpsdkFE = BNtpServerNpsdkFE.class$("com.tridium.platform.ui.ntp.BNtpServerNpsdkFE")) : class$com$tridium$platform$ui$ntp$BNtpServerNpsdkFE));
|
||||
protected BBooleanFE preferredFe;
|
||||
protected BBooleanFE burstFe;
|
||||
protected BLimitedFrozenEnumFE peerModeFe;
|
||||
protected BIntegerFE minPollIntervalFe;
|
||||
protected BIntegerFE maxPollIntervalFe;
|
||||
protected final BFacets PEER_MODE_FACETS = BFacets.make((String)"range", (BIDataValue)BEnumRange.make(null, (int[])new int[]{2, 1, 3, 4}, (String[])new String[]{BNtpModePosix.server.getTag(), BNtpModePosix.peer.getTag(), BNtpModePosix.broadcast.getTag(), BNtpModePosix.manycastclient.getTag()}));
|
||||
static /* synthetic */ Class class$com$tridium$platform$ui$ntp$BNtpServerNpsdkFE;
|
||||
|
||||
public void setEnabledStates() {
|
||||
this.invoke(setEnabledStates, null, null);
|
||||
}
|
||||
|
||||
public Type getType() {
|
||||
return TYPE;
|
||||
}
|
||||
|
||||
public BNtpServerNpsdkFE() {
|
||||
this.grid = new BCoordinatedGridPane(8);
|
||||
this.grid.setHalign(BHalign.left);
|
||||
this.grid.setColumnAlign(BHalign.center);
|
||||
this.addressFe = new BTextField("", 32);
|
||||
this.grid.add(null, (BValue)this.addressFe);
|
||||
this.linkTo((BComponent)this.addressFe, (Slot)BTextField.textModified, (Slot)setModified);
|
||||
this.linkTo((BComponent)this.addressFe, (Slot)BTextField.actionPerformed, (Slot)actionPerformed);
|
||||
this.linkTo((BComponent)this.addressFe, (Slot)BTextField.focusEvent, (Slot)propagateFocusEvent);
|
||||
this.linkTo((BComponent)this.addressFe, (Slot)BTextField.keyEvent, (Slot)propagateKeyEvent);
|
||||
this.linkTo((BComponent)this.addressFe, (Slot)BTextField.mouseEvent, (Slot)propagateMouseEvent);
|
||||
this.peerModeFe = new BLimitedFrozenEnumFE();
|
||||
this.grid.add(null, (BValue)this.peerModeFe);
|
||||
this.linkTo((BComponent)this.peerModeFe, (Slot)BLimitedFrozenEnumFE.pluginModified, (Slot)setModified);
|
||||
this.linkTo((BComponent)this.peerModeFe, (Slot)BLimitedFrozenEnumFE.focusEvent, (Slot)propagateFocusEvent);
|
||||
this.linkTo((BComponent)this.peerModeFe, (Slot)BLimitedFrozenEnumFE.mouseEvent, (Slot)propagateMouseEvent);
|
||||
this.linkTo((BComponent)this.peerModeFe, (Slot)BLimitedFrozenEnumFE.pluginModified, (Slot)setEnabledStates);
|
||||
this.linkTo((BComponent)this.peerModeFe, (Slot)BLimitedFrozenEnumFE.actionPerformed, (Slot)setEnabledStates);
|
||||
this.burstFe = new BBooleanFE();
|
||||
this.grid.add(null, (BValue)this.burstFe);
|
||||
this.linkTo((BComponent)this.burstFe, (Slot)BBooleanFE.pluginModified, (Slot)setModified);
|
||||
this.linkTo((BComponent)this.burstFe, (Slot)BBooleanFE.focusEvent, (Slot)propagateFocusEvent);
|
||||
this.linkTo((BComponent)this.burstFe, (Slot)BBooleanFE.mouseEvent, (Slot)propagateMouseEvent);
|
||||
this.linkTo((BComponent)this.burstFe, (Slot)BBooleanFE.actionPerformed, (Slot)actionPerformed);
|
||||
this.preferredFe = new BBooleanFE();
|
||||
this.grid.add(null, (BValue)this.preferredFe);
|
||||
this.linkTo((BComponent)this.preferredFe, (Slot)BBooleanFE.pluginModified, (Slot)setModified);
|
||||
this.linkTo((BComponent)this.preferredFe, (Slot)BBooleanFE.focusEvent, (Slot)propagateFocusEvent);
|
||||
this.linkTo((BComponent)this.preferredFe, (Slot)BBooleanFE.mouseEvent, (Slot)propagateMouseEvent);
|
||||
this.linkTo((BComponent)this.preferredFe, (Slot)BBooleanFE.actionPerformed, (Slot)actionPerformed);
|
||||
this.minPollIntervalFe = new BIntegerFE();
|
||||
this.grid.add(null, (BValue)this.minPollIntervalFe);
|
||||
this.linkTo((BComponent)this.minPollIntervalFe, (Slot)BIntegerFE.pluginModified, (Slot)setModified);
|
||||
this.linkTo((BComponent)this.minPollIntervalFe, (Slot)BIntegerFE.actionPerformed, (Slot)actionPerformed);
|
||||
this.linkTo((BComponent)this.minPollIntervalFe, (Slot)BIntegerFE.focusEvent, (Slot)propagateFocusEvent);
|
||||
this.linkTo((BComponent)this.minPollIntervalFe, (Slot)BIntegerFE.keyEvent, (Slot)propagateKeyEvent);
|
||||
this.linkTo((BComponent)this.minPollIntervalFe, (Slot)BIntegerFE.mouseEvent, (Slot)propagateMouseEvent);
|
||||
this.maxPollIntervalFe = new BIntegerFE();
|
||||
this.grid.add(null, (BValue)this.maxPollIntervalFe);
|
||||
this.linkTo((BComponent)this.maxPollIntervalFe, (Slot)BIntegerFE.pluginModified, (Slot)setModified);
|
||||
this.linkTo((BComponent)this.maxPollIntervalFe, (Slot)BIntegerFE.actionPerformed, (Slot)actionPerformed);
|
||||
this.linkTo((BComponent)this.maxPollIntervalFe, (Slot)BIntegerFE.focusEvent, (Slot)propagateFocusEvent);
|
||||
this.linkTo((BComponent)this.maxPollIntervalFe, (Slot)BIntegerFE.keyEvent, (Slot)propagateKeyEvent);
|
||||
this.linkTo((BComponent)this.maxPollIntervalFe, (Slot)BIntegerFE.mouseEvent, (Slot)propagateMouseEvent);
|
||||
this.setContent((BWidget)this.grid);
|
||||
}
|
||||
|
||||
public BWidget makeHeader() {
|
||||
BCoordinatedGridPane bCoordinatedGridPane = new BCoordinatedGridPane(8);
|
||||
bCoordinatedGridPane.setHalign(BHalign.left);
|
||||
bCoordinatedGridPane.setColumnAlign(BHalign.center);
|
||||
bCoordinatedGridPane.add(null, (BValue)LabelUtil.makeLabel(LexiconText.make((String)"platform", (String)"NtpPlatformService.address.label"), true));
|
||||
bCoordinatedGridPane.add(null, (BValue)LabelUtil.makeLabel(LexiconText.make((String)"platform", (String)"NtpPlatformServicePosix.peerMode.label"), true));
|
||||
bCoordinatedGridPane.add(null, (BValue)LabelUtil.makeLabel(LexiconText.make((String)"platform", (String)"NtpPlatformServicePosix.burst.label"), true));
|
||||
bCoordinatedGridPane.add(null, (BValue)LabelUtil.makeLabel(LexiconText.make((String)"platform", (String)"NtpPlatformServicePosix.prefer.label"), true));
|
||||
bCoordinatedGridPane.add(null, (BValue)LabelUtil.makeLabel(LexiconText.make((String)"platform", (String)"NtpPlatformServicePosix.minPollInterval.label"), true));
|
||||
bCoordinatedGridPane.add(null, (BValue)LabelUtil.makeLabel(LexiconText.make((String)"platform", (String)"NtpPlatformServicePosix.maxPollInterval.label"), true));
|
||||
return bCoordinatedGridPane;
|
||||
}
|
||||
|
||||
public String getServerPropertyName(Context context) throws Exception {
|
||||
BNtpServerNpsdk bNtpServerNpsdk = (BNtpServerNpsdk)this.getCurrentValue();
|
||||
return bNtpServerNpsdk.getPropertyName(bNtpServerNpsdk.getServerString((BNtpModePosix)this.peerModeFe.saveValue(context), this.addressFe.getText().trim(), ((BBoolean)this.burstFe.saveValue(context)).getBoolean(), ((BBoolean)this.preferredFe.saveValue(context)).getBoolean(), ((BInteger)this.minPollIntervalFe.saveValue(context)).getInt(), ((BInteger)this.maxPollIntervalFe.saveValue(context)).getInt()));
|
||||
}
|
||||
|
||||
protected void doLoadValue(BObject bObject, Context context) throws Exception {
|
||||
BComplex bComplex;
|
||||
BNtpServerNpsdk bNtpServerNpsdk = (BNtpServerNpsdk)bObject;
|
||||
if (!this.readonlyInitialized && (bComplex = bNtpServerNpsdk.getParent()) != null) {
|
||||
this.setReadonly((bComplex.loadSlots().getFlags((Slot)bNtpServerNpsdk.getPropertyInParent()) & 1) > 0);
|
||||
}
|
||||
this.peerModeFe.loadValue((BObject)bNtpServerNpsdk.getPeerMode(), (Context)this.PEER_MODE_FACETS);
|
||||
this.addressFe.setText(bNtpServerNpsdk.getAddress());
|
||||
this.burstFe.loadValue((BObject)BBoolean.make((boolean)bNtpServerNpsdk.getUseBurst()));
|
||||
this.preferredFe.loadValue((BObject)BBoolean.make((boolean)bNtpServerNpsdk.getServerPreferred()));
|
||||
bComplex = new BasicContext(context, BNtpServerNpsdk.minPollInterval.getFacets());
|
||||
this.minPollIntervalFe.loadValue((BObject)BInteger.make((int)bNtpServerNpsdk.getMinPollInterval()), (Context)bComplex);
|
||||
bComplex = new BasicContext(context, BNtpServerNpsdk.maxPollInterval.getFacets());
|
||||
this.maxPollIntervalFe.loadValue((BObject)BInteger.make((int)bNtpServerNpsdk.getMaxPollInterval()), (Context)bComplex);
|
||||
this.doSetEnabledStates();
|
||||
}
|
||||
|
||||
protected BObject doSaveValue(BObject bObject, Context context) throws Exception {
|
||||
BNtpServerNpsdk bNtpServerNpsdk = (BNtpServerNpsdk)bObject;
|
||||
bNtpServerNpsdk.setPeerMode((BNtpModePosix)this.peerModeFe.saveValue(context));
|
||||
bNtpServerNpsdk.setAddress(this.addressFe.getText());
|
||||
bNtpServerNpsdk.setUseBurst(((BBoolean)this.burstFe.saveValue(context)).getBoolean());
|
||||
bNtpServerNpsdk.setServerPreferred(((BBoolean)this.preferredFe.saveValue(context)).getBoolean());
|
||||
bNtpServerNpsdk.setMinPollInterval(((BInteger)this.minPollIntervalFe.saveValue(context)).getInt());
|
||||
bNtpServerNpsdk.setMaxPollInterval(((BInteger)this.maxPollIntervalFe.saveValue(context)).getInt());
|
||||
return bNtpServerNpsdk;
|
||||
}
|
||||
|
||||
public final void doSetEnabledStates() {
|
||||
try {
|
||||
BNtpModePosix bNtpModePosix = (BNtpModePosix)this.peerModeFe.saveValue();
|
||||
this.preferredFe.setEnabled(bNtpModePosix != BNtpModePosix.broadcast && bNtpModePosix != BNtpModePosix.manycastclient);
|
||||
}
|
||||
catch (Exception exception) {
|
||||
// empty catch block
|
||||
}
|
||||
}
|
||||
|
||||
public void setEnabled(boolean bl) {
|
||||
super.setEnabled(bl);
|
||||
this.burstFe.setEnabled(bl);
|
||||
this.peerModeFe.setEnabled(bl);
|
||||
this.preferredFe.setEnabled(bl);
|
||||
this.minPollIntervalFe.setEnabled(bl);
|
||||
this.maxPollIntervalFe.setEnabled(bl);
|
||||
this.doSetEnabledStates();
|
||||
}
|
||||
|
||||
protected void doSetReadonly(boolean bl) {
|
||||
super.doSetReadonly(bl);
|
||||
this.burstFe.setReadonly(bl);
|
||||
this.peerModeFe.setReadonly(bl);
|
||||
this.preferredFe.setReadonly(bl);
|
||||
this.minPollIntervalFe.setReadonly(bl);
|
||||
this.maxPollIntervalFe.setReadonly(bl);
|
||||
}
|
||||
|
||||
public void doValidate(Context context) throws Exception {
|
||||
super.doValidate(context);
|
||||
int n = ((BInteger)this.minPollIntervalFe.saveValue(context)).getInt();
|
||||
int n2 = ((BInteger)this.maxPollIntervalFe.saveValue(context)).getInt();
|
||||
if (n < 4 || n > 16) {
|
||||
throw new Exception("Invalid minPoll value for " + this.addressFe.getText() + ". Use (4-16)");
|
||||
}
|
||||
if (n2 < 5 || n2 > 17) {
|
||||
throw new Exception("Invalid maxPoll value for " + this.addressFe.getText() + ". Use (5-17)");
|
||||
}
|
||||
if (n2 < n) {
|
||||
throw new Exception("Invalid configuration for " + this.addressFe.getText() + ": maxPoll < minPoll");
|
||||
}
|
||||
}
|
||||
|
||||
static /* synthetic */ Class class$(String string) {
|
||||
try {
|
||||
return Class.forName(string);
|
||||
}
|
||||
catch (ClassNotFoundException classNotFoundException) {
|
||||
throw new NoClassDefFoundError(classNotFoundException.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,214 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* com.tridium.workbench.fieldeditors.BBooleanFE
|
||||
* com.tridium.workbench.fieldeditors.BIntegerFE
|
||||
* javax.baja.data.BIDataValue
|
||||
* javax.baja.sys.Action
|
||||
* javax.baja.sys.BBoolean
|
||||
* javax.baja.sys.BComplex
|
||||
* javax.baja.sys.BComponent
|
||||
* javax.baja.sys.BEnumRange
|
||||
* javax.baja.sys.BFacets
|
||||
* javax.baja.sys.BInteger
|
||||
* javax.baja.sys.BObject
|
||||
* javax.baja.sys.BValue
|
||||
* javax.baja.sys.BasicContext
|
||||
* javax.baja.sys.Context
|
||||
* javax.baja.sys.Slot
|
||||
* javax.baja.sys.Sys
|
||||
* javax.baja.sys.Type
|
||||
* javax.baja.ui.BTextField
|
||||
* javax.baja.ui.BWidget
|
||||
* javax.baja.ui.enums.BHalign
|
||||
* javax.baja.util.LexiconText
|
||||
*/
|
||||
package com.tridium.platform.ui.ntp;
|
||||
|
||||
import com.tridium.platform.posix.BNtpModePosix;
|
||||
import com.tridium.platform.qnx.BNtpServerQnx;
|
||||
import com.tridium.platform.ui.ntp.BNtpServerFE;
|
||||
import com.tridium.platform.ui.util.BCoordinatedGridPane;
|
||||
import com.tridium.platform.ui.util.BLimitedFrozenEnumFE;
|
||||
import com.tridium.platform.ui.util.LabelUtil;
|
||||
import com.tridium.workbench.fieldeditors.BBooleanFE;
|
||||
import com.tridium.workbench.fieldeditors.BIntegerFE;
|
||||
import javax.baja.data.BIDataValue;
|
||||
import javax.baja.sys.Action;
|
||||
import javax.baja.sys.BBoolean;
|
||||
import javax.baja.sys.BComplex;
|
||||
import javax.baja.sys.BComponent;
|
||||
import javax.baja.sys.BEnumRange;
|
||||
import javax.baja.sys.BFacets;
|
||||
import javax.baja.sys.BInteger;
|
||||
import javax.baja.sys.BObject;
|
||||
import javax.baja.sys.BValue;
|
||||
import javax.baja.sys.BasicContext;
|
||||
import javax.baja.sys.Context;
|
||||
import javax.baja.sys.Slot;
|
||||
import javax.baja.sys.Sys;
|
||||
import javax.baja.sys.Type;
|
||||
import javax.baja.ui.BTextField;
|
||||
import javax.baja.ui.BWidget;
|
||||
import javax.baja.ui.enums.BHalign;
|
||||
import javax.baja.util.LexiconText;
|
||||
|
||||
public class BNtpServerQnxFE
|
||||
extends BNtpServerFE {
|
||||
public static final Action setEnabledStates = BNtpServerQnxFE.newAction((int)0, null);
|
||||
public static final Type TYPE = Sys.loadType((Class)(class$com$tridium$platform$ui$ntp$BNtpServerQnxFE == null ? (class$com$tridium$platform$ui$ntp$BNtpServerQnxFE = BNtpServerQnxFE.class$("com.tridium.platform.ui.ntp.BNtpServerQnxFE")) : class$com$tridium$platform$ui$ntp$BNtpServerQnxFE));
|
||||
protected BBooleanFE preferredFe;
|
||||
protected BBooleanFE burstFe;
|
||||
protected BLimitedFrozenEnumFE peerModeFe;
|
||||
protected BIntegerFE minPollIntervalFe;
|
||||
protected BIntegerFE maxPollIntervalFe;
|
||||
protected final BFacets PEER_MODE_FACETS = BFacets.make((String)"range", (BIDataValue)BEnumRange.make(null, (int[])new int[]{2, 1}, (String[])new String[]{BNtpModePosix.server.getTag(), BNtpModePosix.peer.getTag()}));
|
||||
static /* synthetic */ Class class$com$tridium$platform$ui$ntp$BNtpServerQnxFE;
|
||||
|
||||
public void setEnabledStates() {
|
||||
this.invoke(setEnabledStates, null, null);
|
||||
}
|
||||
|
||||
public Type getType() {
|
||||
return TYPE;
|
||||
}
|
||||
|
||||
public BNtpServerQnxFE() {
|
||||
this.grid = new BCoordinatedGridPane(8);
|
||||
this.grid.setHalign(BHalign.left);
|
||||
this.grid.setColumnAlign(BHalign.center);
|
||||
this.addressFe = new BTextField("", 32);
|
||||
this.grid.add(null, (BValue)this.addressFe);
|
||||
this.linkTo((BComponent)this.addressFe, (Slot)BTextField.textModified, (Slot)setModified);
|
||||
this.linkTo((BComponent)this.addressFe, (Slot)BTextField.actionPerformed, (Slot)actionPerformed);
|
||||
this.linkTo((BComponent)this.addressFe, (Slot)BTextField.focusEvent, (Slot)propagateFocusEvent);
|
||||
this.linkTo((BComponent)this.addressFe, (Slot)BTextField.keyEvent, (Slot)propagateKeyEvent);
|
||||
this.linkTo((BComponent)this.addressFe, (Slot)BTextField.mouseEvent, (Slot)propagateMouseEvent);
|
||||
this.peerModeFe = new BLimitedFrozenEnumFE();
|
||||
this.grid.add(null, (BValue)this.peerModeFe);
|
||||
this.linkTo((BComponent)this.peerModeFe, (Slot)BLimitedFrozenEnumFE.pluginModified, (Slot)setModified);
|
||||
this.linkTo((BComponent)this.peerModeFe, (Slot)BLimitedFrozenEnumFE.focusEvent, (Slot)propagateFocusEvent);
|
||||
this.linkTo((BComponent)this.peerModeFe, (Slot)BLimitedFrozenEnumFE.mouseEvent, (Slot)propagateMouseEvent);
|
||||
this.burstFe = new BBooleanFE();
|
||||
this.grid.add(null, (BValue)this.burstFe);
|
||||
this.linkTo((BComponent)this.burstFe, (Slot)BBooleanFE.pluginModified, (Slot)setModified);
|
||||
this.linkTo((BComponent)this.burstFe, (Slot)BBooleanFE.focusEvent, (Slot)propagateFocusEvent);
|
||||
this.linkTo((BComponent)this.burstFe, (Slot)BBooleanFE.mouseEvent, (Slot)propagateMouseEvent);
|
||||
this.linkTo((BComponent)this.burstFe, (Slot)BBooleanFE.actionPerformed, (Slot)actionPerformed);
|
||||
this.preferredFe = new BBooleanFE();
|
||||
this.grid.add(null, (BValue)this.preferredFe);
|
||||
this.linkTo((BComponent)this.preferredFe, (Slot)BBooleanFE.pluginModified, (Slot)setModified);
|
||||
this.linkTo((BComponent)this.preferredFe, (Slot)BBooleanFE.focusEvent, (Slot)propagateFocusEvent);
|
||||
this.linkTo((BComponent)this.preferredFe, (Slot)BBooleanFE.mouseEvent, (Slot)propagateMouseEvent);
|
||||
this.linkTo((BComponent)this.preferredFe, (Slot)BBooleanFE.actionPerformed, (Slot)actionPerformed);
|
||||
this.minPollIntervalFe = new BIntegerFE();
|
||||
this.grid.add(null, (BValue)this.minPollIntervalFe);
|
||||
this.linkTo((BComponent)this.minPollIntervalFe, (Slot)BIntegerFE.pluginModified, (Slot)setModified);
|
||||
this.linkTo((BComponent)this.minPollIntervalFe, (Slot)BIntegerFE.actionPerformed, (Slot)actionPerformed);
|
||||
this.linkTo((BComponent)this.minPollIntervalFe, (Slot)BIntegerFE.focusEvent, (Slot)propagateFocusEvent);
|
||||
this.linkTo((BComponent)this.minPollIntervalFe, (Slot)BIntegerFE.keyEvent, (Slot)propagateKeyEvent);
|
||||
this.linkTo((BComponent)this.minPollIntervalFe, (Slot)BIntegerFE.mouseEvent, (Slot)propagateMouseEvent);
|
||||
this.maxPollIntervalFe = new BIntegerFE();
|
||||
this.grid.add(null, (BValue)this.maxPollIntervalFe);
|
||||
this.linkTo((BComponent)this.maxPollIntervalFe, (Slot)BIntegerFE.pluginModified, (Slot)setModified);
|
||||
this.linkTo((BComponent)this.maxPollIntervalFe, (Slot)BIntegerFE.actionPerformed, (Slot)actionPerformed);
|
||||
this.linkTo((BComponent)this.maxPollIntervalFe, (Slot)BIntegerFE.focusEvent, (Slot)propagateFocusEvent);
|
||||
this.linkTo((BComponent)this.maxPollIntervalFe, (Slot)BIntegerFE.keyEvent, (Slot)propagateKeyEvent);
|
||||
this.linkTo((BComponent)this.maxPollIntervalFe, (Slot)BIntegerFE.mouseEvent, (Slot)propagateMouseEvent);
|
||||
this.setContent((BWidget)this.grid);
|
||||
}
|
||||
|
||||
public BWidget makeHeader() {
|
||||
BCoordinatedGridPane bCoordinatedGridPane = new BCoordinatedGridPane(8);
|
||||
bCoordinatedGridPane.setHalign(BHalign.left);
|
||||
bCoordinatedGridPane.setColumnAlign(BHalign.center);
|
||||
bCoordinatedGridPane.add(null, (BValue)LabelUtil.makeLabel(LexiconText.make((String)"platform", (String)"NtpPlatformService.address.label"), true));
|
||||
bCoordinatedGridPane.add(null, (BValue)LabelUtil.makeLabel(LexiconText.make((String)"platform", (String)"NtpPlatformServicePosix.peerMode.label"), true));
|
||||
bCoordinatedGridPane.add(null, (BValue)LabelUtil.makeLabel(LexiconText.make((String)"platform", (String)"NtpPlatformServicePosix.burst.label"), true));
|
||||
bCoordinatedGridPane.add(null, (BValue)LabelUtil.makeLabel(LexiconText.make((String)"platform", (String)"NtpPlatformServicePosix.prefer.label"), true));
|
||||
bCoordinatedGridPane.add(null, (BValue)LabelUtil.makeLabel(LexiconText.make((String)"platform", (String)"NtpPlatformServicePosix.minPollInterval.label"), true));
|
||||
bCoordinatedGridPane.add(null, (BValue)LabelUtil.makeLabel(LexiconText.make((String)"platform", (String)"NtpPlatformServicePosix.maxPollInterval.label"), true));
|
||||
return bCoordinatedGridPane;
|
||||
}
|
||||
|
||||
public String getServerPropertyName(Context context) throws Exception {
|
||||
BNtpServerQnx bNtpServerQnx = (BNtpServerQnx)this.getCurrentValue();
|
||||
return bNtpServerQnx.getPropertyName(bNtpServerQnx.getServerString((BNtpModePosix)this.peerModeFe.saveValue(context), this.addressFe.getText().trim(), ((BBoolean)this.burstFe.saveValue(context)).getBoolean(), ((BBoolean)this.preferredFe.saveValue(context)).getBoolean(), ((BInteger)this.minPollIntervalFe.saveValue(context)).getInt(), ((BInteger)this.maxPollIntervalFe.saveValue(context)).getInt()));
|
||||
}
|
||||
|
||||
protected void doLoadValue(BObject bObject, Context context) throws Exception {
|
||||
BComplex bComplex;
|
||||
BNtpServerQnx bNtpServerQnx = (BNtpServerQnx)bObject;
|
||||
if (!this.readonlyInitialized && (bComplex = bNtpServerQnx.getParent()) != null) {
|
||||
this.setReadonly((bComplex.loadSlots().getFlags((Slot)bNtpServerQnx.getPropertyInParent()) & 1) > 0);
|
||||
}
|
||||
this.peerModeFe.loadValue((BObject)bNtpServerQnx.getPeerMode(), (Context)this.PEER_MODE_FACETS);
|
||||
this.addressFe.setText(bNtpServerQnx.getAddress());
|
||||
this.burstFe.loadValue((BObject)BBoolean.make((boolean)bNtpServerQnx.getUseBurst()));
|
||||
this.preferredFe.loadValue((BObject)BBoolean.make((boolean)bNtpServerQnx.getServerPreferred()));
|
||||
bComplex = new BasicContext(context, BNtpServerQnx.minPollInterval.getFacets());
|
||||
this.minPollIntervalFe.loadValue((BObject)BInteger.make((int)bNtpServerQnx.getMinPollInterval()), (Context)bComplex);
|
||||
bComplex = new BasicContext(context, BNtpServerQnx.maxPollInterval.getFacets());
|
||||
this.maxPollIntervalFe.loadValue((BObject)BInteger.make((int)bNtpServerQnx.getMaxPollInterval()), (Context)bComplex);
|
||||
this.doSetEnabledStates();
|
||||
}
|
||||
|
||||
protected BObject doSaveValue(BObject bObject, Context context) throws Exception {
|
||||
BNtpServerQnx bNtpServerQnx = (BNtpServerQnx)bObject;
|
||||
bNtpServerQnx.setPeerMode((BNtpModePosix)this.peerModeFe.saveValue(context));
|
||||
bNtpServerQnx.setAddress(this.addressFe.getText());
|
||||
bNtpServerQnx.setUseBurst(((BBoolean)this.burstFe.saveValue(context)).getBoolean());
|
||||
bNtpServerQnx.setServerPreferred(((BBoolean)this.preferredFe.saveValue(context)).getBoolean());
|
||||
bNtpServerQnx.setMinPollInterval(((BInteger)this.minPollIntervalFe.saveValue(context)).getInt());
|
||||
bNtpServerQnx.setMaxPollInterval(((BInteger)this.maxPollIntervalFe.saveValue(context)).getInt());
|
||||
return bNtpServerQnx;
|
||||
}
|
||||
|
||||
public final void doSetEnabledStates() {
|
||||
}
|
||||
|
||||
public void setEnabled(boolean bl) {
|
||||
super.setEnabled(bl);
|
||||
this.burstFe.setEnabled(bl);
|
||||
this.peerModeFe.setEnabled(bl);
|
||||
this.preferredFe.setEnabled(bl);
|
||||
this.minPollIntervalFe.setEnabled(bl);
|
||||
this.maxPollIntervalFe.setEnabled(bl);
|
||||
this.doSetEnabledStates();
|
||||
}
|
||||
|
||||
protected void doSetReadonly(boolean bl) {
|
||||
super.doSetReadonly(bl);
|
||||
this.burstFe.setReadonly(bl);
|
||||
this.peerModeFe.setReadonly(bl);
|
||||
this.preferredFe.setReadonly(bl);
|
||||
this.minPollIntervalFe.setReadonly(bl);
|
||||
this.maxPollIntervalFe.setReadonly(bl);
|
||||
}
|
||||
|
||||
public void doValidate(Context context) throws Exception {
|
||||
super.doValidate(context);
|
||||
int n = ((BInteger)this.minPollIntervalFe.saveValue(context)).getInt();
|
||||
int n2 = ((BInteger)this.maxPollIntervalFe.saveValue(context)).getInt();
|
||||
if (n < 4 || n > 16) {
|
||||
throw new Exception("Invalid minPoll value for " + this.addressFe.getText() + ". Use (4-16)");
|
||||
}
|
||||
if (n2 < 5 || n2 > 17) {
|
||||
throw new Exception("Invalid maxPoll value for " + this.addressFe.getText() + ". Use (5-17)");
|
||||
}
|
||||
if (n2 < n) {
|
||||
throw new Exception("Invalid configuration for " + this.addressFe.getText() + ": maxPoll < minPoll");
|
||||
}
|
||||
}
|
||||
|
||||
static /* synthetic */ Class class$(String string) {
|
||||
try {
|
||||
return Class.forName(string);
|
||||
}
|
||||
catch (ClassNotFoundException classNotFoundException) {
|
||||
throw new NoClassDefFoundError(classNotFoundException.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,379 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* javax.baja.agent.AgentFilter
|
||||
* javax.baja.gx.BImage
|
||||
* javax.baja.sys.Action
|
||||
* javax.baja.sys.BComplex
|
||||
* javax.baja.sys.BComponent
|
||||
* javax.baja.sys.BIcon
|
||||
* javax.baja.sys.BObject
|
||||
* javax.baja.sys.BValue
|
||||
* javax.baja.sys.Context
|
||||
* javax.baja.sys.LocalizableRuntimeException
|
||||
* javax.baja.sys.Property
|
||||
* javax.baja.sys.Slot
|
||||
* javax.baja.sys.SlotCursor
|
||||
* javax.baja.sys.Sys
|
||||
* javax.baja.sys.Type
|
||||
* javax.baja.ui.BButton
|
||||
* javax.baja.ui.BToolBar
|
||||
* javax.baja.ui.BWidget
|
||||
* javax.baja.ui.Command
|
||||
* javax.baja.ui.CommandArtifact
|
||||
* javax.baja.ui.enums.BButtonStyle
|
||||
* javax.baja.ui.enums.BHalign
|
||||
* javax.baja.ui.event.BFocusEvent
|
||||
* javax.baja.ui.pane.BFlowPane
|
||||
* javax.baja.ui.pane.BGridPane
|
||||
* javax.baja.util.BTypeSpec
|
||||
* javax.baja.workbench.fieldeditor.BWbFieldEditor
|
||||
*/
|
||||
package com.tridium.platform.ui.ntp;
|
||||
|
||||
import com.tridium.platform.ntp.BNtpServer;
|
||||
import com.tridium.platform.ntp.BNtpServerVector;
|
||||
import com.tridium.platform.ui.ntp.BNtpServerFE;
|
||||
import com.tridium.platform.ui.util.CommandUtil;
|
||||
import java.util.HashSet;
|
||||
import javax.baja.agent.AgentFilter;
|
||||
import javax.baja.gx.BImage;
|
||||
import javax.baja.sys.Action;
|
||||
import javax.baja.sys.BComplex;
|
||||
import javax.baja.sys.BComponent;
|
||||
import javax.baja.sys.BIcon;
|
||||
import javax.baja.sys.BObject;
|
||||
import javax.baja.sys.BValue;
|
||||
import javax.baja.sys.Context;
|
||||
import javax.baja.sys.LocalizableRuntimeException;
|
||||
import javax.baja.sys.Property;
|
||||
import javax.baja.sys.Slot;
|
||||
import javax.baja.sys.SlotCursor;
|
||||
import javax.baja.sys.Sys;
|
||||
import javax.baja.sys.Type;
|
||||
import javax.baja.ui.BButton;
|
||||
import javax.baja.ui.BToolBar;
|
||||
import javax.baja.ui.BWidget;
|
||||
import javax.baja.ui.Command;
|
||||
import javax.baja.ui.CommandArtifact;
|
||||
import javax.baja.ui.enums.BButtonStyle;
|
||||
import javax.baja.ui.enums.BHalign;
|
||||
import javax.baja.ui.event.BFocusEvent;
|
||||
import javax.baja.ui.pane.BFlowPane;
|
||||
import javax.baja.ui.pane.BGridPane;
|
||||
import javax.baja.util.BTypeSpec;
|
||||
import javax.baja.workbench.fieldeditor.BWbFieldEditor;
|
||||
|
||||
public class BNtpServerVectorFE
|
||||
extends BWbFieldEditor {
|
||||
public static final Action handleFocusChange = BNtpServerVectorFE.newAction((int)4, (BValue)new BFocusEvent(), null);
|
||||
public static final Type TYPE = Sys.loadType((Class)(class$com$tridium$platform$ui$ntp$BNtpServerVectorFE == null ? (class$com$tridium$platform$ui$ntp$BNtpServerVectorFE = BNtpServerVectorFE.class$("com.tridium.platform.ui.ntp.BNtpServerVectorFE")) : class$com$tridium$platform$ui$ntp$BNtpServerVectorFE));
|
||||
private BNtpServerFE feFactory = null;
|
||||
private BNtpServerVector vector = null;
|
||||
private BWidget header = null;
|
||||
private BGridPane contentPane;
|
||||
private BWbFieldEditor focusedEditor = null;
|
||||
private boolean readonlyInitialized = false;
|
||||
private Command addCommand;
|
||||
private Command deleteCommand;
|
||||
private Command upCommand;
|
||||
private Command downCommand;
|
||||
static /* synthetic */ Class class$com$tridium$platform$ui$ntp$BNtpServerVectorFE;
|
||||
static /* synthetic */ Class class$com$tridium$platform$ntp$BNtpServer;
|
||||
static /* synthetic */ Class class$javax$baja$workbench$fieldeditor$BWbFieldEditor;
|
||||
|
||||
public void handleFocusChange(BFocusEvent bFocusEvent) {
|
||||
this.invoke(handleFocusChange, (BValue)bFocusEvent, null);
|
||||
}
|
||||
|
||||
public Type getType() {
|
||||
return TYPE;
|
||||
}
|
||||
|
||||
public BNtpServerVectorFE() {
|
||||
this(null);
|
||||
}
|
||||
|
||||
public BNtpServerVectorFE(Type type) {
|
||||
if (type != null) {
|
||||
this.feFactory = (BNtpServerFE)type.getInstance();
|
||||
}
|
||||
BFlowPane bFlowPane = new BFlowPane(BHalign.center);
|
||||
BToolBar bToolBar = new BToolBar();
|
||||
bFlowPane.add(null, (BValue)bToolBar, null);
|
||||
this.addCommand = new AddCommand();
|
||||
BButton bButton = new BButton(this.addCommand);
|
||||
bToolBar.add("add", (BValue)bButton, null);
|
||||
bButton.setButtonStyle(BButtonStyle.toolBar);
|
||||
this.deleteCommand = new DeleteCommand();
|
||||
bButton = new BButton(this.deleteCommand);
|
||||
bToolBar.add("delete", (BValue)bButton, null);
|
||||
bButton.setButtonStyle(BButtonStyle.toolBar);
|
||||
this.upCommand = new UpCommand();
|
||||
bButton = new BButton(this.upCommand);
|
||||
bToolBar.add("up", (BValue)bButton, null);
|
||||
bButton.setButtonStyle(BButtonStyle.toolBar);
|
||||
this.downCommand = new DownCommand();
|
||||
bButton = new BButton(this.downCommand);
|
||||
bToolBar.add("down", (BValue)bButton, null);
|
||||
bButton.setButtonStyle(BButtonStyle.toolBar);
|
||||
BGridPane bGridPane = new BGridPane(1);
|
||||
this.contentPane = new BGridPane(1);
|
||||
bGridPane.add(null, (BValue)this.contentPane);
|
||||
bGridPane.add(null, (BValue)bFlowPane);
|
||||
bGridPane.setHalign(BHalign.left);
|
||||
bGridPane.setColumnAlign(BHalign.center);
|
||||
this.setContent((BWidget)bGridPane);
|
||||
}
|
||||
|
||||
public void doValidate(Context context) throws Exception {
|
||||
BWidget[] bWidgetArray = this.contentPane.getChildWidgets();
|
||||
int n = this.header == null ? 0 : 1;
|
||||
HashSet<String> hashSet = new HashSet<String>();
|
||||
for (int i = n; i < bWidgetArray.length; ++i) {
|
||||
BNtpServerFE bNtpServerFE = (BNtpServerFE)bWidgetArray[i];
|
||||
bNtpServerFE.doValidate(context);
|
||||
String string = bNtpServerFE.getServerPropertyName(context);
|
||||
if (hashSet.contains(string)) {
|
||||
throw new LocalizableRuntimeException("platform", "NtpServerVectorFE.duplicateServer");
|
||||
}
|
||||
hashSet.add(string);
|
||||
}
|
||||
}
|
||||
|
||||
protected void doLoadValue(BObject bObject, Context context) throws Exception {
|
||||
try {
|
||||
BComplex bComplex;
|
||||
this.vector = (BNtpServerVector)bObject;
|
||||
this.vector.lease(Integer.MAX_VALUE);
|
||||
if (context != null && context.getFacet("fieldEditor") != null) {
|
||||
this.feFactory = (BNtpServerFE)BTypeSpec.make((String)context.getFacet("fieldEditor").toString()).getInstance();
|
||||
}
|
||||
if (!this.readonlyInitialized && (bComplex = this.vector.getParent()) != null) {
|
||||
this.setReadonly((bComplex.loadSlots().getFlags((Slot)this.vector.getPropertyInParent()) & 1) > 0);
|
||||
}
|
||||
this.contentPane.removeAll();
|
||||
this.header = this.getFeFactory().makeHeader();
|
||||
if (this.header != null) {
|
||||
this.contentPane.add(null, (BValue)this.header, 0);
|
||||
}
|
||||
bComplex = this.vector.loadSlots().getProperties();
|
||||
while (bComplex.next(class$com$tridium$platform$ntp$BNtpServer == null ? BNtpServerVectorFE.class$("com.tridium.platform.ntp.BNtpServer") : class$com$tridium$platform$ntp$BNtpServer)) {
|
||||
this.addElement((BNtpServer)bComplex.get());
|
||||
}
|
||||
}
|
||||
catch (Exception exception) {
|
||||
exception.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
protected BObject doSaveValue(BObject bObject, Context context) throws Exception {
|
||||
BNtpServerVector bNtpServerVector = (BNtpServerVector)bObject;
|
||||
bNtpServerVector.lease();
|
||||
bNtpServerVector.removeAll();
|
||||
BWidget[] bWidgetArray = this.contentPane.getChildWidgets();
|
||||
int n = this.header == null ? 0 : 1;
|
||||
String[] stringArray = new String[bWidgetArray.length - n];
|
||||
for (int i = n; i < bWidgetArray.length; ++i) {
|
||||
BNtpServer bNtpServer = (BNtpServer)((BWbFieldEditor)bWidgetArray[i]).saveValue(context);
|
||||
stringArray[i - n] = bNtpServer.getServerString();
|
||||
}
|
||||
bNtpServerVector.sync(stringArray);
|
||||
return bNtpServerVector;
|
||||
}
|
||||
|
||||
protected void doSetReadonly(boolean bl) {
|
||||
int n;
|
||||
this.readonlyInitialized = true;
|
||||
super.doSetReadonly(bl);
|
||||
this.deleteCommand.setEnabled(!bl && this.focusedEditor != null);
|
||||
this.addCommand.setEnabled(!bl);
|
||||
BWidget[] bWidgetArray = this.contentPane.getChildWidgets();
|
||||
for (int i = n = this.header == null ? 0 : 1; i < bWidgetArray.length; ++i) {
|
||||
((BWbFieldEditor)bWidgetArray[i]).setReadonly(bl);
|
||||
}
|
||||
}
|
||||
|
||||
protected BNtpServerFE getFeFactory() {
|
||||
if (this.feFactory == null) {
|
||||
this.feFactory = (BNtpServerFE)Sys.getRegistry().getAgents(this.vector.getElementType()).filter(AgentFilter.is((Type)BNtpServerFE.TYPE)).getDefault().getInstance();
|
||||
}
|
||||
return this.feFactory;
|
||||
}
|
||||
|
||||
public void addElement(BNtpServer bNtpServer) {
|
||||
BNtpServerFE bNtpServerFE = (BNtpServerFE)this.getFeFactory().getType().getInstance();
|
||||
if (this.header != null) {
|
||||
bNtpServerFE.useHeader(this.header);
|
||||
}
|
||||
if (bNtpServer != null) {
|
||||
bNtpServerFE.loadValue((BObject)bNtpServer);
|
||||
}
|
||||
this.contentPane.add(null, (BValue)bNtpServerFE, 0);
|
||||
bNtpServerFE.setReadonly(this.isReadonly());
|
||||
this.getContent().relayout();
|
||||
this.getContent().computePreferredSize();
|
||||
this.linkTo(null, (BComponent)bNtpServerFE, (Slot)BWbFieldEditor.focusEvent, (Slot)handleFocusChange);
|
||||
this.linkTo(null, (BComponent)bNtpServerFE, (Slot)BWbFieldEditor.pluginModified, (Slot)setModified);
|
||||
this.setModified();
|
||||
}
|
||||
|
||||
public void doHandleFocusChange(BFocusEvent bFocusEvent) {
|
||||
try {
|
||||
if (this.isReadonly()) {
|
||||
return;
|
||||
}
|
||||
if (bFocusEvent.getId() == 1005) {
|
||||
if (this.focusedEditor == bFocusEvent.getWidget()) {
|
||||
this.focusedEditor = null;
|
||||
}
|
||||
} else if (bFocusEvent.getId() == 1004) {
|
||||
this.focusedEditor = (BWbFieldEditor)bFocusEvent.getWidget();
|
||||
}
|
||||
this.setArrowCommandEnabledStates();
|
||||
this.deleteCommand.setEnabled(this.focusedEditor != null);
|
||||
}
|
||||
catch (Exception exception) {
|
||||
exception.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
public static Property[] getDynamicPropertiesArray(BObject bObject, boolean bl) {
|
||||
if (bl) {
|
||||
bObject.asComplex().loadSlots();
|
||||
}
|
||||
Property[] propertyArray = bObject.asComplex().getPropertiesArray();
|
||||
for (int i = 0; i < propertyArray.length; ++i) {
|
||||
if (propertyArray[i].isFrozen()) continue;
|
||||
Property[] propertyArray2 = new Property[propertyArray.length - i];
|
||||
System.arraycopy(propertyArray, i, propertyArray2, 0, propertyArray2.length);
|
||||
return propertyArray2;
|
||||
}
|
||||
return new Property[0];
|
||||
}
|
||||
|
||||
private void setArrowCommandEnabledStates() {
|
||||
BWidget[] bWidgetArray = this.contentPane.getChildWidgets();
|
||||
if (bWidgetArray.length > 1 && this.focusedEditor != null) {
|
||||
int n = this.header == null ? 0 : 1;
|
||||
this.upCommand.setEnabled(bWidgetArray[n] != this.focusedEditor);
|
||||
this.downCommand.setEnabled(bWidgetArray[bWidgetArray.length - 1] != this.focusedEditor);
|
||||
} else {
|
||||
this.upCommand.setEnabled(false);
|
||||
this.downCommand.setEnabled(false);
|
||||
}
|
||||
}
|
||||
|
||||
static /* synthetic */ Class class$(String string) {
|
||||
try {
|
||||
return Class.forName(string);
|
||||
}
|
||||
catch (ClassNotFoundException classNotFoundException) {
|
||||
throw new NoClassDefFoundError(classNotFoundException.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
private class DownCommand
|
||||
extends Command {
|
||||
public DownCommand() {
|
||||
super((BWidget)BNtpServerVectorFE.this, "", BImage.make((BIcon)BIcon.std((String)"arrowDown.png")), null, "");
|
||||
this.setEnabled(false);
|
||||
}
|
||||
|
||||
public CommandArtifact doInvoke() {
|
||||
try {
|
||||
Property[] propertyArray = BNtpServerVectorFE.getDynamicPropertiesArray((BObject)BNtpServerVectorFE.this.contentPane, true);
|
||||
for (int i = 0; i < propertyArray.length; ++i) {
|
||||
if (BNtpServerVectorFE.this.focusedEditor != BNtpServerVectorFE.this.contentPane.get(propertyArray[i])) continue;
|
||||
Property property = propertyArray[i];
|
||||
propertyArray[i] = propertyArray[i + 1];
|
||||
propertyArray[i + 1] = property;
|
||||
BNtpServerVectorFE.this.contentPane.reorder(propertyArray);
|
||||
BNtpServerVectorFE.this.setModified();
|
||||
BNtpServerVectorFE.this.setArrowCommandEnabledStates();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
catch (Throwable throwable) {
|
||||
CommandUtil.error(this, throwable);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
private class UpCommand
|
||||
extends Command {
|
||||
public UpCommand() {
|
||||
super((BWidget)BNtpServerVectorFE.this, "", BImage.make((BIcon)BIcon.std((String)"arrowUp.png")), null, "");
|
||||
this.setEnabled(false);
|
||||
}
|
||||
|
||||
public CommandArtifact doInvoke() {
|
||||
try {
|
||||
Property[] propertyArray = BNtpServerVectorFE.getDynamicPropertiesArray((BObject)BNtpServerVectorFE.this.contentPane, true);
|
||||
for (int i = 0; i < propertyArray.length; ++i) {
|
||||
if (BNtpServerVectorFE.this.focusedEditor != BNtpServerVectorFE.this.contentPane.get(propertyArray[i])) continue;
|
||||
Property property = propertyArray[i];
|
||||
propertyArray[i] = propertyArray[i - 1];
|
||||
propertyArray[i - 1] = property;
|
||||
BNtpServerVectorFE.this.contentPane.reorder(propertyArray);
|
||||
BNtpServerVectorFE.this.setModified();
|
||||
BNtpServerVectorFE.this.setArrowCommandEnabledStates();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
catch (Throwable throwable) {
|
||||
CommandUtil.error(this, throwable);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
private class AddCommand
|
||||
extends Command {
|
||||
public AddCommand() {
|
||||
super((BWidget)BNtpServerVectorFE.this, "", BImage.make((BIcon)BIcon.std((String)"add.png")), null, "");
|
||||
this.setEnabled(false);
|
||||
}
|
||||
|
||||
public CommandArtifact doInvoke() {
|
||||
BNtpServerVectorFE.this.addElement((BNtpServer)BNtpServerVectorFE.this.vector.getElementType().getInstance());
|
||||
BNtpServerVectorFE.this.setArrowCommandEnabledStates();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
private class DeleteCommand
|
||||
extends Command {
|
||||
public DeleteCommand() {
|
||||
super((BWidget)BNtpServerVectorFE.this, "", BImage.make((BIcon)BIcon.std((String)"delete.png")), null, "");
|
||||
this.setEnabled(false);
|
||||
}
|
||||
|
||||
public CommandArtifact doInvoke() {
|
||||
if (BNtpServerVectorFE.this.focusedEditor == null) {
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
SlotCursor slotCursor = BNtpServerVectorFE.this.contentPane.loadSlots().getProperties();
|
||||
while (slotCursor.next(class$javax$baja$workbench$fieldeditor$BWbFieldEditor == null ? BNtpServerVectorFE.class$("javax.baja.workbench.fieldeditor.BWbFieldEditor") : class$javax$baja$workbench$fieldeditor$BWbFieldEditor)) {
|
||||
if (slotCursor.get() != BNtpServerVectorFE.this.focusedEditor) continue;
|
||||
BNtpServerVectorFE.this.contentPane.remove(slotCursor.property());
|
||||
BNtpServerVectorFE.this.focusedEditor = null;
|
||||
BNtpServerVectorFE.this.deleteCommand.setEnabled(false);
|
||||
BNtpServerVectorFE.this.addCommand.setEnabled(true);
|
||||
BNtpServerVectorFE.this.setModified();
|
||||
BNtpServerVectorFE.this.setArrowCommandEnabledStates();
|
||||
BNtpServerVectorFE.this.relayout();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
catch (Throwable throwable) {
|
||||
CommandUtil.error(this, throwable);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,152 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* com.tridium.workbench.fieldeditors.BBooleanFE
|
||||
* javax.baja.data.BIDataValue
|
||||
* javax.baja.sys.BBoolean
|
||||
* javax.baja.sys.BComplex
|
||||
* javax.baja.sys.BComponent
|
||||
* javax.baja.sys.BEnumRange
|
||||
* javax.baja.sys.BFacets
|
||||
* javax.baja.sys.BObject
|
||||
* javax.baja.sys.BValue
|
||||
* javax.baja.sys.Context
|
||||
* javax.baja.sys.Slot
|
||||
* javax.baja.sys.Sys
|
||||
* javax.baja.sys.Type
|
||||
* javax.baja.ui.BTextField
|
||||
* javax.baja.ui.BWidget
|
||||
* javax.baja.ui.enums.BHalign
|
||||
* javax.baja.util.LexiconText
|
||||
*/
|
||||
package com.tridium.platform.ui.ntp;
|
||||
|
||||
import com.tridium.platform.ntp.BNtpMode;
|
||||
import com.tridium.platform.ui.ntp.BNtpServerFE;
|
||||
import com.tridium.platform.ui.util.BCoordinatedGridPane;
|
||||
import com.tridium.platform.ui.util.BLimitedFrozenEnumFE;
|
||||
import com.tridium.platform.ui.util.LabelUtil;
|
||||
import com.tridium.platform.win32.BNtpServerWin32;
|
||||
import com.tridium.workbench.fieldeditors.BBooleanFE;
|
||||
import javax.baja.data.BIDataValue;
|
||||
import javax.baja.sys.BBoolean;
|
||||
import javax.baja.sys.BComplex;
|
||||
import javax.baja.sys.BComponent;
|
||||
import javax.baja.sys.BEnumRange;
|
||||
import javax.baja.sys.BFacets;
|
||||
import javax.baja.sys.BObject;
|
||||
import javax.baja.sys.BValue;
|
||||
import javax.baja.sys.Context;
|
||||
import javax.baja.sys.Slot;
|
||||
import javax.baja.sys.Sys;
|
||||
import javax.baja.sys.Type;
|
||||
import javax.baja.ui.BTextField;
|
||||
import javax.baja.ui.BWidget;
|
||||
import javax.baja.ui.enums.BHalign;
|
||||
import javax.baja.util.LexiconText;
|
||||
|
||||
public class BNtpServerWin32FE
|
||||
extends BNtpServerFE {
|
||||
public static final Type TYPE = Sys.loadType((Class)(class$com$tridium$platform$ui$ntp$BNtpServerWin32FE == null ? (class$com$tridium$platform$ui$ntp$BNtpServerWin32FE = BNtpServerWin32FE.class$("com.tridium.platform.ui.ntp.BNtpServerWin32FE")) : class$com$tridium$platform$ui$ntp$BNtpServerWin32FE));
|
||||
protected BBooleanFE specialPollFe;
|
||||
protected BBooleanFE fallbackFe;
|
||||
protected BLimitedFrozenEnumFE peerModeFe;
|
||||
protected static final BFacets PEER_MODE_FACETS = BFacets.make((String)"range", (BIDataValue)BEnumRange.make(null, (int[])new int[]{0, 1, 3}, (String[])new String[]{BNtpMode.unspecified.getTag(), BNtpMode.symmetricActive.getTag(), BNtpMode.client.getTag()}));
|
||||
static /* synthetic */ Class class$com$tridium$platform$ui$ntp$BNtpServerWin32FE;
|
||||
|
||||
public Type getType() {
|
||||
return TYPE;
|
||||
}
|
||||
|
||||
public BNtpServerWin32FE() {
|
||||
this.grid = new BCoordinatedGridPane(4);
|
||||
this.grid.setHalign(BHalign.left);
|
||||
this.grid.setColumnAlign(BHalign.center);
|
||||
this.addressFe = new BTextField("", 32);
|
||||
this.grid.add(null, (BValue)this.addressFe);
|
||||
this.linkTo((BComponent)this.addressFe, (Slot)BTextField.textModified, (Slot)setModified);
|
||||
this.linkTo((BComponent)this.addressFe, (Slot)BTextField.actionPerformed, (Slot)actionPerformed);
|
||||
this.linkTo((BComponent)this.addressFe, (Slot)BTextField.focusEvent, (Slot)propagateFocusEvent);
|
||||
this.linkTo((BComponent)this.addressFe, (Slot)BTextField.keyEvent, (Slot)propagateKeyEvent);
|
||||
this.linkTo((BComponent)this.addressFe, (Slot)BTextField.mouseEvent, (Slot)propagateMouseEvent);
|
||||
this.specialPollFe = new BBooleanFE();
|
||||
this.grid.add(null, (BValue)this.specialPollFe);
|
||||
this.linkTo((BComponent)this.specialPollFe, (Slot)BBooleanFE.pluginModified, (Slot)setModified);
|
||||
this.linkTo((BComponent)this.specialPollFe, (Slot)BBooleanFE.focusEvent, (Slot)propagateFocusEvent);
|
||||
this.linkTo((BComponent)this.specialPollFe, (Slot)BBooleanFE.mouseEvent, (Slot)propagateMouseEvent);
|
||||
this.fallbackFe = new BBooleanFE();
|
||||
this.grid.add(null, (BValue)this.fallbackFe);
|
||||
this.linkTo((BComponent)this.fallbackFe, (Slot)BBooleanFE.pluginModified, (Slot)setModified);
|
||||
this.linkTo((BComponent)this.fallbackFe, (Slot)BBooleanFE.focusEvent, (Slot)propagateFocusEvent);
|
||||
this.linkTo((BComponent)this.fallbackFe, (Slot)BBooleanFE.mouseEvent, (Slot)propagateMouseEvent);
|
||||
this.peerModeFe = new BLimitedFrozenEnumFE();
|
||||
this.grid.add(null, (BValue)this.peerModeFe);
|
||||
this.peerModeFe.loadValue((BObject)BNtpMode.unspecified, (Context)PEER_MODE_FACETS);
|
||||
this.linkTo((BComponent)this.peerModeFe, (Slot)BLimitedFrozenEnumFE.pluginModified, (Slot)setModified);
|
||||
this.linkTo((BComponent)this.peerModeFe, (Slot)BLimitedFrozenEnumFE.focusEvent, (Slot)propagateFocusEvent);
|
||||
this.linkTo((BComponent)this.peerModeFe, (Slot)BLimitedFrozenEnumFE.mouseEvent, (Slot)propagateMouseEvent);
|
||||
this.setContent((BWidget)this.grid);
|
||||
}
|
||||
|
||||
public BWidget makeHeader() {
|
||||
BCoordinatedGridPane bCoordinatedGridPane = new BCoordinatedGridPane(4);
|
||||
bCoordinatedGridPane.setHalign(BHalign.left);
|
||||
bCoordinatedGridPane.setColumnAlign(BHalign.center);
|
||||
bCoordinatedGridPane.add(null, (BValue)LabelUtil.makeLabel(LexiconText.make((String)"platform", (String)"NtpPlatformService.address.label"), true));
|
||||
bCoordinatedGridPane.add(null, (BValue)LabelUtil.makeLabel(LexiconText.make((String)"platform", (String)"NtpPlatformServiceWin32.useSpecialPollInterval.label"), true));
|
||||
bCoordinatedGridPane.add(null, (BValue)LabelUtil.makeLabel(LexiconText.make((String)"platform", (String)"NtpPlatformServiceWin32.fallback.label"), true));
|
||||
bCoordinatedGridPane.add(null, (BValue)LabelUtil.makeLabel(LexiconText.make((String)"platform", (String)"NtpPlatformServiceWin32.peerMode.label"), true));
|
||||
return bCoordinatedGridPane;
|
||||
}
|
||||
|
||||
public String getServerPropertyName(Context context) throws Exception {
|
||||
BNtpServerWin32 bNtpServerWin32 = (BNtpServerWin32)this.getCurrentValue();
|
||||
return bNtpServerWin32.getPropertyName(bNtpServerWin32.getServerString(this.addressFe.getText(), ((BBoolean)this.specialPollFe.saveValue(context)).getBoolean(), ((BBoolean)this.fallbackFe.saveValue(context)).getBoolean(), (BNtpMode)this.peerModeFe.saveValue(context)));
|
||||
}
|
||||
|
||||
protected void doLoadValue(BObject bObject, Context context) throws Exception {
|
||||
BComplex bComplex;
|
||||
BNtpServerWin32 bNtpServerWin32 = (BNtpServerWin32)bObject;
|
||||
if (!this.readonlyInitialized && (bComplex = bNtpServerWin32.getParent()) != null) {
|
||||
this.setReadonly((bComplex.loadSlots().getFlags((Slot)bNtpServerWin32.getPropertyInParent()) & 1) > 0);
|
||||
}
|
||||
this.addressFe.setText(bNtpServerWin32.getAddress());
|
||||
this.specialPollFe.loadValue((BObject)BBoolean.make((boolean)bNtpServerWin32.getUseSpecialPollInterval()));
|
||||
this.fallbackFe.loadValue((BObject)BBoolean.make((boolean)bNtpServerWin32.getFallbackOnly()));
|
||||
this.peerModeFe.loadValue((BObject)bNtpServerWin32.getPeerMode(), (Context)PEER_MODE_FACETS);
|
||||
}
|
||||
|
||||
protected BObject doSaveValue(BObject bObject, Context context) throws Exception {
|
||||
BNtpServerWin32 bNtpServerWin32 = (BNtpServerWin32)bObject;
|
||||
bNtpServerWin32.setAddress(this.addressFe.getText());
|
||||
bNtpServerWin32.setUseSpecialPollInterval(((BBoolean)this.specialPollFe.saveValue(context)).getBoolean());
|
||||
bNtpServerWin32.setFallbackOnly(((BBoolean)this.fallbackFe.saveValue(context)).getBoolean());
|
||||
bNtpServerWin32.setPeerMode((BNtpMode)this.peerModeFe.saveValue(context));
|
||||
return bNtpServerWin32;
|
||||
}
|
||||
|
||||
public void setEnabled(boolean bl) {
|
||||
super.setEnabled(bl);
|
||||
this.specialPollFe.setEnabled(bl);
|
||||
this.fallbackFe.setEnabled(bl);
|
||||
this.peerModeFe.setEnabled(bl);
|
||||
}
|
||||
|
||||
protected void doSetReadonly(boolean bl) {
|
||||
super.doSetReadonly(bl);
|
||||
this.specialPollFe.setReadonly(bl);
|
||||
this.fallbackFe.setReadonly(bl);
|
||||
this.peerModeFe.setReadonly(bl);
|
||||
}
|
||||
|
||||
static /* synthetic */ Class class$(String string) {
|
||||
try {
|
||||
return Class.forName(string);
|
||||
}
|
||||
catch (ClassNotFoundException classNotFoundException) {
|
||||
throw new NoClassDefFoundError(classNotFoundException.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user