()
| 142 | } |
| 143 | |
| 144 | private void examineAvailableItem() |
| 145 | throws DBException, IOException |
| 146 | { |
| 147 | int count = this.availField.getSelectionCount(); |
| 148 | if (count == 0) { |
| 149 | JOptionPane.showMessageDialog(this, "You must select an item to examine", "No item selected", 0); |
| 150 | |
| 151 | return; |
| 152 | } |
| 153 | |
| 154 | TreePath treePath = this.availField.getSelectionPath(); |
| 155 | DefaultMutableTreeNode node = (DefaultMutableTreeNode)treePath.getLastPathComponent(); |
| 156 | Object userObject = node.getUserObject(); |
| 157 | if (!(userObject instanceof ItemTemplate)) { |
| 158 | JOptionPane.showMessageDialog(this, "You must select an item to examine", "No item selected", 0); |
| 159 | |
| 160 | return; |
| 161 | } |
| 162 | |
| 163 | ItemTemplate template = (ItemTemplate)userObject; |
| 164 | |
| 165 | examineItem(template.getItemName(), template.getFieldList()); |
| 166 | } |
| 167 | |
| 168 | private void examineItem(String label, DBList fieldList) |
| 169 | throws DBException, IOException |
no test coverage detected