public void setModel(SupaplexModel model) { this.model = model; list.setModel(model); levelComponent.setModel(model); palette.setModel(model); model.addListener(new SML()); }
JPanel createLevelPanel() { JPanel p = new JPanel(new BorderLayout()); JScrollPane sp = new JScrollPane(levelComponent); sp.setPreferredSize(new Dimension(400, 300)); p.add(sp, BorderLayout.CENTER); JPanel p1 = new JPanel(new BorderLayout()); p.add(p1, BorderLayout.SOUTH); JPanel p2 = new JPanel(new BorderLayout()); JComponent oc = levelOptions.createPanel(); p2.add(oc, BorderLayout.NORTH); p2.add(new JPanel(), BorderLayout.CENTER); p1.add(p2, BorderLayout.CENTER); JComponent pc = palette.createPanel(); p1.add(pc, BorderLayout.EAST); return p; }