MCPcopy Create free account
hub / github.com/boazy/TWEditorEnhanced / examineAvailableItem

Method examineAvailableItem

src/main/java/EquipPanel.java:144–166  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers 1

actionPerformedMethod · 0.95

Calls 3

examineItemMethod · 0.95
getItemNameMethod · 0.95
getFieldListMethod · 0.95

Tested by

no test coverage detected