Package com.kolakcc.loljclient.model

Examples of com.kolakcc.loljclient.model.Champion


  public Component getListCellRendererComponent(
      JList<? extends RecentGame> list, RecentGame value, int index,
      boolean isSelected, boolean cellHasFocus) {
    JPanel ret = new JPanel(new BorderLayout());
    ret.setBackground(value.getStatistics().containsKey("WIN") ? Color.green : Color.red);
    Champion champion = Champion.getChampionFromID(value.getChampionID());
    try {
      ret.add(new ChampionBox(champion), BorderLayout.WEST);
    } catch (Exception e) {
      e.printStackTrace();
    }
    ret.add(new JLabel(String.format("<html>%s %d/%d/%d<br>%s", champion.getDisplayName(), value.getStatistic("CHAMPIONS_KILLED"), value.getStatistic("NUM_DEATHS"), value.getStatistic("ASSISTS"), LocaleMessages.leagueTermsMessages.getString(value.getMap().toString()))),BorderLayout.CENTER);
    return ret;
  }
View Full Code Here


    ret.setOpaque(false);
   
    if ((value.getChampionSelection() != null) && (value.getChampionSelection().getChampionID() != 0)) {
      JPanel centerPanel = new JPanel(new BorderLayout());
      centerPanel.setOpaque(false);
      Champion champion = Champion.getChampionFromID(value.getChampionSelection().getChampionID());
      try {
        ChampionBox cb = new ChampionBox(champion);
        cb.setSize(60, 60);
        centerPanel.add(cb,BorderLayout.WEST);
      } catch (Exception e) {
        e.printStackTrace();
      }
      JPanel selectionPanel = new JPanel(new BorderLayout());
      selectionPanel.setOpaque(false);
      selectionPanel.add(new JLabel(champion.getDisplayName()), BorderLayout.NORTH);
     
      JPanel spellsPanel = new JPanel(new GridLayout(2,1));
      JLabel spell1Panel = new JLabel(SummonerSpell.getSpell(value.getChampionSelection().getSpell1ID()).displayName);
      spellsPanel.add(spell1Panel);
      JLabel spell2Panel = new JLabel(SummonerSpell.getSpell(value.getChampionSelection().getSpell2ID()).displayName);
View Full Code Here

        int id = StartupClass.Client.invoke("inventoryService",
            "getAvailableChampions", new Object[] {});
        TypedObject championData = StartupClass.Client.getResult(id)
            .getTO("data");
        for (TypedObject champion : TOUtils.ArrayToTOArray(championData.getArray("body"))) {
          Champion fromDatabase = Champion.getChampionFromID(champion.getInt("championId"));
          fromDatabase.setOwned(champion.getBool("owned")); // TODO: model all champion fields
          fromDatabase.setFreeToPlay(champion.getBool("freeToPlay"));
          this.publish(fromDatabase);
        }
        return null;
      }
 
View Full Code Here

TOP

Related Classes of com.kolakcc.loljclient.model.Champion

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.