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

            private static final long serialVersionUID = 4949588177564901031L;

            @Override
            protected void populateItem(final ListItem<StatusBean> item) {
                final Image image;
                final String alt, title;
                boolean checkVisibility = true;

                switch (item.getModelObject().getStatus()) {

                    case NOT_YET_SUBMITTED:
                        image = newImage(StatusUtils.Status.UNDEFINED.toString());
                        alt = "undefined icon";
                        title = "Not yet submitted";
                        break;

                    case ACTIVE:
                        image = newImage(StatusUtils.Status.ACTIVE.toString());
                        alt = "active icon";
                        title = "Enabled";
                        break;

                    case UNDEFINED:
                        image = newImage(StatusUtils.Status.UNDEFINED.toString());
                        checkVisibility = false;
                        alt = "undefined icon";
                        title = "Undefined status";
                        break;

                    case OBJECT_NOT_FOUND:
                        image = newImage(StatusUtils.Status.OBJECT_NOT_FOUND.toString());
                        checkVisibility = false;
                        alt = "notfound icon";
                        title = "User not found";
                        break;

                    default:
                        image = newImage(StatusUtils.Status.SUSPENDED.toString());
                        alt = "inactive icon";
                        title = "Disabled";
                }

                image.add(new Behavior() {

                    private static final long serialVersionUID = 1469628524240283489L;

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

        statusBeansListView.setReuseItems(true);
        checkGroup.add(statusBeansListView);
    }

    private Image newImage(final String imageStatus) {
        return new Image("icon", IMG_STATUES + imageStatus + Constants.PNG_EXT);
    }
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

            private static final long serialVersionUID = 4949588177564901031L;

            @Override
            protected void populateItem(final ListItem<StatusBean> item) {
                final Image image;
                final String alt, title;
                boolean checkVisibility = true;

                switch (item.getModelObject().getStatus()) {

                    case NOT_YET_SUBMITTED:
                        image = newImage(StatusUtils.Status.UNDEFINED.toString());
                        alt = "undefined icon";
                        title = "Not yet submitted";
                        break;

                    case ACTIVE:
                        image = newImage(StatusUtils.Status.ACTIVE.toString());
                        alt = "active icon";
                        title = "Enabled";
                        break;

                    case UNDEFINED:
                        image = newImage(StatusUtils.Status.UNDEFINED.toString());
                        checkVisibility = false;
                        alt = "undefined icon";
                        title = "Undefined status";
                        break;

                    case OBJECT_NOT_FOUND:
                        image = newImage(StatusUtils.Status.OBJECT_NOT_FOUND.toString());
                        checkVisibility = false;
                        alt = "notfound icon";
                        title = "User not found";
                        break;

                    default:
                        image = newImage(StatusUtils.Status.SUSPENDED.toString());
                        alt = "inactive icon";
                        title = "Disabled";
                }

                image.add(new Behavior() {

                    private static final long serialVersionUID = 1469628524240283489L;

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

        statusBeansListView.setReuseItems(true);
        checkGroup.add(statusBeansListView);
    }

    private Image newImage(final String imageStatus) {
        return new Image("icon", IMG_STATUES + imageStatus + Constants.PNG_EXT);
    }
View Full Code Here

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

      protected void onComponentTag(ComponentTag tag)
      {
        super.onComponentTag(tag);
        tag.getAttributes().put("onclick", Palette.this.getUpOnClickJS());
      }
    }.add(new Image("image", UP_IMAGE));
  }
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.