Example #1
0
 /**
  * Dessine le JPanel en listant les proglets
  *
  * @see ProgletEngine
  * @return Le JPanel dessiné
  */
 private static JPanel shortcutPanel() {
   JPanel shortcuts = new JPanel();
   int i = 0;
   for (Proglet proglet : ProgletEngine.getInstance().getProglets()) i++;
   shortcuts.setLayout(new GridLayout(0, (i / 3) == 0 ? 1 : (i / 3)));
   for (Proglet proglet : ProgletEngine.getInstance().getProglets())
     shortcuts.add(
         JVSStartPanel.createShortcut(
             Macros.getIcon(proglet.getIcon()),
             proglet.getName(),
             proglet.getTitle(),
             new ProgletLoader(proglet.getName())));
   return shortcuts;
 }
Example #2
0
 public static JVSStartPanel getInstance() {
   if (jvssp == null) {
     jvssp = new JVSStartPanel(JVSStartPanel.shortcutPanel());
   }
   return jvssp;
 }