Examples of TextBuilder


Examples of javolution.text.TextBuilder

    if (!isValidPetition(petitionId))
      return;

    Petition currPetition = getPendingPetitions().get(petitionId);
        TextBuilder htmlContent = new TextBuilder("<html><body>");
    SimpleDateFormat dateFormat = new SimpleDateFormat("EEE dd MMM HH:mm z");

    htmlContent.append("<center><br><font color=\"LEVEL\">Petition #" + currPetition.getId() + "</font><br1>");
    htmlContent.append("<img src=\"L2UI.SquareGray\" width=\"200\" height=\"1\"></center><br>");
    htmlContent.append("Submit Time: " + dateFormat.format(new Date(currPetition.getSubmitTime())) + "<br1>");
    htmlContent.append("Petitioner: " + currPetition.getPetitioner().getName() + "<br1>");
    htmlContent.append("Petition Type: " + currPetition.getTypeAsString() + "<br>" + currPetition.getContent() + "<br>");
    htmlContent.append("<center><button value=\"Accept\" action=\"bypass -h admin_accept_petition " + currPetition.getId() + "\"" +
    "width=\"50\" height=\"15\" back=\"sek.cbui94\" fore=\"sek.cbui92\"><br1>");
    htmlContent.append("<button value=\"Reject\" action=\"bypass -h admin_reject_petition " + currPetition.getId() + "\" " +
    "width=\"50\" height=\"15\" back=\"sek.cbui94\" fore=\"sek.cbui92\"><br>");
    htmlContent.append("<button value=\"Back\" action=\"bypass -h admin_view_petitions\" width=\"40\" height=\"15\" back=\"sek.cbui94\" " +
    "fore=\"sek.cbui92\"></center>");
    htmlContent.append("</body></html>");

    NpcHtmlMessage htmlMsg = new NpcHtmlMessage(0);
    htmlMsg.setHtml(htmlContent.toString());
    activeChar.sendPacket(htmlMsg);
  }
View Full Code Here

Examples of javolution.text.TextBuilder

      return;
    }

    NpcHtmlMessage adminReply = new NpcHtmlMessage(5);

    TextBuilder replyMSG = new TextBuilder();
    replyMSG.append("<html><title>Merchant Shop Item Delete</title>");
    replyMSG.append("<body>");
    replyMSG.append("<br>Delete entry in merchantList.");
    replyMSG.append("<br>Item to Delete: "+ItemTable.getInstance().getTemplate(itemID).getName());
    replyMSG.append("<table>");
    replyMSG.append("<tr><td width=100>Property</td><td width=100>Value</td></tr>");
    replyMSG.append("<tr><td><br></td><td></td></tr>");
    replyMSG.append("<tr><td>Price</td><td>"+tradeList.getPriceForItemId(itemID)+"</td></tr>");
    replyMSG.append("</table>");
    replyMSG.append("<center><br><br><br>");
    replyMSG.append("<button value=\"Confirm\" action=\"bypass -h admin_delShopItem " + tradeListID + " " + itemID + " 1\"  width=100 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\">");
    replyMSG.append("<br><button value=\"Back\" action=\"bypass -h admin_showShopList " + tradeListID +" 1\"  width=100 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\">");
    replyMSG.append("</center>");
    replyMSG.append("</body></html>");

    adminReply.setHtml(replyMSG.toString());
    activeChar.sendPacket(adminReply);
  }
View Full Code Here

Examples of javolution.text.TextBuilder

      return;
    }

    NpcHtmlMessage adminReply = new NpcHtmlMessage(5);

    TextBuilder replyMSG = new TextBuilder();
    replyMSG.append("<html><title>Merchant Shop Item Add</title>");
    replyMSG.append("<body>");
    replyMSG.append("<br>Add a new entry in merchantList.");
    replyMSG.append("<table>");
    replyMSG.append("<tr><td width=100>Property</td><td>Edit Field</td></tr>");
    replyMSG.append("<tr><td><br></td><td></td></tr>");
    replyMSG.append("<tr><td>ItemID</td><td><edit var=\"itemID\" width=80></td></tr>");
    replyMSG.append("<tr><td>Price</td><td><edit var=\"price\" width=80></td></tr>");
    replyMSG.append("</table>");
    replyMSG.append("<center><br><br><br>");
    replyMSG.append("<button value=\"Save\" action=\"bypass -h admin_addShopItem " + tradeListID + " $itemID $price\"  width=100 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\">");
    replyMSG.append("<br><button value=\"Back\" action=\"bypass -h admin_showShopList " + tradeListID +" 1\"  width=100 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\">");
    replyMSG.append("</center>");
    replyMSG.append("</body></html>");

    adminReply.setHtml(replyMSG.toString());
    activeChar.sendPacket(adminReply);
  }
View Full Code Here

Examples of javolution.text.TextBuilder

    L2TradeList tradeList = TradeController.getInstance().getBuyList(tradeListID);
    if (page > tradeList.getItems().size() / PAGE_LIMIT + 1 || page < 1)
      return;

    NpcHtmlMessage adminReply = new NpcHtmlMessage(5);
    TextBuilder html = itemListHtml(tradeList, page);

    adminReply.setHtml(html.toString());
    activeChar.sendPacket(adminReply);

  }
View Full Code Here

