MCPcopy Create free account
hub / github.com/PCGen/pcgen / getSelectedClass

Method getSelectedClass

code/src/java/pcgen/gui2/tabs/ClassInfoTab.java:225–245  ·  view source on GitHub ↗
(Object eventSource)

Source from the content-addressed store, hash-verified

223 }
224
225 private PCClass getSelectedClass(Object eventSource)
226 {
227 Object data = null;
228 if (eventSource == availableTable.getSelectionModel())
229 {
230 data = availableTable.getSelectedObject();
231 }
232 else
233 {
234 int selectedRow = classTable.getSelectedRow();
235 if (selectedRow != -1)
236 {
237 data = classTable.getModel().getValueAt(selectedRow, 1);
238 }
239 }
240 if (data != null && data instanceof PCClass)
241 {
242 return (PCClass) data;
243 }
244 return null;
245 }
246
247 public void addCharacterLevels(CharacterFacade character, PCClass clazz)
248 {

Callers 3

valueChangedMethod · 0.45
createTransferableMethod · 0.45
valueChangedMethod · 0.45

Calls 3

getSelectedObjectMethod · 0.80
getValueAtMethod · 0.65
getModelMethod · 0.45

Tested by

no test coverage detected