Package factOrFiction.print

Examples of factOrFiction.print.FlowRightFrame


    down = new FlowDownFrame( header, 1, 0.02 );
      BorderFrame border = new BorderFrame( down, 1, 1);
      border.setBackground(SWT.COLOR_GRAY);

    down = new FlowDownFrame( header, 1, 0.25);
        FlowRightFrame right = new FlowRightFrame( down, 0.3, 10);
        text = new ListFrame( right, 1, 1);
        text.setFont("Tahoma", 11, SWT.BOLD);
        text.setAlignment(SWT.CENTER);
        text.setMargin( 0.1, 0.1, 0.0, 0.0);
        text.add( "Player Name: " + deck.get(Deck.FEATURE_PLAYER) );
      right = new FlowRightFrame( down, 0.5, 1.0);
        text = new ListFrame( right, 1, 1);
        text.setFont("Tahoma", 11, SWT.BOLD);
        text.setAlignment(SWT.CENTER);
        text.setMargin( 0.1, 0.1, 0.0, 0.0);
        text.add( "DCI: " + deck.get(Deck.FEATURE_DCI));
      right = new FlowRightFrame( down, 0.2, 1);
        text = new ListFrame( right, 1, 1);
        text.setFont("Tahoma", 11, SWT.BOLD);
        text.setAlignment(SWT.CENTER + SWT.RIGHT);
        text.setMargin( 0.1, 0.1, 0.0, 0.0);
        text.add( "Date: " + deck.get(Deck.FEATURE_TOURNAMENT_DATE) );
   
    down = new FlowDownFrame( header, 1.0, 0.25);
        right = new FlowRightFrame( down, 0.3, 1.0);
        text = new ListFrame( right,1, 1);
        text.setFont("Tahoma", 11, SWT.NORMAL);
        text.setAlignment(SWT.CENTER);
        text.setMargin( 0.1, 0.1, 0.0, 0.0);
        text.add( "Tournament: " + deck.get(Deck.FEATURE_TOURNAMENT_TITLE) );
      right = new FlowRightFrame( down, 0.5, 1.0);
        text = new ListFrame( right, 1, 1);
        text.setFont("Tahoma", 11, SWT.NORMAL);
        text.setAlignment(SWT.CENTER);
        text.setMargin( 0.1, 0.1, 0.0, 0.0);
        text.add( "City: " + deck.get(Deck.FEATURE_TOURNAMENT_CITY));
      right = new FlowRightFrame( down, 0.2, 1.0);
        text = new ListFrame( right, 1, 1);
        text.setFont("Tahoma", 11, SWT.NORMAL);
        text.setAlignment(SWT.CENTER + SWT.RIGHT);
        text.setMargin( 0.1, 0.1, 0.0, 0.0);
        text.add( "Type: " + deck.get(Deck.FEATURE_TOURNAMENT_TYPE) );

    down = new FlowDownFrame( header, 1, 0.25);
      right = new FlowRightFrame( down, 0.5, 1.0);
        text = new ListFrame( right, 1, 1);
        text.setFont("Tahoma", 11, SWT.NORMAL);
        text.setAlignment(SWT.CENTER);
        text.setMargin( 0.1, 0.1, 0.0, 0.0);
        text.add( "Deck Name: " + deck.getName() );
 
      right = new FlowRightFrame( down, 0.5, 1.0);
        text = new ListFrame( right, 1, 1);
        text.setFont("Tahoma", 11, SWT.NORMAL);
        text.setAlignment(SWT.CENTER + SWT.RIGHT);
        text.setMargin( 0.1, 0.1, 0.0, 0.0);
        text.add( "Deck Designer: " + deck.get(Deck.FEATURE_DESIGNER) );
