public void encode(SheetGraphics graphics, ReportContent reportContent, Bounds bounds) {
    tellMDV = hasTBA(reportContent.getCharacter()) ? 8 : 12;

    int offsetX = 0, offsetY = isHorizontal ? 0 : 5;
    font = graphics.createTableFont();

    if (isHorizontal) {
      bounds = new Bounds(bounds.x, bounds.y, bounds.width / 2, bounds.height);
      font.setSize(COMMENT_FONT_SIZE);
      lineHeight -= 2;
    }

    try {
      offsetY += writePowerNotes(graphics, "Shapeshifting", bounds, offsetX, offsetY);
      if (!reportContent.getCharacter().getTemplate().getTemplateType().equals(castelessType)) {
        offsetY += writePowerNotes(graphics, "Tattoos", bounds, offsetX, offsetY);
      }

      if (isHorizontal) {

        bounds = new Bounds(bounds.x + bounds.width, bounds.y, bounds.width, bounds.height);
        offsetY = 0;
      }

      offsetY += writePowerNotes(graphics, "Tell", bounds, offsetX, offsetY);
    } catch (DocumentException e) {
    }
  }
예제 #2
0
 @Override
 protected void addFirstCell(
     SheetGraphics graphics, ReportContent reportContent, PdfPTable table) {
   CombatStatsContent content = reportContent.createSubContent(CombatStatsContent.class);
   TableCell cell = new TableCell(createCombatAttackList(graphics, content), Rectangle.BOX);
   cell.setPaddingBottom(2f);
   table.addCell(cell);
 }
예제 #3
0
 public float encode(
     SheetGraphics graphics, ReportContent content, Position position, float width, float height) {
   IGenericCharacter character = content.getCharacter();
   String title = getResources().getString("Sheet.AbilitySubHeader.Specialties"); // $NON-NLS-1$
   List<IValuedTraitReference> references = new ArrayList<IValuedTraitReference>();
   for (IIdentifiedTraitTypeGroup group : character.getAbilityTypeGroups()) {
     for (ITraitType traitType : group.getAllGroupTypes()) {
       Collections.addAll(
           references, getTraitReferences(character.getSpecialties(traitType), traitType));
     }
   }
   IValuedTraitReference[] specialties =
       references.toArray(new IValuedTraitReference[references.size()]);
   if (specialtyCount > 0) {
     return _drawNamedTraitSection(
         graphics, title, specialties, position, width, specialtyCount, 3);
   } else {
     return drawNamedTraitSection(graphics, title, specialties, position, width, height, 3);
   }
 }
예제 #4
0
 @Override
 protected void addThirdCell(
     SheetGraphics graphics, ReportContent reportContent, PdfPTable table) {
   CombatStatsContent content = reportContent.createSubContent(CombatStatsContent.class);
   addAsCell(graphics, table, content.getStunningChunks());
 }