Package beans.serializable

Examples of beans.serializable.Spell


        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 Spell spell = new Spell (sName, sDescr, sTarget, listChangeStatut, cost, sUse, 1);
        guiModel.initSpellPopUpResponse(spell);
        this.reset();
    }//GEN-LAST:event_SaveJButtonActionPerformed
View Full Code Here


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

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

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

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

        //Afficher la description du sort courant
        Spell currentSpell = spells.getCurrentSpell();
        //Affichage de la description
        graphic.drawImage(Alphabet.createString(currentSpell.getDescription().toString(), image.getWidth()), 20, image.getHeight() - 200, null);
        //Affichage de la cible
        graphic.drawImage(Alphabet.createString("Cible : " + currentSpell.getTarget().toString(), image.getWidth()), 20, image.getHeight() - 150, null);
        //Affichage de la cible
        graphic.drawImage(Alphabet.createString("Cout : " + spells.displayCout(currentSpell.getCost()), image.getWidth()), 20, image.getHeight() - 100, null);

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

    private void annulerActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_annulerActionPerformed
        this.dispose();
    }//GEN-LAST:event_annulerActionPerformed

    private void acceptActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_acceptActionPerformed
        final Spell spell = (Spell) spellBox.getSelectedItem();
        choiceTemplate.addChoiceSpell(spell);
    }//GEN-LAST:event_acceptActionPerformed
View Full Code Here

TOP

Related Classes of beans.serializable.Spell

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.