Package com.vaadin.ui

Examples of com.vaadin.ui.PopupView$Content


    private final Log log = new Log(5);

    @Override
    protected void setup(VaadinRequest request) {
        addComponent(log);
        addComponent(new PopupView("PopupView", new Button("Button",
                new Button.ClickListener() {
                    @Override
                    public void buttonClick(ClickEvent event) {
                        log.log("Button clicked");
                    }
View Full Code Here


        return 3043;
    }

    @Override
    protected void setup() {
        PopupView pv = new PopupView(new Content() {

            RichTextArea rte = new RichTextArea();

            VerticalLayout vl = new VerticalLayout();
View Full Code Here

*/
public class PopupViewInEmbeddedApplication extends TestBase {

    @Override
    protected void setup() {
        PopupView pop = new PopupView("Click me!", new Label(
                "I popped up, woohoo!"));
        addComponent(pop);
    }
View Full Code Here

        Label expander = new Label();
        gl.addComponent(expander, 1, 0);
        gl.setColumnExpandRatio(1, 1);

        gl.addComponent(
                new PopupView("Click here to popup", new Label("test")), 0, 0);
        gl.addComponent(
                new PopupView("Click here to popup", new Label("test")), 2, 0);

        addComponent(gl);
    }
View Full Code Here

*/
public class PopupViewShortcutActionHandler extends AbstractTestUI {

    @Override
    protected void setup(VaadinRequest request) {
        addComponent(new PopupView(new DemoPoupView()));
    }
View Full Code Here

            panel.setCaption("Verification result");
            panel.getContent().addComponent(m_plainText);
            panel.setWidth("800px");
            panel.setHeight("300px");

            m_popup = new PopupView("Result", panel);
            m_popup.setCaption("Verification result");
            m_popup.setHideOnMouseOut(false);
            m_popup.setVisible(false);

            Button verify = new Button("Verify", this);
View Full Code Here

        formLayout.addComponent(activeField = fieldGroup.buildAndBind("Aktif", "active"));
        activeField.addValidator(new BeanValidator(Mahasiswa.class, "active"));
       
        formLayout.addComponent(dosenPembimbingField = fieldGroup.buildAndBind("Dosen Pembimbing", "dosenPembimbing"));
       
        PopupView view = new PopupView(new PopupView.Content() {
                @Override
                public String getMinimizedValueAsHTML() {
                    return "Select...";
                }
View Full Code Here

    public void init() {
        addStyleName("contact");
        setWidth("120px");

        viewPopup = new ContactViewPopup(contact, presenter);
        PopupView popupView = new PopupView(intelligentName(contact.getName()), viewPopup);
        popupView.setStyleName("contact-font");
        popupView.setHideOnMouseOut(false);
        popupView.setWidth("100%");
        addComponent(popupView);
    }
View Full Code Here

            panel.setCaption("Verification result");
            panel.getContent().addComponent(m_plainText);
            panel.setWidth("800px");
            panel.setHeight("300px");

            m_popup = new PopupView("Result", panel);
            m_popup.setCaption("Verification result");
            m_popup.setHideOnMouseOut(false);
            m_popup.setVisible(false);

            Button verify = new Button("Verify", this);
View Full Code Here

    sentence+="\t\t\t<s snum=\""+String.valueOf(s)+"\">\n";
    ArrayList<Content> stack=new ArrayList<Content>();
    stack.addAll(body.getContent());
    while(stack.size()>0)
    {
      Content c=stack.get(0);
      stack.remove(0);
      if(c.getCType().equals(CType.Text))//actual text
      {
        //a dot creates a new sentence after processing
        String line=c.getValue().trim();
        while(!line.equals(""))
        {         
          int idx=line.indexOf(" ");
          String words;
          if(idx>=0)
            words=line.substring(0,idx);
          else
            words=line;
          line=line.substring(words.length()).trim();
          String punct=words.replaceAll("\\p{Punct}","�");
          int index=0;
          while(!punct.equals(""))
          {
            idx=punct.indexOf("�");
            String word;
            if(idx>=0)
              word=punct.substring(0,idx);
            else
              word=punct;
            if(word.equals(""))
            {
              //first the punctuation then the word
              //add a punc node
             
              if(words.charAt(index)=='<')
              {
                sentence+="\t\t\t\t<punc>&lt;</punc>\n";
              }
              else
              {
                if(words.charAt(index)=='>')
                  sentence+="\t\t\t\t<punc>&gt;</punc>\n";
                else
                  sentence+="\t\t\t\t<punc>"+words.charAt(index)+"</punc>\n";
              }
              if(words.charAt(index)=='.')
              {
                sentence+=("\t\t\t</s>\n");
                if(sentence.contains("wf"))
                {
                  System.out.print(".");
                  s++;
                  paragraph+=sentence;
                }
                sentence="\t\t\t<s snum=\""+String.valueOf(s)+"\">\n";
              }
              index++;
              punct=punct.substring(1);
            }
            else
            {
              index+=word.length();
              sentence+="\t\t\t\t<wf cmd=\"tag\" pos=\"\" lemma=\""+word+"\" wnsn=\"0\" lexsn=\"NA\">";
              sentence+=word;
              sentence+="</wf>\n";
              punct=punct.substring(word.length());
            }
             
          }
           
        }
      }
      if(c.getCType().equals(CType.Element))//other html elements such a or table should extract the text inside these elements
      {
        Element current=(Element)c;
        //tr creates a new sentence after processing
        String href=current.getAttributeValue("href");
     
View Full Code Here

TOP

Related Classes of com.vaadin.ui.PopupView$Content

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.