Examples of addChoice()


Examples of ij.gui.GenericDialog.addChoice()

  @param stop last slice */
    protected GenericDialog buildControlDialog(int start, int stop) {
    GenericDialog gd = new GenericDialog("ZProjection",IJ.getInstance());
    gd.addNumericField("Start slice:",startSlice,0/*digits*/);
    gd.addNumericField("Stop slice:",stopSlice,0/*digits*/);
    gd.addChoice("Projection Type", METHODS, METHODS[method]);
    if (isHyperstack && imp.getNFrames()>1&& imp.getNSlices()>1)
      gd.addCheckbox("All Time Frames", allTimeFrames);
    return gd;
    }

View Full Code Here

Examples of ij.gui.GenericDialog.addChoice()

      GenericDialog gd = new GenericDialog(command+"...");
      gd.addNumericField("Radius", radius, 1, 6, "pixels");
      int digits = imp.getType() == ImagePlus.GRAY32 ? 2 : 0;
      if(filterType == OUTLIERS) {
        gd.addNumericField("Threshold", threshold, digits);
        gd.addChoice("Which Outliers", outlierStrings, outlierStrings[whichOutliers]);
      }
      gd.addPreviewCheckbox(pfr);    //passing pfr makes the filter ready for preview
      gd.addDialogListener(this);    //the DialogItemChanged method will be called on user input
      gd.showDialog();              //display the dialog; preview runs in the  now
      if (gd.wasCanceled()) return DONE;
View Full Code Here

Examples of ij.gui.GenericDialog.addChoice()

  @param stop last slice */
    protected GenericDialog buildControlDialog(int start, int stop) {
    GenericDialog gd = new GenericDialog("ZProjection",IJ.getInstance());
    gd.addNumericField("Start slice:",startSlice,0/*digits*/);
    gd.addNumericField("Stop slice:",stopSlice,0/*digits*/);
    gd.addChoice("Projection Type", METHODS, METHODS[method]);
    if (isHyperStack && imp.getNFrames()>1)
      gd.addCheckbox("All Time Frames", allTimeFrames);
    return gd;
    }

View Full Code Here

Examples of mage.abilities.Ability.addChoice()

        this.power = new MageInt(2);
        this.toughness = new MageInt(2);

        // {tap}: Add X mana of any one color to your mana pool, where X is the number of Elves on the battlefield.
        Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, new WirewoodChannelerManaEffect(), new TapSourceCost());
        ability.addChoice(new ChoiceColor());
        this.addAbility(ability);
    }

    public WirewoodChanneler(final WirewoodChanneler card) {
        super(card);
View Full Code Here

Examples of mage.abilities.Ability.addChoice()

        Choice targetChoice = new ChoiceImpl();
        targetChoice.setMessage("Choose what to target");
        targetChoice.getChoices().add("Permanent");
        targetChoice.getChoices().add("Suspended Card");
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(2,0,Duration.EndOfTurn), new ManaCostsImpl("{1}{R}"));
        ability.addChoice(targetChoice);
        ability.addCost(new RemoveCounterFromCardCost(new TargetCardInExile(1,1,filter, null, true), CounterType.TIME));
        this.addAbility(ability);
    }

    @Override
View Full Code Here

Examples of mage.abilities.Ability.addChoice()

        this.addAbility(VigilanceAbility.getInstance());
        // {1}{W}: Prevent all damage that would be dealt to another target creature this turn by sources of the color of your choice.
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD,
                new AvacynGuardianAngelPreventToCreatureEffect(Duration.EndOfTurn, Integer.MAX_VALUE, false),
                new ManaCostsImpl("{1}{W}"));
        ability.addChoice(new ChoiceColor());
        ability.addTarget(new TargetCreaturePermanent(filter));       
        this.addAbility(ability);
       
        // {5}{W}{W}: Prevent all damage that would be dealt to target player this turn by sources of the color of your choice.
        ability = new SimpleActivatedAbility(Zone.BATTLEFIELD,
View Full Code Here

Examples of mage.abilities.Ability.addChoice()

       
        // {5}{W}{W}: Prevent all damage that would be dealt to target player this turn by sources of the color of your choice.
        ability = new SimpleActivatedAbility(Zone.BATTLEFIELD,
                new AvacynGuardianAngelPreventToPlayerEffect(Duration.EndOfTurn, Integer.MAX_VALUE, false),
                new ManaCostsImpl("{5}{W}{W}"));
        ability.addChoice(new ChoiceColor());
        ability.addTarget(new TargetPlayer());   
        this.addAbility(ability);
    }

    public AvacynGuardianAngel(final AvacynGuardianAngel card) {
View Full Code Here

Examples of mage.abilities.Ability.addChoice()

        // {T}: Choose a color. Add one mana of that color to your mana pool for each charge counter on Astral Cornucopia.
        Ability ability = new AstralCornucopiaManaAbility();
        Choice choice = new ChoiceColor();
        choice.setMessage("Choose a color to add mana of that color");
        ability.addChoice(choice);
        this.addAbility(ability);
    }

    public AstralCornucopia(final AstralCornucopia card) {
        super(card);
View Full Code Here

Examples of mage.abilities.Ability.addChoice()

        // Whenever Jareth, Leonine Titan blocks, it gets +7/+7 until end of turn.
        this.addAbility(new BlocksTriggeredAbility(new BoostSourceEffect(7,7,Duration.EndOfTurn), false));
        // {W}: Jareth gains protection from the color of your choice until end of turn.
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new JarethsGainProtectionFromColorSourceEffect(), new ManaCostsImpl("{W}"));
        ability.addChoice(new ChoiceColor());
        this.addAbility(ability);

    }

    public JarethLeonineTitan(final JarethLeonineTitan card) {
View Full Code Here

Examples of mage.abilities.Ability.addChoice()

        this.power = new MageInt(0);
        this.toughness = new MageInt(0);

        // As Primal Clay enters the battlefield, it becomes your choice of a 3/3 artifact creature, a 2/2 artifact creature with flying, or a 1/6 Wall artifact creature with defender in addition to its other types.
        Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new EntersBattlefieldEffect(new PrimalClayEffect(), "As {this} enters the battlefield, it becomes your choice of a 3/3 artifact creature, a 2/2 artifact creature with flying, or a 1/6 Wall artifact creature with defender in addition to its other types"));
        ability.addChoice(new PrimalClayChoice());
        this.addAbility(ability);
    }

    public PrimalClay(final PrimalClay card) {
        super(card);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.