});
}
private void updateFromSelectedDemoChanged() {
JComponent demoContainer = getComponentByConstraint("demo");
Demo demo = getDemo();
if (demo != null) {
JComponent demoPanel = runningDemoCache.get(demo.getName());
if (demoPanel == null || demo.getDemoComponent() == null) {
demo.startInitializing();
demoPanel = createDemoPanel(demo);
if (demoPanel != null) {
runningDemoCache.put(demo.getName(), demoPanel);
}
}
if (demoPanel != null) {
demoContainer.removeAll(); //(currentDemoPanel);
demoContainer.add(demoPanel, BorderLayout.CENTER);
demoContainer.revalidate();
demoContainer.repaint();
multiSplitLayout.layoutByWeight(getMainFrame().getContentPane());
}
}
codeViewer.setSourceFiles(demo != null?
demo.getSourceFiles() : null);
}