Search in sources :

Example 1 with EquipmentListCellKeySelectionManager

use of megameklab.com.util.EquipmentListCellKeySelectionManager in project megameklab by MegaMek.

the class EquipmentView method loadEquipmentCombo.

private void loadEquipmentCombo() {
    equipmentCombo.setRenderer(new EquipmentListCellRenderer(getBattleArmor()));
    equipmentCombo.setKeySelectionManager(new EquipmentListCellKeySelectionManager());
    equipmentCombo.removeAllItems();
    equipmentTypes = new Vector<EquipmentType>();
    for (EquipmentType eq : masterEquipmentList) {
        if (UnitUtil.isLegal(getBattleArmor(), eq)) {
            equipmentTypes.add(eq);
            equipmentCombo.addItem(eq);
        }
    }
}
Also used : EquipmentListCellKeySelectionManager(megameklab.com.util.EquipmentListCellKeySelectionManager) EquipmentListCellRenderer(megameklab.com.util.EquipmentListCellRenderer) EquipmentType(megamek.common.EquipmentType)

Example 2 with EquipmentListCellKeySelectionManager

use of megameklab.com.util.EquipmentListCellKeySelectionManager in project megameklab by MegaMek.

the class EquipmentView method loadEquipmentCombo.

private void loadEquipmentCombo() {
    equipmentCombo.setRenderer(new EquipmentListCellRenderer(getTank()));
    equipmentCombo.setKeySelectionManager(new EquipmentListCellKeySelectionManager());
    equipmentCombo.removeAllItems();
    equipmentTypes = new Vector<EquipmentType>();
    for (EquipmentType eq : masterEquipmentList) {
        if (UnitUtil.isLegal(getTank(), eq)) {
            equipmentTypes.add(eq);
            equipmentCombo.addItem(eq);
        }
    }
}
Also used : EquipmentListCellKeySelectionManager(megameklab.com.util.EquipmentListCellKeySelectionManager) EquipmentListCellRenderer(megameklab.com.util.EquipmentListCellRenderer) EquipmentType(megamek.common.EquipmentType)

Aggregations

EquipmentType (megamek.common.EquipmentType)2 EquipmentListCellKeySelectionManager (megameklab.com.util.EquipmentListCellKeySelectionManager)2 EquipmentListCellRenderer (megameklab.com.util.EquipmentListCellRenderer)2