Package org.apache.wicket.markup.html.image

Examples of org.apache.wicket.markup.html.image.Image


            @Override
            protected Component getComponentForProperty(String id, IModel itemModel,
                    Property<LayerInfo> property) {
                if(property == TYPE) {
                    Fragment f = new Fragment(id, "iconFragment", LayerPage.this);
                    f.add(new Image("layerIcon", icons.getSpecificLayerIcon((LayerInfo) itemModel.getObject())));
                    return f;
                } else if(property == WORKSPACE) {
                    return workspaceLink(id, itemModel);
                } else if(property == STORE) {
                    return storeLink(id, itemModel);
                } else if(property == NAME) {
                    return layerLink(id, itemModel);
                } else if(property == ENABLED) {
                    LayerInfo layerInfo = (LayerInfo) itemModel.getObject();
                    // ask for enabled() instead of isEnabled() to account for disabled resource/store
                    boolean enabled = layerInfo.enabled();
                    ResourceReference icon = enabled? icons.getEnabledIcon() : icons.getDisabledIcon();
                    Fragment f = new Fragment(id, "iconFragment", LayerPage.this);
                    f.add(new Image("layerIcon", icon));
                    return f;
                } else if(property == SRS) {
                    return new Label(id, SRS.getModel(itemModel));
                }
                throw new IllegalArgumentException("Don't know a property named " + property.getName());
View Full Code Here


            final StoreInfo storeInfo = (StoreInfo) itemModel.getObject();

            ResourceReference storeIcon = icons.getStoreIcon(storeInfo);

            Fragment f = new Fragment(id, "iconFragment", StorePanel.this);
            f.add(new Image("storeIcon", storeIcon));

            return f;
        } else if (property == WORKSPACE) {
            return workspaceLink(id, itemModel);
        } else if (property == NAME) {
            return storeNameLink(id, itemModel);
        } else if (property == ENABLED) {
            final StoreInfo storeInfo = (StoreInfo) itemModel.getObject();
            ResourceReference enabledIcon;
            if (storeInfo.isEnabled()) {
                enabledIcon = icons.getEnabledIcon();
            } else {
                enabledIcon = icons.getDisabledIcon();
            }
            Fragment f = new Fragment(id, "iconFragment", StorePanel.this);
            f.add(new Image("storeIcon", enabledIcon));
            return f;
        }
        throw new IllegalArgumentException("Don't know a property named " + property.getName());
    }
View Full Code Here

          throw new WicketRuntimeException(e);
        }

        final byte[] imageData = baos.toByteArray();

        item.add(new Image("image", new DynamicImageResource("jpeg")
        {
          private static final long serialVersionUID = 1L;

          @Override
          protected byte[] getImageData(Attributes attributes)
View Full Code Here

          "parent_trigger");
      parentTrigger.add(new SimpleAttributeModifier("onclick",
          "javascript:showBranch('" + branchId + "');swapFolder('" + folderId
              + "');"));

      Image folderImage = new Image("parent_folder");
      folderImage.add(new SimpleAttributeModifier("id", folderId));
      parentTrigger.add(folderImage);
      parentTrigger.add(new Label("parent_product_name", node.getNodeProduct()
          .getProductName()));
      hasChildren.add(parentTrigger);
View Full Code Here

    add(new Label("report_date", report.getCreateDateIsoFormat()));
    add(new Label("fmurl", report.getFmStatus().getUrlStr()));
    add(new Label("wmurl", report.getWmStatus().getUrlStr()));
    add(new Label("rmurl", report.getRmStatus().getUrlStr()));

    add(new Image("fmstatus_icon", getUpOrDownArrowRef(report.getFmStatus()
        .getStatus())));
    add(new Image("wmstatus_icon", getUpOrDownArrowRef(report.getWmStatus()
        .getStatus())));
    add(new Image("rmstatus_icon", getUpOrDownArrowRef(report.getRmStatus()
        .getStatus())));

    ListModel crawlerStatusListModel = new ListModel(report.getCrawlerStatus());
    add(new VisibilityAndSortToggler("crawler_toggler",
        "crawler_status_showall", "crawler_status_hide", "crawler_status_sort",
        "crawler_status_unsort", "crawler_status_more", crawlerStatusListModel));

    add(new ListView<CrawlerStatus>("crawler_status_list",
        crawlerStatusListModel) {
      /*
       * (non-Javadoc)
       *
       * @see
       * org.apache.wicket.markup.html.list.ListView#populateItem(org.apache
       * .wicket.markup.html.list.ListItem)
       */
      @Override
      protected void populateItem(ListItem<CrawlerStatus> statusItem) {
        CrawlerStatus status = statusItem.getModelObject();
        String statusString = status.getInfo().getCrawlerName() + " ("
            + status.getCrawlHost() + ":" + status.getInfo().getCrawlerPort()
            + ")";
        statusItem.add(new Label("crawler_name_and_url", statusString));
        statusItem.add(new Image("crawler_status_icon",
            getUpOrDownArrowRef(status.getStatus())));
      }
    });

    ListModel batchStubStatusListModel = new ListModel(
        report.getBatchStubStatus());
    add(new VisibilityAndSortToggler("batch_stub_toggler",
        "batch_stub_showall", "batch_stub_hide", "batch_stub_sort",
        "batch_stub_unsort", "batch_stub_more", batchStubStatusListModel));

    add(new ListView<PCSDaemonStatus>("batch_stub_list",
        batchStubStatusListModel) {

      @Override
      protected void populateItem(ListItem<PCSDaemonStatus> item) {
        item.add(new Label("batch_stub_url", item.getModelObject().getUrlStr()));
        item.add(new Image("batch_stub_status_icon", getUpOrDownArrowRef(item
            .getModelObject().getStatus())));

      }
    });

View Full Code Here

   * @return icon image component
   */
  protected Component newImageComponent(String componentId, final BaseTree tree,
    final IModel model)
  {
    return new Image(componentId)
    {
      private static final long serialVersionUID = 1L;

      @Override
      protected ResourceReference getImageResourceReference()
View Full Code Here

        @Override
        public void onClick()
        {
          InputForm.this.modelChanged();
        }
      }.add(new Image("resetButtonImage")));
    }
View Full Code Here

    // create and add components

    try {

      AuthorityImageResource graph = new AuthorityImageResource(authority);
      this.add(new Image("graph", graph));
    } catch (StoreException ex) {

      this.add(new EmptyComponent("graph"));
    }
View Full Code Here

    // create and add components

    try {

      SubSegmentImageResource graph = new SubSegmentImageResource(subSegment);
      this.add(new Image("graph", graph));
    } catch (StoreException ex) {

      this.add(new EmptyComponent("graph"));
    }
View Full Code Here

    // create and add components

    try {

      AuthorityImageResource graph = new AuthorityImageResource(authority);
      this.add(new Image("graph", graph));
    } catch (StoreException ex) {

      this.add(new EmptyComponent("graph"));
    }
View Full Code Here

TOP

Related Classes of org.apache.wicket.markup.html.image.Image

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.