コード例 #1
0
 private JPanel getNumericLevels(EnumLevelList ll) {
   JPanel levelPanel = new JPanel(new FlowLayout(FlowLayout.LEFT));
   levelPanel.setBackground(Color.white);
   String labelString =
       "[ "
           + ll.getMinAsString()
           + " to "
           + ll.getMaxAsString()
           + " ] Increment by "
           + ll.getIncrementAsString();
   JLabel levelLabel = new JLabel(labelString);
   levelLabel.setForeground(ARMY_GREEN);
   add(levelLabel);
   return levelPanel;
 }
コード例 #2
0
 private JPanel getStringLevels(EnumLevelList ll) {
   JPanel levelPanel = new JPanel(new FlowLayout(FlowLayout.LEFT));
   levelPanel.setBackground(Color.white);
   levelPanel.setForeground(Color.black);
   Iterator i = ll.getLevelIterator();
   JLabel levelLabel = null;
   EnumLevel level = null;
   while (i != null && i.hasNext()) {
     level = (EnumLevel) i.next();
     levelLabel = new JLabel(level.toString() + "  | ");
     levelLabel.setForeground(ARMY_GREEN);
     levelPanel.add(levelLabel);
     // levelPanel.add(new JSeparator(SwingConstants.HORIZONTAL));
   }
   return levelPanel;
 }