Examples of javolution.text.TextBuilder

  }

  private TextBuilder itemListHtml(L2TradeList tradeList, int page)
  {
    TextBuilder replyMSG = new TextBuilder();

    replyMSG.append("<html><title>Merchant Shop List Page: "+page+"</title>");
    replyMSG.append("<body>");
    replyMSG.append("<br>Edit, add or delete entries in a merchantList.");
    replyMSG.append("<table>");
    replyMSG.append("<tr><td width=150>Item Name</td><td width=60>Price</td><td width=40>Delete</td></tr>");
    int start = ((page-1) * PAGE_LIMIT);
    int end = Math.min(((page-1) * PAGE_LIMIT) + (PAGE_LIMIT-1), tradeList.getItems().size() - 1);
    for (L2ItemInstance item : tradeList.getItems(start, end+1))
    {
      replyMSG.append("<tr><td><a action=\"bypass -h admin_editShopItem "+tradeList.getListId()+" "+item.getItemId()+"\">"+item.getItem().getName()+"</a></td>");
      replyMSG.append("<td>"+item.getPriceToSell()+"</td>");
      replyMSG.append("<td><button value=\"Del\" action=\"bypass -h admin_delShopItem "+tradeList.getListId()+" "+item.getItemId()+"\" width=40 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\"></td>");
      replyMSG.append("</tr>");
    }//*/
    replyMSG.append("<tr>");
    int min = 1;
    int max = tradeList.getItems().size() / PAGE_LIMIT + 1;
    if (page > 1)
    {
      replyMSG.append("<td><button value=\"Page"+(page - 1)+"\" action=\"bypass -h admin_showShopList "+tradeList.getListId()+" "+(page - 1)+"\" width=40 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\"></td>");
    }
    if (page < max)
    {
      if (page <= min)
        replyMSG.append("<td></td>");
      replyMSG.append("<td><button value=\"Page"+(page + 1)+"\" action=\"bypass -h admin_showShopList "+tradeList.getListId()+" "+(page + 1)+"\" width=40 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\"></td>");
    }
    replyMSG.append("</tr><tr><td>.</td></tr>");
    replyMSG.append("</table>");
    replyMSG.append("<center>");
    replyMSG.append("<button value=\"Add\" action=\"bypass -h admin_addShopItem "+tradeList.getListId()+"\" width=100 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\">");
    replyMSG.append("<button value=\"Close\" action=\"bypass -h admin_close_window\" width=100 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\">");
    replyMSG.append("</center></body></html>");

    return replyMSG;
  }
View Full Code Here

Examples of org.apache.jasper.compiler.ELParser.TextBuilder

            // Not strictly true but enables us to report both
            iae.initCause(elException);
            throw iae;
        }

        TextBuilder textBuilder = new TextBuilder(false);

        nodes.visit(textBuilder);

        Assert.assertEquals(input, textBuilder.getText());
    }
View Full Code Here

Examples of org.apache.jasper.compiler.ELParser.TextBuilder


    private void doTestParser(String input) throws JasperException {
        Nodes nodes = ELParser.parse(input, false);

        TextBuilder textBuilder = new TextBuilder();

        nodes.visit(textBuilder);

        Assert.assertEquals(input, textBuilder.getText());
    }
View Full Code Here

Examples of org.apache.jasper.compiler.ELParser.TextBuilder

    }

    private void doTestParser(String input) throws JasperException {
        Nodes nodes = ELParser.parse(input, false);

        TextBuilder textBuilder = new TextBuilder();

        nodes.visit(textBuilder);

        assertEquals(input, textBuilder.getText());
    }
View Full Code Here

Examples of org.apache.jasper.compiler.ELParser.TextBuilder


    private void doTestParser(String input) throws JasperException {
        Nodes nodes = ELParser.parse(input, false);

        TextBuilder textBuilder = new TextBuilder();

        nodes.visit(textBuilder);

        Assert.assertEquals(input, textBuilder.getText());
    }
View Full Code Here

Examples of org.librebiz.pureport.context.TextBuilder

public class Test2 extends javax.swing.JFrame {

    /** Creates new form Test2 */
    public Test2() {
        initComponents();
        TextBuilder builder = new TextBuilder();
        builder.setAttribute(
                TextAttribute.JUSTIFICATION, TextAttribute.JUSTIFICATION_FULL);
        builder.setAttribute(TextAttribute.FAMILY, "Verdana");
        builder.setAttribute(TextAttribute.SIZE, new Float(24));
        for (int i = 0; i < 20; ++i) {
            builder.append("Verdana ");
        }
        builder.setAttribute(TextAttribute.POSTURE, TextAttribute.POSTURE_OBLIQUE);
        for (int i = 0; i < 20; ++i) {
            builder.append("Oblique ");
        }
        builder.setAttribute(TextAttribute.POSTURE, null);
        builder.setAttribute(TextAttribute.WEIGHT, TextAttribute.WEIGHT_BOLD);
        for (int i = 0; i < 20; ++i) {
            builder.append("Bold ");
        }
        builder.setAttribute(TextAttribute.POSTURE, TextAttribute.POSTURE_OBLIQUE);
        for (int i = 0; i < 20; ++i) {
            builder.append("Bold&Oblique ");
        }
        builder.setAttribute(TextAttribute.BACKGROUND, Color.RED);
        builder.setAttribute(TextAttribute.FOREGROUND, Color.WHITE);
        for (int i = 0; i < 20; ++i) {
            builder.append("White-on-red ");
        }
        textView.setTextBuilder(builder);
    }
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.