Package org.cast.isi.panel

Examples of org.cast.isi.panel.GlossaryLink


    whiteboardLink = new BookmarkablePageLink<Page>("whiteboardLink", application.getWhiteboardPageClass());
    application.setLinkProperties(whiteboardLink);
    whiteboardLink.setVisible(application.isWhiteboardOn());
    add(whiteboardLink);
   
    glossaryLink = new GlossaryLink("glossaryLink", null);
    application.setLinkProperties(glossaryLink);
    glossaryLink.setVisible(application.isGlossaryOn());
    add(glossaryLink);
   
View Full Code Here


        return new EmptyPanel(wicketId);
       
      } else {
        // Default case: glossary type is MAIN, or we wanted a modal but have no place to put it
        // (eg, we're in a popup window, or modal window)
        GlossaryLink glossaryLink = new GlossaryLink(wicketId, wordModel);
        ISIApplication.get().setLinkProperties(glossaryLink);
        return glossaryLink;
      }
             
    // inline glossary: linked word
    } else if (wicketId.startsWith("glossword")) {
      WebMarkupContainer glossaryWord = new WebMarkupContainer(wicketId);
      glossaryWord.setVisible(ISIApplication.get().glossaryLinkType.equals(ISIApplication.GLOSSARY_TYPE_INLINE));
      return glossaryWord;
     
    // inline glossary: definition
    } else if (wicketId.startsWith("glossdef")) {
      // Span element, to be filled in with the glossary short def.
      String word = elt.getAttribute("word");
      final String def = ISIApplication.get().getGlossary().getShortDefById(word);
      WebMarkupContainer container;
      container = new WebMarkupContainer(wicketId) {
        private static final long serialVersionUID = 1L;
        @Override
        protected void onComponentTagBody(MarkupStream markupStream, ComponentTag openTag) {
          replaceComponentTagBody(markupStream, openTag, def);
        }
      };
      container.add(new AttributeRemover("word"));
      container.setVisible(ISIApplication.get().glossaryLinkType.equals(ISIApplication.GLOSSARY_TYPE_INLINE));
      return container;

    // inline glossary: "more" link to main glossary window     
    } else if (wicketId.startsWith("glosslink")) {
      IModel<String> wordModel = new Model<String>(elt.getAttribute("word"));
      GlossaryLink glossaryLink = new GlossaryLink(wicketId, wordModel);
      ISIApplication.get().setLinkProperties(glossaryLink);
      glossaryLink.setVisible(ISIApplication.get().glossaryLinkType.equals(ISIApplication.GLOSSARY_TYPE_INLINE));
      return glossaryLink;
   
    } else if (wicketId.startsWith("link_")) {
      String href = elt.getAttribute("href");
      // According to NIMAS, href should be in the form "filename.xml#ID"  or just "#ID" for within-file link
View Full Code Here

TOP

Related Classes of org.cast.isi.panel.GlossaryLink

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.