use of cbit.vcell.message.server.ServiceSpec.ServiceStartupType in project vcell by virtualcell.
the class AddNewServiceDialog method getStartupCombo.
private javax.swing.JComboBox getStartupCombo() {
if (ivjStartupCombo == null) {
try {
ivjStartupCombo = new javax.swing.JComboBox();
for (ServiceStartupType serviceStartupType : ServiceStartupType.values()) {
ivjStartupCombo.addItem(serviceStartupType.getDescription());
}
ivjStartupCombo.setSelectedIndex(0);
// user code begin {1}
// user code end
} catch (java.lang.Throwable ivjExc) {
// user code begin {2}
// user code end
handleException(ivjExc);
}
}
return ivjStartupCombo;
}
use of cbit.vcell.message.server.ServiceSpec.ServiceStartupType in project vcell by virtualcell.
the class AddNewServiceDialog method getServiceSpec.
/**
* Insert the method's description here.
* Creation date: (8/22/2003 4:07:31 PM)
* @return cbit.vcell.messaging.admin.VCellServiceConfig
*/
public ServiceSpec getServiceSpec() {
VCellServerID site = VCellServerID.getServerID(getSiteField().getText());
ServiceType stype = (ServiceType) getTypeCombo().getSelectedItem();
int ordinal = 0;
try {
ordinal = Integer.parseInt("" + getOrdinalCombo().getSelectedItem());
} catch (NumberFormatException ex) {
throw new RuntimeException("Ordinal must be a number!");
}
ServiceStartupType startup = ServiceStartupType.fromDescription((String) getStartupCombo().getSelectedItem());
int memoryMB = Integer.parseInt(getMemoryMBField().getText());
return new ServiceSpec(site, stype, ordinal, startup, memoryMB);
}
Aggregations