Package com.google.gwt.user.client.ui

Examples of com.google.gwt.user.client.ui.ClickListener


    if (!WadlTreeRoot.containsButton(buttonTreeItems, ApplicationItem.button + WadlXml.faultNode)) {
      // add fault button
      HorizontalPanel addFaultPanel = new HorizontalPanel();
     
      Button addFaultButton = new Button(GuiFactory.strings.addFault());
      addFaultButton.addClickListener(new ClickListener() {
        public void onClick(Widget sender) {       
          if (parentNode instanceof ApplicationNode) {
            FaultNode fault = new FaultNode(GuiFactory.strings.newFault(), (GenericNode) parentNode, (ApplicationNode) parentNode);
            fault.setId(GuiFactory.strings.newId());
            ((ApplicationNode) parentNode).addFault(fault);
View Full Code Here


      resourcePanel.add(input);
     
      resourcePanel.add(new HTML(SyntaxHighlighter.highlight("\" >")));
 
      Hyperlink removeResourceLink = new Hyperlink(GuiFactory.strings.remove(), true, "");
      removeResourceLink.addClickListener(new ClickListener() {
        public void onClick(Widget sender) {
          if (parentNode instanceof ResourceNode) {
            ((ResourceNode) parentNode).removeResource(resource);
          }
          else if (parentNode instanceof ResourcesNode) {
View Full Code Here

   
   if (!WadlTreeRoot.containsButton(buttonTreeItems, ApplicationItem.button + WadlXml.resourceNode)) {
      // add resource button
      HorizontalPanel addResourcePanel = new HorizontalPanel();           
      Button addResourceButton = new Button(GuiFactory.strings.addResource());
      addResourceButton.addClickListener(new ClickListener() {
        public void onClick(Widget sender) {    
          if (parentNode instanceof ResourceNode) {
            ((ResourceNode) parentNode).addResource(new ResourceNode(GuiFactory.strings.newResource(), (GenericNode) parentNode, ((GenericNode) parentNode).getApplication()));
          }
          else if (parentNode instanceof ResourcesNode) {
View Full Code Here

       
    resourcesPanel.add(new HTML(SyntaxHighlighter.highlight("\" >")));
   
    // remove resources hyperlink
    Hyperlink removeResourcesLink = new Hyperlink(GuiFactory.strings.remove(), true, "");
    removeResourcesLink.addClickListener(new ClickListener() {
      public void onClick(Widget sender) {       
        resources.getApplication().removeResources();       
        listResources(resources.getApplication(), applicationTreeItem);
      }
    });     
View Full Code Here

      if (!WadlTreeRoot.containsButton(buttonTreeItems, ApplicationItem.button + WadlXml.resourcesNode)) {     
        // add resources button     
        HorizontalPanel addResourcesPanel = new HorizontalPanel();
             
        Button addResourcesButton = new Button(GuiFactory.strings.addResources());
        addResourcesButton.addClickListener(new ClickListener() {
          public void onClick(Widget sender) {         
            application.addResources(new ResourcesNode(GuiFactory.strings.newResources(), application));
            listResources(application, applicationTreeItem);                   
          }
        });
View Full Code Here

         
      final VerticalPanel detailsPanel = new VerticalPanel();
      detailsPanel.setVisible(false);
      representationPanel1.add(new HTML("<img align=\"absmiddle\" src=\"./images/details.png\" style=\"margin-left:8em;\" hspace=\"2\" />"));
      final Hyperlink showDetails = new Hyperlink(GuiFactory.strings.showDetails(), "");
      showDetails.addClickListener(new ClickListener() {
        public void onClick(Widget sender) {
          if (detailsPanel.isVisible()) {
            detailsPanel.setVisible(false);
            showDetails.setText(GuiFactory.strings.showDetails());
          }
          else {
            detailsPanel.setVisible(true);
            showDetails.setText(GuiFactory.strings.hideDetails());         
          }
        }
      });
      representationPanel1.add(showDetails);   
 
      HorizontalPanel representationPanel3 = new HorizontalPanel();
      representationPanel3.add(new HTML(SyntaxHighlighter.highlight(WadlXml.representation_profile + "=\"")));
      final TextBox profileTextBox = new TextBox();
      profileTextBox.addChangeListener(new ChangeListener() {
        public void onChange(Widget sender) {
          representation.updateProfile(representation.getProfile(), profileTextBox.getText());
        }
      });   
      profileTextBox.setText(representation.getProfile());
      representationPanel3.add(profileTextBox);
      representationPanel3.add(new HTML(SyntaxHighlighter.highlight("\"")));
      detailsPanel.add(representationPanel3);
     
      HorizontalPanel representationPanel4 = new HorizontalPanel();
      representationPanel4.add(new HTML(SyntaxHighlighter.highlight(WadlXml.representation_status + "=\"")));
      final TextBox statusTextBox = new TextBox();
      statusTextBox.addChangeListener(new ChangeListener() {
        public void onChange(Widget sender) {
          representation.updateStatus(representation.getStatus(), statusTextBox.getText());
        }
      });   
      statusTextBox.setText(representation.getStatus());
      representationPanel4.add(statusTextBox);
      representationPanel4.add(new HTML(SyntaxHighlighter.highlight("\"")));
      detailsPanel.add(representationPanel4);
     
      representationPanelRight.add(detailsPanel);   
     
      HorizontalPanel representationEndPanel = new HorizontalPanel();
      representationEndPanel.add(new HTML(SyntaxHighlighter.highlight(">")));
      Hyperlink removeRepresentationLink = new Hyperlink(GuiFactory.strings.remove(), true, "");
      removeRepresentationLink.addClickListener(new ClickListener() {
        public void onClick(Widget sender) {
          if (parentNode instanceof RequestNode) {
            ((RequestNode) parentNode).removeRepresentation(representation);           
          }
          else if (parentNode instanceof ResponseNode) {
View Full Code Here

   
    if (!WadlTreeRoot.containsButton(buttonTreeItems, ApplicationItem.button + WadlXml.representationNode)) {
      // add representation button           
      HorizontalPanel addRepresentationPanel = new HorizontalPanel();     
      Button addRepresentationButton = new Button(GuiFactory.strings.addRepresentation());
      addRepresentationButton.addClickListener(new ClickListener() {
        public void onClick(Widget sender) {
          if (parentNode instanceof RequestNode) {
            ((RequestNode) parentNode).addRepresentation(new RepresentationNode(GuiFactory.strings.newRepresentation(), application_xml, (GenericNode) parentNode, ((GenericNode) parentNode).getApplication()));           
          }
          else if (parentNode instanceof ResponseNode) {
View Full Code Here

    HTML response = new HTML(SyntaxHighlighter.highlight("<" + WadlXml.responseNode + ">"));
    containerPanel.add(response);   
   
    // remove response hyperlink
    Hyperlink removeResponseLink = new Hyperlink(GuiFactory.strings.remove(), true, "");
    removeResponseLink.addClickListener(new ClickListener() {
      public void onClick(Widget sender) {       
        method.removeResponse(method.getResponse());        
        listResponse(method, methodTreeItem);
      }
    });     
View Full Code Here

    Vector buttonTreeItems = WadlTreeRoot.removeChildrenXKeepButtons(methodTreeItem, WadlXml.responseNode);
   
    ResponseNode response = method.getResponse();
    if (response == null) {
      Button addResponseButton = new Button(GuiFactory.strings.addResponse());
      addResponseButton.addClickListener(new ClickListener() {
        public void onClick(Widget sender) {             
          method.addResponse(new ResponseNode(method, method.getApplication()));         
          listResponse(method, methodTreeItem);         
        }
      });
View Full Code Here

        showDetails = new Hyperlink(GuiFactory.strings.hideDetails(), true, "");
      }
      else {
        showDetails = new Hyperlink(GuiFactory.strings.showDetails(), true, "");
      }
      showDetails.addClickListener(new ClickListener() {
        public void onClick(Widget sender) {
          if (detailsPanel.isVisible()) {
            detailsPanel.setVisible(false);
            showDetails.setText(GuiFactory.strings.showDetails());
          }
          else {
            detailsPanel.setVisible(true);
            showDetails.setText(GuiFactory.strings.hideDetails());         
          }
        }
      });
      parameterPanel4.add(showDetails);   
     
      HorizontalPanel parameterPanel5 = new HorizontalPanel();   
      parameterPanel5.add(new HTML(SyntaxHighlighter.highlight(WadlXml.param_default + "=\"")));
      final TextBox parameterDefault = new TextBox();
      parameterDefault.addChangeListener(new ChangeListener() {
        public void onChange(Widget sender) {
          param.updateDefaultValue(param.getDefaultValue(), parameterDefault.getText());
        }
      });
      parameterDefault.setText(param.getDefaultValue());
      parameterPanel5.add(parameterDefault);
      parameterPanel5.add(new HTML(SyntaxHighlighter.highlight("\"")));   
      detailsPanel.add(parameterPanel5);
     
      HorizontalPanel parameterPanel9 = new HorizontalPanel();   
      parameterPanel9.add(new HTML(SyntaxHighlighter.highlight(WadlXml.param_path + "=\"")));
      final TextBox parameterPath = new TextBox();
      parameterPath.addChangeListener(new ChangeListener() {
        public void onChange(Widget sender) {
          param.updatePath(param.getPath(), parameterPath.getText());
        }
      });
      parameterPath.setText(param.getPath());
      parameterPanel9.add(parameterPath);
      parameterPanel9.add(new HTML(SyntaxHighlighter.highlight("\"")));   
      detailsPanel.add(parameterPanel9);
     
      HorizontalPanel parameterPanel6 = new HorizontalPanel();
      parameterPanel6.add(new HTML((SyntaxHighlighter.highlight(WadlXml.param_fixed + "=\""))));
      final TextBox parameterFixed = new TextBox();
      parameterFixed.addChangeListener(new ChangeListener() {
        public void onChange(Widget sender) {
          param.updateFixedValue(param.getFixedValue(), parameterFixed.getText());
        }
      });
      parameterFixed.setText(param.getFixedValue());
      parameterPanel6.add(parameterFixed);
      parameterPanel6.add(new HTML(SyntaxHighlighter.highlight("\"")));
      detailsPanel.add(parameterPanel6);
     
      HorizontalPanel parameterPanel7 = new HorizontalPanel();   
      parameterPanel7.add(new HTML(SyntaxHighlighter.highlight(WadlXml.param_required + "=\"")));
      final ListBox parameterRequired = new ListBox();
      parameterRequired.addChangeListener(new ChangeListener() {
        public void onChange(Widget sender) {
          boolean newIsRequired = false;
          if (parameterRequired.getItemText(parameterRequired.getSelectedIndex()).equals("true")) {
            newIsRequired = true;
          }
          param.updateIsRequired(param.getIsRequired(), newIsRequired);
        }
      });
      parameterRequired.setVisibleItemCount(1);
      parameterRequired.addItem("true");
      parameterRequired.addItem("false");
      if (param.getIsRequired()) {
        parameterRequired.setSelectedIndex(0);
      }
      else {
        parameterRequired.setSelectedIndex(1);
      }
      parameterPanel7.add(parameterRequired);
      parameterPanel7.add(new HTML(SyntaxHighlighter.highlight("\"")));
      detailsPanel.add(parameterPanel7);
 
      HorizontalPanel parameterPanel8 = new HorizontalPanel();
      parameterPanel8.add(new HTML(SyntaxHighlighter.highlight(WadlXml.param_repeating + "=\"")));
      final ListBox parameterRepeating = new ListBox();
      parameterRepeating.addChangeListener(new ChangeListener() {
        public void onChange(Widget sender) {
          boolean newIsRepeating = false;
          if (parameterRepeating.getItemText(parameterRepeating.getSelectedIndex()).equals("true")) {
            newIsRepeating = true;
          }
          param.updateIsRepeating(param.getIsRepeating(), newIsRepeating);
        }
      });
      parameterRepeating.setVisibleItemCount(1);
      parameterRepeating.addItem("true");
      parameterRepeating.addItem("false");
      if (param.getIsRepeating()) {
        parameterRepeating.setSelectedIndex(0);
      }
      else {
        parameterRepeating.setSelectedIndex(1);
      }
      parameterPanel8.add(parameterRepeating);
      parameterPanel8.add(new HTML(SyntaxHighlighter.highlight("\"")));
      detailsPanel.add(parameterPanel8);
         
      parameterPanelRight.add(detailsPanel);
      parameterPanel.add(parameterPanelRight);
     
      parameterPanelContainer.add(parameterPanel);
     
      HorizontalPanel paramEndPanel = new HorizontalPanel();
      if (param.getOptions().size() > 0) {
        paramEndPanel.add(new HTML(SyntaxHighlighter.highlight(">")));   
      }
      else {
        paramEndPanel.add(new HTML(SyntaxHighlighter.highlight("/>")));
      }   
      Hyperlink removeParamLink = new Hyperlink(GuiFactory.strings.remove(), true, "");
      removeParamLink.addClickListener(new ClickListener() {
        public void onClick(Widget sender) {
          if (parent instanceof RequestNode) {
            ((RequestNode) parent).removeParam(param);            
          }
          else if (parent instanceof ResourceNode) {
View Full Code Here

TOP

Related Classes of com.google.gwt.user.client.ui.ClickListener

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.