Package lu.kbra.modelizer_next.document
Class SwingDocumentLoadHandler
java.lang.Object
lu.kbra.modelizer_next.document.SwingDocumentLoadHandler
- All Implemented Interfaces:
DocumentLoadHandler
Document load handler that reports failures through Swing UI components.
-
Constructor Summary
ConstructorsConstructorDescriptionSwingDocumentLoadHandler(Component parent) Creates a Swing document load handler instance. -
Method Summary
Modifier and TypeMethodDescriptionbooleanconfirmLegacyImport(File file) Confirms whether the legacy import should continue.booleanconfirmNewerVersion(String fileVersion, String appVersion) Confirms whether the newer version should continue.voidReports the error.
-
Constructor Details
-
SwingDocumentLoadHandler
Creates a Swing document load handler instance.- Parameters:
parent- parent component used for dialog ownership
-
-
Method Details
-
confirmLegacyImport
Confirms whether the legacy import should continue.- Specified by:
confirmLegacyImportin interfaceDocumentLoadHandler- Parameters:
file- file to read or write- Returns:
truewhen the condition is met; otherwisefalse
-
confirmNewerVersion
Confirms whether the newer version should continue.- Specified by:
confirmNewerVersionin interfaceDocumentLoadHandler- Parameters:
fileVersion- text value for file versionappVersion- text value for application version- Returns:
truewhen the condition is met; otherwisefalse
-
error
Reports the error.- Specified by:
errorin interfaceDocumentLoadHandler- Parameters:
message- message shown to the caller or userex- exception that caused the failure
-