rendered paste bodypublic void update(){
((MMenuBar) this.getJMenuBar()).updateMenu();
if(engine.inModelOpenState()){
System.out.println("Open");
JPanel contentPane = new JPanel(new BorderLayout());
if(workspace==null){
workspace = new MWorkspacePanel();
contentPane.add(workspace, BorderLayout.CENTER);
}
if(loggerPanel==null){
loggerPanel = new LoggerPanel();
contentPane.add(loggerPanel, BorderLayout.SOUTH);
}
if(treePanel==null){
treePanel = new MTreePanel();
eastPanel = new JSplitPane(JSplitPane.VERTICAL_SPLIT);
eastPanel.add(treePanel);
contentPane.add(eastPanel, BorderLayout.EAST);
}
contentPane.setOpaque(true);
this.setContentPane(contentPane);
contentPane.repaint();
}else{//inModelClosedState
System.out.println("Closed");
workspace = null;
loggerPanel = null;
shapesbar = null;
treePanel = null;
eastPanel = null;
propertyEditor = null;
//this.getContentPane().removeAll();
//this.getContentPane().repaint();
}
}