Ejemplo n.º 1
0
  private Print printNpcSheet(ManagedCharacter managedCharacter, int intValue) {
    DefaultGridLook look = new DefaultGridLook(10, 0);
    look.setHeaderGap(0);
    GridPrint grid = new GridPrint("d,d:g,d,d,d:g", look); // $NON-NLS-1$

    int zustandKoerperlichMax = 8;
    AbstraktPersona persona = managedCharacter.getPersona();
    if (persona instanceof KoerperPersona) {
      KoerperPersona kp = (KoerperPersona) persona;
      zustandKoerperlichMax = kp.getZustandKoerperlichMax();
    }
    grid.add(printPersonaAttributes(persona), 2);
    for (int i = 0; i < intValue; i++) {
      grid.add(
          SWT.LEFT,
          SWT.TOP,
          printConditionMonitor(persona.getName() + ONE_SPACE + (i + 1), zustandKoerperlichMax));
    }
    grid.add(new EmptyPrint(), GridPrint.REMAINDER);
    grid.add(printPersonaWeaponsDetailList(managedCharacter), 5);
    grid.add(new LinePrint(SWT.HORIZONTAL), GridPrint.REMAINDER);

    DefaultGridLook look1 = new DefaultGridLook(5, 5);
    look.setHeaderGap(0);
    GridPrint grid1 = new GridPrint("d,d,d", look1); // $NON-NLS-1$

    grid1.add(printPersonaCombatAttributes(persona));
    grid1.add(printPersonaSkills(persona));
    grid1.add(printGegenstandList(managedCharacter.getInventar(), Messages.Printer_Items));
    grid.add(grid1, GridPrint.REMAINDER);

    return grid;
  }