View Full Code Here


    FlowDownFrame down = new FlowDownFrame( frame, 1, 0.94 );
   
    new FlowDownFrame( down, 1, 0.01 );

    List<CardGroup> groups = deck.getChildren();
    FlowRightFrame countFrame = null;
    ListFrame countText = null;
    FlowRightFrame cardFrame = null;
    ListFrame cardText = null;
    for (CardGroup group : groups) {
     
      if( !group.getName().equals(CardGroup.SIDEBOARD) ) {
        List<Card> cards = group.getUniqueCards();
        // figure overflow
        if( countText != null && countText.getLineCount() + cards.size() > 41 ) {
          countFrame = null;
          countText = null;
          cardFrame = null;
          cardText = null;
        }
       
        if(countFrame == null) {
          countFrame = new FlowRightFrame( down, 0.05, 1);   
            countText = new ListFrame( countFrame, 1, 1 );
            countText.setFont("Tahoma", 10, SWT.NORMAL);
            countText.setAlignment(SWT.RIGHT);
            countText.setMargin( 0.2, 0.0, 0.02, 0.02);
         
          cardFrame = new FlowRightFrame( down, 0.28, 1);   
            cardText = new ListFrame( cardFrame, 0.9, 1 );
            cardText.setFont("Tahoma", 10, SWT.NORMAL);
            cardText.setMargin( 0.04, 0.0, 0.02, 0.02);
        }
       
View Full Code Here

      text.setAlignment(SWT.CENTER);
      text.add("Sum: " + deck.countMaindeck() + " cards");
  }

  private void createFooter(PrintFrame footer) {
    FlowRightFrame leftFooter = new FlowRightFrame( footer, 0.5, 1.0 );
      ListFrame text1 = new ListFrame( leftFooter, 0.5, 1);
      text1.setFont("Tahoma", 8, SWT.NORMAL);
      text1.setAlignment(SWT.CENTER);
      text1.add( "created with 'Fact or Fiction' - THE Deck Editor by Oliver Wahl");
   
    FlowRightFrame rightFooter = new FlowRightFrame( footer, 0.5, 1.0 );
      ListFrame text2 = new ListFrame( rightFooter, 0.5, 1.0);
      text2.setFont("Tahoma", 8, SWT.NORMAL);
      text2.setAlignment(SWT.CENTER|SWT.RIGHT);
      SimpleDateFormat dateFormat = new SimpleDateFormat("dd. MMMM yyyy");
      text2.add( "printed on " + dateFormat.format(new Date()) );
View Full Code Here

    down = new FlowDownFrame(header, 1, 0.02);
      BorderFrame border = new BorderFrame(down, 1, 1);
      border.setBackground(SWT.COLOR_GRAY);

    down = new FlowDownFrame(header, 1, 0.25);
      FlowRightFrame right = new FlowRightFrame(down, 0.3, 1);
        text = new ListFrame(right, 1, 1);
        text.setFont(DEFAULTFONT, 11, SWT.BOLD);
        text.setAlignment(SWT.CENTER);
        text.setMargin(0.1, 0.1, 0.0, 0.0);
        text.add("Player Name: " + deck.get(DeckConstants.FEATURE_PLAYER));
      right = new FlowRightFrame(down, 0.5, 1);
        text = new ListFrame(right, 1, 1);
        text.setFont(DEFAULTFONT, 11, SWT.BOLD);
        text.setAlignment(SWT.CENTER);
        text.setMargin(0.1, 0.1, 0.0, 0.0);
        text.add("DCI: " + deck.get(DeckConstants.FEATURE_DCI));
      right = new FlowRightFrame(down, 0.2, 1.0);
        text = new ListFrame(right, 1, 1);
        text.setFont(DEFAULTFONT, 11, SWT.BOLD);
        text.setAlignment(SWT.CENTER + SWT.RIGHT);
        text.setMargin(0.1, 0.1, 0.0, 0.0);
        text.add("Date: " + deck.get(DeckConstants.FEATURE_TOURNAMENT_DATE));

    down = new FlowDownFrame(header, 1.0, 0.25);
      right = new FlowRightFrame(down, 0.3, 1.0);
        text = new ListFrame(right, 1, 1);
        text.setFont(DEFAULTFONT, 11, SWT.NORMAL);
        text.setAlignment(SWT.CENTER);
        text.setMargin(0.1, 0.1, 0.0, 0.0);
        text.add("Tournament: " + deck.get(DeckConstants.FEATURE_TOURNAMENT_TITLE));
      right = new FlowRightFrame(down, 0.5, 1.0);
        text = new ListFrame(right, 1, 1);
        text.setFont(DEFAULTFONT, 11, SWT.NORMAL);
        text.setAlignment(SWT.CENTER);
        text.setMargin(0.1, 0.1, 0.0, 0.0);
        text.add("City: " + deck.get(DeckConstants.FEATURE_TOURNAMENT_CITY));
      right = new FlowRightFrame(down, 0.2, 1.0);
        text = new ListFrame(right, 1, 1);
        text.setFont(DEFAULTFONT, 11, SWT.NORMAL);
        text.setAlignment(SWT.CENTER + SWT.RIGHT);
        text.setMargin(0.1, 0.1, 0.0, 0.0);
        text.add("Type: " + deck.get(DeckConstants.FEATURE_TOURNAMENT_TYPE));

    down = new FlowDownFrame(header, 1, 0.25);
      right = new FlowRightFrame(down, 0.5, 1.0);
        text = new ListFrame(right, 1, 1);
        text.setFont(DEFAULTFONT, 11, SWT.NORMAL);
        text.setAlignment(SWT.CENTER);
        text.setMargin(0.1, 0.1, 0.0, 0.0);
        text.add("Deck Name: " + deck.getName());

      right = new FlowRightFrame(down, 0.5, 1.0);
        text = new ListFrame(right, 1, 1);
        text.setFont(DEFAULTFONT, 11, SWT.NORMAL);
        text.setAlignment(SWT.CENTER + SWT.RIGHT);
        text.setMargin(0.1, 0.1, 0.0, 0.0);
        text.add("Deck Designer: " + deck.get(DeckConstants.FEATURE_DESIGNER));
View Full Code Here

  }

  private void createMainboard(PrintFrame frame) {
    FlowDownFrame down = new FlowDownFrame(frame, 1, 0.95);

    FlowRightFrame countFrame = null;
    ListFrame countText = null;
    FlowRightFrame cardFrame = null;
    ListFrame cardText = null;
   
    for (CardGroup group : deck.getChildren()) {
      if (!group.getName().equals(CardGroup.SIDEBOARD)) {
        List<Card> cards = group.getUniqueCards();

        // figure out when to overflow to second(next) frame
        if (countText != null && countText.getLineCount() + cards.size() + 3 > 30) {
          countFrame = null;
          countText = null;
          cardFrame = null;
          cardText = null;
        }

        // start new frame
        if (countFrame == null) {
          countFrame = new FlowRightFrame(down, 0.10, 1);
            countText = new ListFrame(countFrame, 1, 1);
            countText.setFont(DEFAULTFONT, 11, SWT.NORMAL);
            countText.setAlignment(SWT.RIGHT);
            countText.setMargin(0.2, 0.0, 0.2, 0.2);

          cardFrame = new FlowRightFrame(down, 0.4, 1);
            cardText = new ListFrame(cardFrame, 0.9, 1);
            cardText.setFont(DEFAULTFONT, 11, SWT.NORMAL);
            cardText.setMargin(0.04, 0.0, 0.2, 0.2);
        }
View Full Code Here

      text.setMargin(0.2, 0.2, 0.0, 0.0);
      text.setBackground(SWT.COLOR_GREEN);
      text.add(group.getName());

    down = new FlowDownFrame(frame, 1, 0.8);
      FlowRightFrame countFrame = null;
      ListFrame countText = null;
      FlowRightFrame cardFrame = null;
      ListFrame cardText = null;
      List<Card> cards = group.getUniqueCards();
      for (Card card : cards) {
        // create the two column frames
        if (countFrame == null && cardFrame == null) {
          countFrame = new FlowRightFrame(down, 0.10, 1);
          countText = new ListFrame(countFrame, 1.0, 1.0);
          countText.setFont(DEFAULTFONT, 11, SWT.NORMAL);
          countText.setAlignment(SWT.RIGHT);
          countText.setMargin(0.2, 0.0, 0.2, 0.2);
          countText.setBackground(SWT.COLOR_GREEN);
 
          cardFrame = new FlowRightFrame(down, 0.40, 1);
          cardText = new ListFrame(cardFrame, 1, 1);
          cardText.setFont(DEFAULTFONT, 11, SWT.NORMAL);
          cardText.setMargin(0.04, 0.0, 0.2, 0.2);
          cardText.setBackground(SWT.COLOR_GREEN);
        }
View Full Code Here

      sumFrame.add("Sum: " + deck.countSideboard() + " cards");
    new FlowDownFrame(frame, 1, 0.01);
  }

  private void createFooter(PrintFrame footer) {
    FlowRightFrame leftFooter = new FlowRightFrame(footer, 0.5, 1.0 );
      ListFrame text1 = new ListFrame(leftFooter, 0.5, 1);
      text1.setFont(DEFAULTFONT, 8, SWT.NORMAL);
      text1.setAlignment(SWT.CENTER);
      text1.add( "created with 'Fact or Fiction' - THE Deck Editor by Oliver Wahl");
   
View Full Code Here

TOP

Related Classes of factOrFiction.print.FlowRightFrame

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.