creates a new character and sets its file if possible then sets the character as the currently selected character @param file the File for this character
(File file)
| 979 | * @param file the File for this character |
| 980 | */ |
| 981 | public void createNewCharacter(File file) |
| 982 | { |
| 983 | GuiAssertions.assertIsSwingThread(); |
| 984 | DataSetFacade data = getLoadedDataSetRef().get(); |
| 985 | CharacterFacade character = CharacterManager.createNewCharacter(this, data); |
| 986 | //This is called before the we set it as the selected character so |
| 987 | //the InfoTabbedPane can catch any character specific properties when |
| 988 | //it is first displayed |
| 989 | if (file != null) |
| 990 | { |
| 991 | character.setFile(file); |
| 992 | } |
| 993 | //Because CharacterManager adds the new character to the character |
| 994 | //list before it returns, it is not necessary to update the character |
| 995 | //tabs since they will catch that event before the call to |
| 996 | //setCharacter is called |
| 997 | setCharacter(character); |
| 998 | } |
| 999 | |
| 1000 | /** |
| 1001 | * Loads a character from a file. Any sources that are required for |
no test coverage detected