Package factOrFiction.model

Examples of factOrFiction.model.DeckParticle


 
      cardCount = 0;
      groupCount = 0;
     
      for (Iterator iter = currentSelection.iterator(); iter.hasNext();) {
        DeckParticle element = (DeckParticle) iter.next();
       
        if (element instanceof Card) {
          cardCount++;
        }
        else if (element instanceof CardGroup) {
View Full Code Here


 
      cardCount = 0;
      groupCount = 0;
     
      for (Iterator iter = currentSelection.iterator(); iter.hasNext();) {
        DeckParticle element = (DeckParticle) iter.next();
       
        if (element instanceof Card) {
          cardCount++;
        }
        else if (element instanceof CardGroup && !(element.getName() == CardGroup.SIDEBOARD)) {
          groupCount++;
        }
      }
      action.setEnabled( (cardCount > 0 && groupCount == 0) || (groupCount == 1 && cardCount == 0) );
      return;
View Full Code Here

          if(editor != null) {       
            ISelectionProvider provider = editor.getSite().getSelectionProvider();
            IStructuredSelection selection = (IStructuredSelection)provider.getSelection();
     
            if(selection != null) {
              DeckParticle particle = (DeckParticle)selection.getFirstElement();
              CardGroup group = null;
             
              if(particle != null && particle instanceof CardGroup) {
                group = (CardGroup)particle;
              } else if(particle != null && particle instanceof Card) {
                group = (CardGroup)particle.getParent();
              } else {
                Deck deck = (Deck)editor.getEditorInput().getAdapter(Deck.class);
               
                if(deck != null)
                  group = deck.main;
View Full Code Here

TOP

Related Classes of factOrFiction.model.DeckParticle

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.