Examples of BulletList


Examples of org.appfuse.client.widget.BulletList

     * style="display: none;"/>
     */
    final Label grow = new Label();
    panel.add(grow);
    grow.addStyleName("grow");
    final BulletList list = new BulletList();
    list.setStyleName("token-input-list-facebook");
    final ListItem item = new ListItem();
    item.setStyleName("token-input-input-token-facebook");
    itemBox
        .getElement()
        .setAttribute(
            "style",
            "outline-color: -moz-use-text-color; outline-style: none; outline-width: medium;");
    box.getElement().setId("suggestion_box");
    item.add(box);
    list.add(item);

    // this needs to be on the itemBox rather than box, or backspace will
    // get executed twice
    itemBox.addKeyDownHandler(new KeyDownHandler() {
      public void onKeyDown(KeyDownEvent event) {
        if (event.getNativeKeyCode() == KeyCodes.KEY_ENTER) {
          // only allow manual entries with @ signs (assumed email
          // addresses)
          if (itemBox.getValue().contains("@"))
            deselectItem(itemBox, list);
        }
        // handle backspace
        if (event.getNativeKeyCode() == KeyCodes.KEY_BACKSPACE) {
          if ("".equals(itemBox.getValue().trim())) {
            ListItem li = (ListItem) list.getWidget(list
                .getWidgetCount() - 2);
            Paragraph p = (Paragraph) li.getWidget(0);
            if (itemsSelected.contains(p.getText())) {
              itemsSelected.remove(p.getText());
              GWT.log("Removing selected item '" + p.getText()
                  + "'", null);
              GWT.log("Remaining: " + itemsSelected, null);
            }
            list.remove(li);
            itemBox.setFocus(true);
            fireComponentResized();
          }
        }

View Full Code Here

Examples of org.htmlparser.tags.BulletList

    }

    public Tag createTag(TagData tagData, CompositeTagData compositeTagData)
        throws ParserException
    {
        return new BulletList(tagData, compositeTagData);
    }
View Full Code Here

Examples of org.htmlparser.tags.BulletList

        parseAndAssertNodeCount(1);

        NodeList nestedBulletLists =
            ((CompositeTag) node[0]).searchFor(BulletList.class);
        assertEquals("bullets in first list", 2, nestedBulletLists.size());
        BulletList firstList = (BulletList) nestedBulletLists.elementAt(0);
        Bullet firstBullet = (Bullet) firstList.childAt(0);
        Node firstNodeInFirstBullet = firstBullet.childAt(0);
        assertType(
            "first child in bullet",
            StringNode.class,
            firstNodeInFirstBullet);
View Full Code Here

Examples of org.htmlparser.tags.BulletList

    public PrototypicalNodeFactory registerTags ()
    {
        registerTag (new AppletTag ());
        registerTag (new BaseHrefTag ());
        registerTag (new Bullet ());
        registerTag (new BulletList ());
        registerTag (new DefinitionList ());
        registerTag (new DefinitionListBullet ());
        registerTag (new DoctypeTag ());
        registerTag (new FormTag ());
        registerTag (new FrameSetTag ());
View Full Code Here

Examples of org.htmlparser.tags.BulletList

        assertEquals(
            "bullets in first list",
            2,
            nestedBulletLists.size()
        );
        BulletList firstList =
            (BulletList)nestedBulletLists.elementAt(0);
        Bullet firstBullet =
            (Bullet)firstList.childAt(0);
        Node firstNodeInFirstBullet =
            firstBullet.childAt(0);
        assertType(
            "first child in bullet",
            Text.class,
View Full Code Here

Examples of org.htmlparser.tags.BulletList

    super(filter, MATCH_STRING, ENDERS);
    parser.addScanner(new BulletScanner("-bullet", ulli));
  }

  public Tag createTag(TagData tagData, CompositeTagData compositeTagData) throws ParserException {
    return new BulletList(tagData, compositeTagData);
  }
View Full Code Here

Examples of org.htmlparser.tags.BulletList

    parser.registerScanners();
    parseAndAssertNodeCount(1);

    NodeList nestedBulletLists = ((CompositeTag) node[0]).searchFor(BulletList.class);
    assertEquals("bullets in first list", 2, nestedBulletLists.size());
    BulletList firstList = (BulletList) nestedBulletLists.elementAt(0);
    Bullet firstBullet = (Bullet) firstList.childAt(0);
    Node firstNodeInFirstBullet = firstBullet.childAt(0);
    assertType("first child in bullet", StringNode.class, firstNodeInFirstBullet);
    assertStringEquals("expected text", "Energy supply\r\n" + " (Campbell)  ", firstNodeInFirstBullet
        .toPlainTextString());
  }
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.