use of com.google.gwt.dom.client.Style.Display.NONE in project Zong by Xenoage.
the class WebApp method openFile.
private void openFile(String filePath) {
// show loading, hide score
if (loadingPanel != null)
loadingPanel.getStyle().setDisplay(BLOCK);
canvas.setVisible(false);
// load score
platformUtils().openFileAsync(filePath).thenAsync(scoreStream -> new MusicXmlScoreDocFileReader(scoreStream, null).read()).thenAsync(scoreDoc -> {
WebApp.this.scoreDoc = scoreDoc;
return platformUtils().openFileAsync("data/layout/default.xml");
}).thenDo(testXmlStream -> {
LayoutSettings layoutSettings;
try {
layoutSettings = LayoutSettingsReader.read(testXmlStream);
} catch (IOException ex) {
throw new RuntimeException(ex);
}
Size2f areaSize = new Size2f(150, 10000);
SymbolPool symbolPool = zongPlatformUtils().getSymbolPool();
Context context = new Context(scoreDoc.getScore(), symbolPool, layoutSettings);
Target target = Target.completeLayoutTarget(new ScoreLayoutArea(areaSize));
paintLayout();
// show score, hide loading
canvas.setVisible(true);
if (loadingPanel != null)
loadingPanel.getStyle().setDisplay(NONE);
}).onError(ex -> consoleLog("Error: " + ex.toString()));
}
Aggregations