コード例 #1
0
 void onSelectionChanged() {
   int i = list.list.getSelectedIndex();
   SupaplexLevel level = model.getLevel(i);
   levelOptions.setLevel(level);
   levelComponent.setLevel(level);
   model.setSelectedLevelIndex(i);
 }
コード例 #2
0
 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;
 }