/** Initializes the controller class. */ @Override public void initialize(URL url, ResourceBundle rb) { logger.entry(); OkButton.disableProperty() .bind( Bindings.isEmpty(FederationExecutionName.textProperty()) .or(Bindings.isEmpty(FederateType.textProperty()))); logger.exit(); }
@FXML private void Ok_click(ActionEvent event) { logger.entry(); LogEntry log = new LogEntry("6.16", "Local Delete Object Instance service"); try { ObjectInstanceHandle instanceHandle = rtiAmb .getObjectInstanceHandleFactory() .decode( ByteBuffer.allocate(4) .putInt(Integer.parseInt(ObjectInstanceDesignator.getText())) .array(), 0); log.getSuppliedArguments() .add( new ClassValuePair( "Object instance designator", ObjectInstanceHandle.class, instanceHandle.toString())); rtiAmb.localDeleteObjectInstance(instanceHandle); log.setDescription("Local Object instance deleted successfully"); log.setLogType(LogEntryType.REQUEST); } catch (FederateNotExecutionMember | NotConnected | NumberFormatException | CouldNotDecode | RTIinternalError | OwnershipAcquisitionPending | FederateOwnsAttributes | ObjectInstanceNotKnown | SaveInProgress | RestoreInProgress ex) { log.setException(ex); log.setLogType(LogEntryType.ERROR); logger.log(Level.ERROR, ex.getMessage(), ex); } catch (Exception ex) { log.setException(ex); log.setLogType(LogEntryType.FATAL); logger.log(Level.FATAL, ex.getMessage(), ex); } logEntries.add(log); ((Stage) OkButton.getScene().getWindow()).close(); logger.exit(); }
@FXML private void Cancel_click(ActionEvent event) { logger.entry(); ((Stage) OkButton.getScene().getWindow()).close(); logger.exit(); }
/** Initializes the controller class. */ @Override public void initialize(URL url, ResourceBundle rb) { logger.entry(); OkButton.disableProperty().bind(ObjectInstanceDesignator.textProperty().isEmpty()); logger.exit(); }