Search in sources :

Example 1 with DataSetFacade

use of pcgen.facade.core.DataSetFacade in project pcgen by PCGen.

the class PCGenFrame method createNewCharacter.

/**
	 * 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
	 */
private void createNewCharacter(File file) {
    DataSetFacade data = getLoadedDataSetRef().get();
    CharacterFacade character = CharacterManager.createNewCharacter(this, data);
    //it is first displayed
    if (file != null) {
        character.setFile(file);
    }
    //Because CharacterManager adds the new character to the character
    //list before it returns, it is not necessary to update the character
    //tabs since they will catch that event before the call to
    //setSelectedCharacter is called
    setSelectedCharacter(character);
}
Also used : DataSetFacade(pcgen.facade.core.DataSetFacade) CharacterFacade(pcgen.facade.core.CharacterFacade)

Aggregations

CharacterFacade (pcgen.facade.core.CharacterFacade)1 DataSetFacade (pcgen.facade.core.DataSetFacade)1