Package beans.serializable

Examples of beans.serializable.Skill


            statement.setString(1, name);
           
            set = statement.executeQuery();
           
            if (set.next()) {
                final Skill skill = getFromRowSet(set);
                return skill;
            } else {
                return null;
            }
        } catch (final SQLException ex) {
View Full Code Here


            statement = Database.getStatement("select * from "+TABLE_NAME);
           
            set = statement.executeQuery();
           
            while (set.next()) {
                final Skill skill = getFromRowSet(set);
                skills.add(skill);
            }
            return skills;
        } catch (final SQLException ex) {
            Logger.getLogger(SkillControl.class.getName()).log(Level.SEVERE, null, ex);
View Full Code Here

    private static Skill getFromRowSet(final ResultSet set) {
        final ChangeStatutControl changeStatutControl = new ChangeStatutControl();
        final CostControl costControl = new CostControl();
       
        try {
            final Skill skill = new Skill();
            skill.setName(set.getString(NAME));
            skill.setDescription(set.getString(DESCRIPTION));
            skill.setChangeStatut(changeStatutControl.getChangeStatut(skill.getName(), TABLE_NAME));
            skill.setCost(costControl.getCost(skill.getName(), TABLE_NAME));
            skill.setTarget(Target.valueOf(set.getString(TARGET)));
            skill.setUse(Utilization.valueOf(set.getString(USE)));
            return skill;
        } catch (SQLException ex) {
            Logger.getLogger(SkillControl.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        }
View Full Code Here

        final String sName = name.getText();
        final String sDescr = description.getText();
        final Target sTarget = (Target)target.getSelectedItem();
        final Utilization sUse = (Utilization)use.getSelectedItem();
        //TODO : rajouter nombre de tour
        final Skill skill = new Skill (sName, sDescr, sTarget, listChangeStatut, cost, sUse, 1);
        guiModel.initSkillPopUpResponse(skill);
        this.reset();
    }//GEN-LAST:event_SaveJButtonActionPerformed
View Full Code Here

        if (imageListScreen != null) {
            graphic.drawImage(listScreen.getImage(), 20, 50, null);
        }

        //Afficher la description de la compétences courant
        Skill currentSkill = skills.getCurrentSkill();
        //Affichage de la description
        graphic.drawImage(Alphabet.createString(currentSkill.getDescription().toString(), image.getWidth()), 20, image.getHeight() - 200, null);
        //Affichage de la cible
        graphic.drawImage(Alphabet.createString("Cible : " + currentSkill.getTarget().toString(), image.getWidth()), 20, image.getHeight() - 150, null);
        //Affichage de la cible
        graphic.drawImage(Alphabet.createString("Cout : " + skills.displayCout(currentSkill.getCost()), image.getWidth()), 20, image.getHeight() - 100, null);

        graphic.dispose();
        return image;
    }
View Full Code Here

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void acceptActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_acceptActionPerformed
        final Skill skill = (Skill) skillBox.getSelectedItem();
        choiceTemplate.addChoiceSkill(skill);
        this.dispose();
    }//GEN-LAST:event_acceptActionPerformed
View Full Code Here

        //Réinitialiser la liste de sorts
        skillList.clear();
        //skillList.addAll(InventorySkillModel.fighterListModel.get(currentFighter).getStat().getPermanentStats().getSkills());
       
        skillList.add(new Skill("Encourager", "Augmenter la FOR de CHA*2", Target.GROUP, null, null, Utilization.IN_BATTLE, 1));
        skillList.add(new Skill("Moquerie", "Diminuer la DEF de CHA*2, mais attire ses coups", Target.ENEMY, null, null, Utilization.IN_BATTLE, 1));
        ArrayList<ChangeStatut> changes = new ArrayList<ChangeStatut>();
        changes.add(new ChangeStatut(Type.HEAL, Element.NONE, 2, Stat.CHARISMA, Stat.HP));
        skillList.add(new Skill("Prière", "Soigne CHA*2 HP", Target.GROUP, changes, null, Utilization.TWICE, 1));

        //Pour chaque sort dans la liste des sorts du combattant
        for (final Skill spell : skillList) {
            //Ajouter le nom du sort à la liste à afficher
            list.add(spell.getName());
View Full Code Here

TOP

Related Classes of beans.serializable.Skill

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.