Package pathfinder.bean.spell

Examples of pathfinder.bean.spell.Spell


      System.out.println(name + " - " + school + " - " + composant
          + " - " + range + " - " + castingTime + " - " + description
          + " - " + parseLevels);

      try {
        Spell spell = new Spell(name, school, range, castingTime,
            description, composant, source, ref, parseLevels);

        String filename = DocumentIO.validateFilename(spell.getId()
            .toString());
        DocumentIO.saveDocument(spell, "./tmp/", filename);
      } catch (Exception e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
View Full Code Here


      System.out.println(name + " - " + school + " - " + composant
          + " - " + range + " - " + castingTime + " - " + description
          + " - " + parseLevels);

      try {
        Spell spell = new Spell(name, school, range, castingTime,
            description, composant, source, ref, parseLevels);

        DocumentIO.saveDocument(spell, "./tmp/");
      } catch (Exception e) {
        // TODO Auto-generated catch block
View Full Code Here

  public void setDocument(BeanDocument document) {
    DocumentSpellBook spellBook = document.getBean();

    ArrayList<Spell> spells = new ArrayList<Spell>();
    for (UniqueID id : spellBook.getSpells()) {
      Spell spell = CampaignClient.getInstance().getBean(id);

      if (spell != null) {
        spells.add(spell);
      } else {
        Logger.getLogger(getClass()).warn(
View Full Code Here

   * separated by a newline.
   */
  @Override
  protected Transferable createTransferable(JComponent c) {
    JList<Spell> list = (JList<Spell>) c;
    Spell spell = list.getSelectedValue();

    return new SpellTransferable(spell);
  }
View Full Code Here

  public int getSourceActions(JComponent c) {
    return TransferHandler.MOVE;
  }

  protected Spell verifyDrop(TransferSupport info) {
    Spell data = null;

    if (info.isDrop()) {
      Transferable t = info.getTransferable();
      try {
        data = (Spell) t
View Full Code Here

  /**
   * Perform the actual import.
   */
  @Override
  public boolean importData(TransferSupport info) {
    Spell data = verifyDrop(info);

    if (data != null) {
      JList<Spell> target = (JList<Spell>) info.getComponent();

      SpellListModel listModel = (SpellListModel) target.getModel();
View Full Code Here

    JList<Spell> source = (JList<Spell>) c;

    SpellListModel listModel = (SpellListModel) source.getModel();

    if (action == TransferHandler.MOVE) {
      Spell data;
      try {
        data = (Spell) t
            .getTransferData(SpellTransferable.FLAVOR_SPELL);
        listModel.removeSpell(data);
        source.revalidate();
View Full Code Here

    JLabel label = null;
    if (value != null) {
      label = buildSpell(value, list, isSelected);
    } else if ((index + 1) < getSize()) {
      Spell spell = getElementAt(index + 1);
      label = buildTitle("Niveau " + spell.getLevel(classe));
    } else {
      label = buildTitle("Aucun sort");
    }

    return label;
View Full Code Here

TOP

Related Classes of pathfinder.bean.spell.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.