Package org.cast.cwm.components

Examples of org.cast.cwm.components.Icon


      link.setVisible(ISIApplication.get().isPageNumbersOn());
      link.add(new Label("pageNum", String.valueOf(pageNumDisplay)).setRenderBodyOnly(true));

      feedbackRequired = false;

      Icon envelopImage;
      if (page.equals(currentPage)) {
        envelopImage = new EnvelopImageWithStatusUpdate("icon", new Model<ISIXmlSection>(page));
        link.setEnabled(false);
        link.add(new ClassAttributeModifier("current"));
      } else {
        envelopImage = new EnvelopeImage("icon", new Model<ISIXmlSection>(page));
      }
     
      // for teachers add any of the status icons, for students, just add the envelope if appropriate
      if (teacher && (currentSectionStatus != null)) {
        // if the page has feedback (red envelope) then display the envelope
        // otherwise, display the needs review icon or no icon at all
        if ((currentSectionStatus.getCompleted() == true) &&
          (currentSectionStatus.getReviewed() == false) &&
          (!feedbackRequired)) {
          Icon icon = new Icon("icon", "img/icons/status_ready.png", "Ready for review");
          link.add(icon);
          // don't display the status icon if there's no response group on this page
          icon.setVisible(page.hasResponseGroup());
        } else {
          link.add(envelopImage);
        }
      } else { // just add the envelope for the student
        link.add(envelopImage);
View Full Code Here


    Boolean isComplete = sectionService.getSectionStatusMap(getUser()).get(new ContentLoc(currentSection).getLocation());

    if (isComplete == null)
      isComplete = false;

    Icon image = new Icon("img/icons/check_done.png", "Section Completed");
    if (!isComplete)
      image.setVisible(false);
    return image;
  }
View Full Code Here

    private static final long serialVersionUID = 1L;

    private GotItButton(String id) {
      super(id);
      add(new Icon("icon", "img/icons/response_positive.png", getAltText()));
      if (isMarkedCorrect())
        add(new AttributeAppender("class", new Model<String>("current"), " "));
    }
View Full Code Here

    private static final long serialVersionUID = 1L;

    private NotGotItButton(String id) {
      super(id);
      add(new Icon("icon", "img/icons/response_negative.png", getAltText()));
      if (isMarkedIncorrect())
        add(new AttributeAppender("class", new Model<String>("current"), " "));
    }
View Full Code Here

    };
      if (mUser == null) {
        flagLink.add(new ClassAttributeModifier("off"));
      }
   
      Icon flagImage = new Icon("flag-image",
          new AbstractReadOnlyModel<String>() {
        private static final long serialVersionUID = 1L;
        @Override
        public String getObject() {
          if (isFlagged())
View Full Code Here

    addOrReplace(getImage());
    super.onBeforeRender();
  }

  protected Icon getImage() {
    Icon image;
    if (isComplete()) {
      image = new DoneImage("doneImg");
      image.setVisible(featureService.isTocSectionCompleteIconsOn());
    }
    else {
      image = new NotDoneImage("doneImg");
      image.setVisible(featureService.isTocSectionIncompleteIconsOn());
    }
    return image;
  }
View Full Code Here

  public CorrectDelayedSingleSelectSummaryPanel(String id,
      List<Response> responses) {
    super(id);
    setOutputMarkupId(true);
    add(new Icon("score", "img/icons/response_positive.png", "Got it!"));
    add(new Label("count", String.valueOf(responses.size())));
    add(new StudentList("studentList", responses));
  }
View Full Code Here

  public IncorrectSingleSelectSummaryPanel(String id,
      List<Response> responses) {
    super(id);
    setOutputMarkupId(true);
    add(new Icon("score", "img/icons/response_negative.png", "Didn't get it."));
    add(new Label("count", String.valueOf(responses.size())));
    add(new StudentList("studentList", responses));
  }
View Full Code Here

    ResponseFeedbackButtonPanelVisitor responseVisitor = new ResponseFeedbackButtonPanelVisitor();
    getParent().visitChildren(ResponseFeedbackButtonPanel.class, responseVisitor);
    if (responseVisitor.state == null) {
      addOrReplace(new EmptyPanel("feedbackStatusIcon").setVisible(false));
    } else if (responseVisitor.state.equals("old")) {
      addOrReplace(new Icon("feedbackStatusIcon", "img/icons/envelope_large_old.png",
          new ResourceModel("feedback.indicatorText.previousFeedback.alt").getObject(),
          new ResourceModel("feedback.indicatorText.previousFeedback.title").getObject()));
    } else {
      addOrReplace(new Icon("feedbackStatusIcon", "img/icons/envelope_large_new.png",
          new ResourceModel("feedback.indicatorText.newFeedback.alt").getObject(),
          new ResourceModel("feedback.indicatorText.newFeedback.title").getObject()));
    }
    super.onBeforeRender();
 
View Full Code Here

   * Return an icon to use for a given XmlSection.
   * This will be based on the class attribute of the section, e.g. "reading" or "activity" or "overview".
   * It will have alt and title set as the title of the section.
   */
  public WebComponent iconFor(XmlSection section) {
    Icon icon = makeIcon("icon", section.getClassName());
    icon.setmAltText(Model.of(section.getTitle()));
    return icon;
  }
View Full Code Here

TOP

Related Classes of org.cast.cwm.components.Icon

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.