+ }));
+
+ JScrollPane scroll = new JScrollPane(main);
+ scroll.getVerticalScrollBar().setUnitIncrement(16);
+
+ this.add(scroll, BorderLayout.CENTER);
+ this.add(buttons, BorderLayout.SOUTH);
+ }
+
+ private void addItem(JPanel main, MetaInfo<E> item, int nhgap) {
+ if (item.isGroup()) {
+ JPanel bpane = new JPanel(new BorderLayout());
+ bpane.setBorder(new TitledBorder(item.getName()));
+ JPanel pane = new JPanel();
+ pane.setBorder(new EmptyBorder(5, 5, 5, 5));
+ pane.setLayout(new BoxLayout(pane, BoxLayout.Y_AXIS));
+
+ String info = item.getDescription();
+ info = StringUtils.justifyTexts(info, 100);
+ if (!info.isEmpty()) {
+ info = info + "\n";
+ JTextArea text = new JTextArea(info);
+ text.setWrapStyleWord(true);
+ text.setOpaque(false);
+ text.setForeground(new Color(100, 100, 180));
+ text.setEditable(false);
+ pane.add(text);
+ }
+
+ for (MetaInfo<E> subitem : item) {
+ addItem(pane, subitem, nhgap + 11);
+ }
+ bpane.add(pane, BorderLayout.CENTER);
+ main.add(bpane);
+ } else {
+ items.add(item);
+ main.add(ConfigItem.createItem(item, nhgap));
+ }