Package org.apache.wicket.util.collections

Examples of org.apache.wicket.util.collections.ArrayListStack


        {
          if (tag.isOpen())
          {
            if (autolinkStatus == null)
            {
              autolinkStatus = new ArrayListStack();
            }

            // remember the current setting to be reset after the
            // region
            autolinkStatus.push(new Boolean(autolinking));
View Full Code Here


    add(new Label("name", pageMap.getName() == null ? "null" : pageMap.getName()));
    add(new Label("size", "" + Bytes.bytes(pageMap.getSizeInBytes())));

    // Get entry accesses
    // Get entry accesses
    final ArrayListStack accessStack;
    if (pageMap instanceof AccessStackPageMap)
    {
      accessStack = ((AccessStackPageMap)pageMap).getAccessStack();
    }
    else
    {
      accessStack = new ArrayListStack();
    }
    final List reversedAccessStack = new ArrayList();
    reversedAccessStack.addAll(accessStack);
    Collections.reverse(reversedAccessStack);

    // Create the table containing the list the components
    add(new ListView("accesses", reversedAccessStack)
    {
      private static final long serialVersionUID = 1L;

      /**
       * Populate the table with Wicket elements
       */
      protected void populateItem(final ListItem listItem)
      {
        final Access access = (Access)listItem.getModelObject();
        IPageMapEntry entry = pageMap.getEntry(access.getId());
        PageParameters parameters = new PageParameters();
        parameters.put("pageId", "" + entry.getNumericId());
        Link link = new BookmarkablePageLink("link", InspectorPage.class, parameters);
        link.add(new Label("id", "" + entry.getNumericId()));
        listItem.add(link);
        listItem.add(new Label("class", "" + entry.getClass().getName()));
        long size;
        int versions;
        if (entry instanceof Page)
        {
          Page page = (Page)entry;
          page.detachModels();
          size = page.getSizeInBytes();
          versions = page.getVersions();
        }
        else
        {
          size = Objects.sizeof(entry);
          versions = 0;
        }
        listItem.add(new Label("access", "" + (accessStack.size() - listItem.getIndex())));
        listItem.add(new Label("version", "" + access.getVersion()));
        listItem.add(new Label("versions", "" + versions));
        listItem.add(new Label("size", size == -1 ? "[Unknown]" : "" + Bytes.bytes(size)));
      }
    });
View Full Code Here

        {
          if (tag.isOpen())
          {
            if (autolinkStatus == null)
            {
              autolinkStatus = new ArrayListStack();
            }

            // remember the current setting to be reset after the
            // region
            autolinkStatus.push(Boolean.valueOf(autolinking));
View Full Code Here

    add(new Label("name", pageMap.getName() == null ? "null" : pageMap.getName()));
    add(new Label("size", "" + Bytes.bytes(pageMap.getSizeInBytes())));

    // Get entry accesses
    // Get entry accesses
    final ArrayListStack accessStack;
    if (pageMap instanceof AccessStackPageMap)
    {
      accessStack = ((AccessStackPageMap)pageMap).getAccessStack();
    }
    else
    {
      accessStack = new ArrayListStack();
    }
    final List reversedAccessStack = new ArrayList();
    reversedAccessStack.addAll(accessStack);
    Collections.reverse(reversedAccessStack);

    // Create the table containing the list the components
    add(new ListView("accesses", reversedAccessStack)
    {
      private static final long serialVersionUID = 1L;

      /**
       * Populate the table with Wicket elements
       */
      protected void populateItem(final ListItem listItem)
      {
        final Access access = (Access)listItem.getModelObject();
        IPageMapEntry entry = pageMap.getEntry(access.getId());
        PageParameters parameters = new PageParameters();
        parameters.put("pageId", "" + entry.getNumericId());
        Link link = new BookmarkablePageLink("link", InspectorPage.class, parameters);
        link.add(new Label("id", "" + entry.getNumericId()));
        listItem.add(link);
        listItem.add(new Label("class", "" + entry.getClass().getName()));
        long size;
        int versions;
        if (entry instanceof Page)
        {
          Page page = (Page)entry;
          page.detachModels();
          size = page.getSizeInBytes();
          versions = page.getVersions();
        }
        else
        {
          size = Objects.sizeof(entry);
          versions = 0;
        }
        listItem.add(new Label("access", "" + (accessStack.size() - listItem.getIndex())));
        listItem.add(new Label("version", "" + access.getVersion()));
        listItem.add(new Label("versions", "" + versions));
        listItem.add(new Label("size", size == -1 ? "[Unknown]" : "" + Bytes.bytes(size)));
      }
    });
View Full Code Here

   */
  public boolean isDocumentValid(final String document)
  {
    HtmlDocumentParser parser = new HtmlDocumentParser(document);
    Iterator expectedElements = elements.iterator();
    ArrayListStack iteratorStack = new ArrayListStack();
    ArrayListStack tagNameStack = new ArrayListStack();

    boolean end = false;
    boolean valid = true;
    while (!end)
    {
View Full Code Here

        {
          if (tag.isOpen())
          {
            if (autolinkStatus == null)
            {
              autolinkStatus = new ArrayListStack();
            }

            // remember the current setting to be reset after the
            // region
            autolinkStatus.push(new Boolean(autolinking));
View Full Code Here

  /**
   * Construct.
   */
  public TreeState()
  {
    tempStacks = new ArrayListStack();
    treePathMapping = new Hashtable();
    info = new SearchInfo();
  }
View Full Code Here

      {
        return null;
      }

      // Check all the parent paths, until a match is found.
      ArrayListStack paths;

      if (tempStacks.size() == 0)
      {
        paths = new ArrayListStack();
      }
      else
      {
        paths = (ArrayListStack)tempStacks.pop();
      }

      try
      {
        paths.push(path);
        path = path.getParentPath();
        while (path != null)
        {
          node = getMapping(path);
          if (node != null)
          {
            // Found a match, create entries for all paths in
            // paths.
            while (node != null && paths.size() > 0)
            {
              path = (TreePath) paths.pop();
              node = node.createChildFor(path.getLastPathComponent());
            }
            return node;
          }
          paths.push(path);
          path = path.getParentPath();
        }
      }
      finally
      {
        paths.clear();
        tempStacks.push(paths);
      }
      // If we get here it means they share a different root!
      return null;
    }
View Full Code Here

   */
  public boolean isDocumentValid(final String document)
  {
    HtmlDocumentParser parser = new HtmlDocumentParser(document);
    Iterator expectedElements = elements.iterator();
    ArrayListStack iteratorStack = new ArrayListStack();
    ArrayListStack tagNameStack = new ArrayListStack();

    boolean end = false;
    boolean valid = true;
    while (!end)
    {
View Full Code Here

     */
    public boolean isDocumentValid(final String document)
    {
        HtmlDocumentParser parser = new HtmlDocumentParser(document);
        Iterator expectedElements = elements.iterator();
        ArrayListStack iteratorStack = new ArrayListStack();
        ArrayListStack tagNameStack = new ArrayListStack();

        boolean end = false;
        boolean valid = true;
        while (!end)
        {
View Full Code Here

TOP

Related Classes of org.apache.wicket.util.collections.ArrayListStack

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.