@Override public Integer getValue() { QuestNode node = (QuestNode) getSelectedItem(); if (node != null) { return node.getIntID(); } return -1; }
@Override public Component getListCellRendererComponent( JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus); QuestNode node = (QuestNode) value; if (node != null) { super.setIcon(node.getIcon(false)); super.setText(node.toString()); } return this; }