Ejemplo n.º 1
0
  public EquipmentModels(CharacterFacade character) {
    this.character = character;
    this.unequippedList = new UnequippedList(character);
    this.fullModel = new EquipmentTableModel(character);
    fullModel.setEquipmentList(character.getPurchasedEquipment());
    fullModel.setEquipmentSet(character.getEquipmentSetRef().getReference());
    this.unequippedModel = new EquipmentTableModel(character);
    unequippedModel.setEquipmentList(unequippedList);
    unequippedModel.setEquipmentSet(character.getEquipmentSetRef().getReference());
    this.equippedModel = new EquippedTableModel(character);

    selectedModel = fullModel;
    selectedView = EquipView.UNEQUIPPED;

    this.viewHandler = new EquipViewHandler();
    this.equipAction = new EquipAction();
    this.unequipAction = new UnequipAction();
    this.filterHandler = new EquipFilterHandler();
  }
Ejemplo n.º 2
0
  public void install(
      JComboBox equipBox,
      JTableEx eqTable,
      DisplayableFilter<? super CharacterFacade, ? super EquipmentFacade> filter,
      JTreeTable eqSetTable,
      JButton equipButton,
      JButton unequipButton) {
    this.equipViewBox = equipBox;
    this.equipmentTable = eqTable;
    this.equipmentSetTable = eqSetTable;
    viewHandler.install();
    equipButton.setAction(equipAction);
    unequipButton.setAction(unequipAction);
    equipAction.install();
    unequipAction.install();

    filter.setFilterHandler(filterHandler);
    fullModel.setFilter(filter);
    unequippedModel.setFilter(filter);
    equippedModel.setFilter(filter);
  }