use of org.phoebus.logbook.olog.ui.write.LogEntryEditorStage in project phoebus by ControlSystemStudio.
the class LogEntryEditorStageDemo method start.
@Override
public void start(Stage primaryStage) throws Exception {
StackPane root = new StackPane();
Scene scene = new Scene(root);
primaryStage.setScene(scene);
new LogEntryEditorStage(root, new OlogLog()).show();
}
use of org.phoebus.logbook.olog.ui.write.LogEntryEditorStage in project phoebus by ControlSystemStudio.
the class LogEntryDisplayController method reply.
@FXML
public void reply() {
LogEntry logEntry = logEntryProperty.get();
OlogLog ologLog = new OlogLog();
ologLog.setTitle(logEntry.getTitle());
ologLog.setTags(logEntry.getTags());
ologLog.setLogbooks(logEntry.getLogbooks());
ologLog.setProperties(logEntry.getProperties());
ologLog.setLevel(logEntry.getLevel());
// Show a new editor dialog. When user selects to save the reply entry, update the original log entry
// to ensure that it contains the log group property.
new LogEntryEditorStage(DockPane.getActiveDockPane(), ologLog, logEntry, null).show();
}
use of org.phoebus.logbook.olog.ui.write.LogEntryEditorStage in project phoebus by ControlSystemStudio.
the class SendLogbookAction method submitLogEntry.
private void submitLogEntry(final Node parent, final String title, final String body, final File image_file) {
OlogLog ologLog = new OlogLog();
ologLog.setTitle(title != null ? title : "");
ologLog.setDescription(body != null ? body : "");
if (image_file != null) {
try {
final Attachment attachment = AttachmentImpl.of(image_file, "image", false);
List<Attachment> attachments = new ArrayList<>();
attachments.add(attachment);
ologLog.setAttachments(attachments);
} catch (FileNotFoundException ex) {
logger.log(Level.WARNING, "Cannot attach " + image_file, ex);
}
}
new LogEntryEditorStage(parent, ologLog).show();
}
Aggregations