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

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


      protected void onComponentTag(ComponentTag tag)
      {
        super.onComponentTag(tag);
        tag.getAttributes().put("onclick", Palette.this.getRemoveOnClickJS());
      }
    }.add(new Image("image", REMOVE_IMAGE));
  }
View Full Code Here


      protected void onComponentTag(ComponentTag tag)
      {
        super.onComponentTag(tag);
        tag.getAttributes().put("onclick", Palette.this.getAddOnClickJS());
      }
    }.add(new Image("image", ADD_IMAGE));
  }
View Full Code Here

                    attrhead.add(new Label("resource", propTO.getResource()));

                    attrhead.add(new Label("propagation", propTO.getStatus() == null
                            ? "UNDEFINED" : propTO.getStatus().toString()));

                    final Image image;
                    final String alt, title;
                    switch (propTO.getStatus()) {

                        case SUCCESS:
                        case SUBMITTED:
                        case CREATED:
                            image = new Image("icon", IMG_STATUSES + StatusUtils.Status.ACTIVE.toString()
                                    + Constants.PNG_EXT);
                            alt = "success icon";
                            title = "success";
                            break;

                        default:
                            image = new Image("icon", IMG_STATUSES + StatusUtils.Status.SUSPENDED.toString()
                                    + Constants.PNG_EXT);
                            alt = "failure icon";
                            title = "failure";
                    }

                    image.add(new Behavior() {

                        private static final long serialVersionUID = 1469628524240283489L;

                        @Override
                        public void onComponentTag(final Component component, final ComponentTag tag) {
View Full Code Here

     * @param resourceName resource name
     * @param objectTO connector object TO
     * @return fragment.
     */
    private Fragment getStatusIcon(final String id, final String resourceName, final ConnObjectTO objectTO) {
        final Image image;
        final String alt, title;
        switch (statusUtils.getStatusBean(resourceName, objectTO).getStatus()) {

            case ACTIVE:
                image = new Image("status", IMG_STATUSES + StatusUtils.Status.ACTIVE.toString()
                        + Constants.PNG_EXT);
                alt = "active icon";
                title = "Enabled";
                break;

            case SUSPENDED:
                image = new Image("status", IMG_STATUSES + StatusUtils.Status.SUSPENDED.toString()
                        + Constants.PNG_EXT);
                alt = "inactive icon";
                title = "Disabled";
                break;

            default:
                image = null;
                alt = null;
                title = null;
        }

        final Fragment frag;
        if (image == null) {
            frag = new Fragment(id, "emptyFrag", this);
        } else {
            image.add(new Behavior() {

                private static final long serialVersionUID = 1469628524240283489L;

                @Override
                public void onComponentTag(final Component component, final ComponentTag tag) {
View Full Code Here

                    graphics.drawImage(imageValue, 0, 0, null);
                    return true;
                }

            };
            final Image image = new Image(ID_SCALAR_VALUE, imageResource);
            addOrReplace(image);
            addOrReplace(new ComponentFeedbackPanel(ID_FEEDBACK, image));
        } else {
            permanentlyHide(ID_SCALAR_VALUE, ID_FEEDBACK);
        }
View Full Code Here

          private static final long serialVersionUID = 1L;

          @Override
          protected void populateItem(final ListItem<OAuthServer> item) {
            Button btn = new Button("oauthBtn");
            Image icon = new Image("icon", new Model<String>());
            icon.setVisible(item.getModelObject().getIconUrl() != null &&
                !"".equals(item.getModelObject().getIconUrl()));
            icon.add(new AttributeModifier("src", new AbstractReadOnlyModel<String>() {

              private static final long serialVersionUID = 7257002837120721882L;

              @Override
              public String getObject() {
View Full Code Here

     border.setBorderBodyVisible(false);

     add(border);
    
       border.add(new TextField("text"));
       border.add(new Image("img"))
  }
View Full Code Here

                    attrhead.add(new Label("resource", propTO.getResource()));

                    attrhead.add(new Label("propagation", propTO.getStatus() == null
                            ? "UNDEFINED" : propTO.getStatus().toString()));

                    final Image image;
                    final String alt, title;
                    final ModalWindow failureWindow = new ModalWindow("failureWindow");
                    final AjaxLink<?> failureWindowLink = new AjaxLink<Void>("showFailureWindow") {

                        private static final long serialVersionUID = -7978723352517770644L;

                        @Override
                        public void onClick(AjaxRequestTarget target) {
                            failureWindow.show(target);
                        }
                    };

                    switch (propTO.getStatus()) {

                        case SUCCESS:
                        case SUBMITTED:
                        case CREATED:
                            image = new Image("icon", IMG_STATUSES + StatusUtils.Status.ACTIVE.toString()
                                    + Constants.PNG_EXT);
                            alt = "success icon";
                            title = "success";
                            failureWindow.setVisible(false);
                            failureWindowLink.setEnabled(false);
                            break;

                        default:
                            image = new Image("icon", IMG_STATUSES + StatusUtils.Status.SUSPENDED.toString()
                                    + Constants.PNG_EXT);
                            alt = "failure icon";
                            title = "failure";
                    }

                    image.add(new Behavior() {

                        private static final long serialVersionUID = 1469628524240283489L;

                        @Override
                        public void onComponentTag(final Component component, final ComponentTag tag) {
View Full Code Here

     * @param resourceName resource name
     * @param objectTO connector object TO
     * @return fragment.
     */
    private Fragment getStatusIcon(final String id, final String resourceName, final ConnObjectTO objectTO) {
        final Image image;
        final String alt, title;
        switch (statusUtils.getStatusBean(resourceName, objectTO).getStatus()) {

            case ACTIVE:
                image = new Image("status", IMG_STATUSES + StatusUtils.Status.ACTIVE.toString()
                        + Constants.PNG_EXT);
                alt = "active icon";
                title = "Enabled";
                break;

            case SUSPENDED:
                image = new Image("status", IMG_STATUSES + StatusUtils.Status.SUSPENDED.toString()
                        + Constants.PNG_EXT);
                alt = "inactive icon";
                title = "Disabled";
                break;

            default:
                image = null;
                alt = null;
                title = null;
        }

        final Fragment frag;
        if (image == null) {
            frag = new Fragment(id, "emptyFrag", this);
        } else {
            image.add(new Behavior() {

                private static final long serialVersionUID = 1469628524240283489L;

                @Override
                public void onComponentTag(final Component component, final ComponentTag tag) {
View Full Code Here

          }
        };
        link
            .add(new AttributeModifier("id", true, new Model("letter_"
                + letter.asString())));
        link.add(new Image("image", letter.getSharedImageResource()));
        listItem.add(link);
      }
    });
  }
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.