コード例 #1
0
  private Boolean PrintDialog(PrintMech pMech) {
    dlgPrintSavedMechOptions POptions =
        new dlgPrintSavedMechOptions((javax.swing.JFrame) Parent, true, pMech);
    POptions.setTitle("Printing " + pMech.CurMech.GetFullName());
    POptions.setLocationRelativeTo((javax.swing.JFrame) Parent);

    POptions.setVisible(true);

    if (!POptions.Result()) {
      return false;
    }

    pMech.setPrintPilot(POptions.PrintPilot());
    pMech.setCharts(POptions.PrintCharts());
    pMech.setGunnery(POptions.GetGunnery());
    pMech.setPiloting(POptions.GetPiloting());
    pMech.setMechwarrior(POptions.GetWarriorName());
    pMech.setMechImage(POptions.getImage());
    pMech.setLogoImage(POptions.getLogo());
    pMech.setCanon(POptions.getCanon());
    if (POptions.UseMiniConversion()) {
      pMech.SetMiniConversion(POptions.GetMiniConversionRate());
    }
    if (POptions.UseA4Paper()) {
      pMech.setA4();
    }

    POptions.dispose();
    return true;
  }
コード例 #2
0
 public void setChartImageOption(String Option) {
   this.ChartImageOption = Option;
   for (int i = 0; i < Mechs.size(); i++) {
     PrintMech pm = (PrintMech) Mechs.get(i);
     pm.setChartImageOption(Option);
   }
 }
コード例 #3
0
 public void setWarriorData(int Gunnery, int Piloting, String Name, String Unit) {
   for (int index = 0; index <= Mechs.size() - 1; index++) {
     PrintMech pm = (PrintMech) Mechs.get(index);
     pm.SetPilotData(Name, Gunnery, Piloting);
     pm.setGroupName(Unit);
   }
 }
コード例 #4
0
 public void setTRO(Boolean TRO) {
   this.TRO = TRO;
   for (int index = 0; index <= Mechs.size() - 1; index++) {
     PrintMech pm = (PrintMech) Mechs.get(index);
     pm.setTRO(TRO);
   }
 }
コード例 #5
0
 public void setCanon(boolean Canon) {
   this.Canon = Canon;
   for (int index = 0; index <= Mechs.size() - 1; index++) {
     PrintMech pm = (PrintMech) Mechs.get(index);
     pm.setCanon(Canon);
   }
 }
コード例 #6
0
 public void setCharts(Boolean Charts) {
   this.Charts = Charts;
   for (int index = 0; index <= Mechs.size() - 1; index++) {
     PrintMech pm = (PrintMech) Mechs.get(index);
     pm.setCharts(Charts);
   }
 }
コード例 #7
0
 public void setPaperSize(PaperSize s) {
   paper.setSize(s.PaperWidth, s.PaperHeight);
   paper.setImageableArea(s.ImageableX, s.ImageableY, s.ImageableWidth, s.ImageableHeight);
   if (s == A4) {
     for (PrintMech pm : Mechs) {
       pm.setA4();
     }
   } else if (s == Letter) {
     for (PrintMech pm : Mechs) {
       pm.setLetter();
     }
   }
 }
コード例 #8
0
 public void setMechImagePath(String MechImagePath) {
   this.MechImagePath = MechImagePath;
   if (!MechImagePath.isEmpty()) {
     Media media = new Media();
     for (int index = 0; index <= Mechs.size() - 1; index++) {
       PrintMech pm = (PrintMech) Mechs.get(index);
       pm.setMechImage(media.GetImage(MechImagePath));
     }
   } else {
     for (int index = 0; index <= Mechs.size() - 1; index++) {
       PrintMech pm = (PrintMech) Mechs.get(index);
       pm.setMechImage(null);
     }
   }
 }
コード例 #9
0
  public void AddMech(
      Mech m,
      String Mechwarrior,
      int Gunnery,
      int Piloting,
      boolean Charts,
      boolean PilotInfo,
      boolean AdjBV) {
    double BV = (double) m.GetCurrentBV();
    if (AdjBV) BV = CommonTools.GetAdjustedBV(m.GetCurrentBV(), Gunnery, Piloting);

    PrintMech pm = new PrintMech(m, images);
    pm.SetPilotData(Mechwarrior, Gunnery, Piloting);
    pm.SetOptions(Charts, PilotInfo, BV);
    pm.setCanon(Canon);
    Mechs.add(pm);
  }
コード例 #10
0
  private Boolean BatchDialog() {
    dlgPrintSavedMechOptions POptions =
        new dlgPrintSavedMechOptions((javax.swing.JFrame) Parent, true);
    POptions.setTitle("Printing Batched Units");
    POptions.setLocationRelativeTo((javax.swing.JFrame) Parent);

    if (!this.logoPath.isEmpty()) {
      POptions.setLogo(new File(this.logoPath));
    }

    POptions.setVisible(true);

    if (!POptions.Result()) {
      return false;
    }

    for (int m = 0; m <= Mechs.size() - 1; m++) {
      PrintMech pMech = (PrintMech) Mechs.get(m);
      pMech.setPrintPilot(POptions.PrintPilot());
      pMech.setCharts(POptions.PrintCharts());
      pMech.setMechImage(POptions.getImage());
      pMech.setLogoImage(POptions.getLogo());
      pMech.setCanon(POptions.getCanon());
      if (POptions.UseMiniConversion()) {
        pMech.SetMiniConversion(POptions.GetMiniConversionRate());
      }
    }

    POptions.dispose();
    return true;
  }
コード例 #11
0
 public void setPrintWarrior(boolean value) {
   for (int index = 0; index <= Mechs.size() - 1; index++) {
     PrintMech pm = (PrintMech) Mechs.get(index);
     pm.setPrintPilot(value);
   }
 }
コード例 #12
0
 public void setHexConversion(int Rate) {
   for (int index = 0; index <= Mechs.size() - 1; index++) {
     PrintMech pm = (PrintMech) Mechs.get(index);
     pm.SetMiniConversion(Rate);
   }
 }