- final JButton colorWheel = new JButton();
- colorWheel.setIcon(getIcon(17, info.getColor(true)));
- colorWheel.addActionListener(new ActionListener() {
- @Override
- public void actionPerformed(ActionEvent e) {
- Color initialColor = new Color(info.getColor(true), true);
- Color newColor = JColorChooser.showDialog(ConfigItem.this,
- info.getName(), initialColor);
- if (newColor != null) {
- info.setColor(newColor.getRGB());
- field.setText(info.getString(false));
- colorWheel.setIcon(getIcon(17, info.getColor(true)));
- }
- }
- });
- pane.add(colorWheel, BorderLayout.WEST);
- pane.add(field, BorderLayout.CENTER);
- this.add(pane, BorderLayout.CENTER);
+ /**
+ * Get the information from the {@link MetaInfo} in the subclass preferred
+ * format.
+ *
+ * @param item
+ * the item number to get for an array of values, or -1 to get
+ * the whole value (has no effect if {@link MetaInfo#isArray()}
+ * is FALSE)
+ *
+ * @return the information in the subclass preferred format
+ */
+ protected Object getFromInfo(@SuppressWarnings("unused") int item) {
+ // Not used by the main class, only the subclasses
+ return null;
+ }