- /**
- * Create a list of {@link ConfigItem}, one for each of the item in the
- * given {@link Bundle}.
- *
- * @param <E>
- * the type of {@link Bundle} to edit
- * @param type
- * a class instance of the item type to work on
- * @param bundle
- * the {@link Bundle} to sort through
- *
- * @return the list
- */
- static public <E extends Enum<E>> List<ConfigItem<E>> getItems(
- Class<E> type, Bundle<E> bundle) {
- List<ConfigItem<E>> list = new ArrayList<ConfigItem<E>>();
- for (E id : type.getEnumConstants()) {
- list.add(new ConfigItem<E>(type, bundle, id));
+ field.setSelected(state);
+
+ info.addReloadListener(new Runnable() {
+ @Override
+ public void run() {
+ field.setText(info.getString());
+ }
+ });
+
+ this.add(field, BorderLayout.CENTER);
+ } else {
+ final JTextField field = new JTextField();
+ field.setToolTipText(info.getDescription());
+ field.setText(info.getString());
+
+ info.addReloadListener(new Runnable() {
+ @Override
+ public void run() {
+ field.setText(info.getString());
+ }
+ });
+
+ this.add(field, BorderLayout.CENTER);