use of gmgen.plugin.InitHolderList in project pcgen by PCGen.
the class InitiativePlugin method handleInitHolderListSendMessage.
/**
* <p>
* Handles an {@code InitHolderListSendMessage} by addomg all new
* combatants to the views list.
* </p>
*
* @param message
*/
private void handleInitHolderListSendMessage(TransmitInitiativeValuesBetweenComponentsMessage message) {
if (message.getSource() != this) {
InitHolderList cl = message.getInitHolderList();
for (InitHolder iH : cl) {
theView.addInitHolder(iH);
}
theView.refreshTable();
}
}
use of gmgen.plugin.InitHolderList in project pcgen by PCGen.
the class GMGenMessageHandler method handleInitHolderListSendMessage.
private void handleInitHolderListSendMessage(TransmitInitiativeValuesBetweenComponentsMessage message) {
InitHolderList list = message.getInitHolderList();
for (int i = 0; i < list.size(); i++) {
InitHolder iH = list.get(i);
if (iH instanceof PcgCombatant) {
//TODO: Resolve against the current PC list and add any new characters.
PcgCombatant pcg = (PcgCombatant) iH;
PlayerCharacter aPC = pcg.getPC();
Globals.getPCList().add(aPC);
aPC.setDirty(true);
// addPCTab(aPC);
}
}
}
use of gmgen.plugin.InitHolderList in project pcgen by PCGen.
the class EncounterPlugin method removeAll.
private void removeAll() {
theModel.removeAllElements();
theList = new InitHolderList();
updateUI();
}
use of gmgen.plugin.InitHolderList in project pcgen by PCGen.
the class EncounterPlugin method start.
/**
* Starts the plugin, registering itself with the {@code TabAddMessage}.
*/
@Override
public void start(PCGenMessageHandler mh) {
messageHandler = mh;
theModel = new EncounterModel();
theView = new EncounterView();
theRaces = new RaceModel();
theList = new InitHolderList();
createView();
messageHandler.handleMessage(new RequestAddTabToGMGenMessage(this, getLocalizedName(), getView()));
initMenus();
}
Aggregations