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

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


          method.getApplication().getAnalyzer().setRequestString(requestString);
        }     
      });    
     
      // remove method link
      Hyperlink removeMethodLink = new Hyperlink(GuiFactory.strings.remove(), true, "");
      removeMethodLink.addClickListener(new ClickListener() {
        public void onClick(Widget sender) {           
          if (parentNode instanceof ResourceNode) {
            ((ResourceNode) parentNode).removeMethod(method);             
            listMethods(parentNode,  parentTreeItem, requestString);
          }
View Full Code Here


public class GrammarsItem extends Composite {
  public GrammarsItem(final GrammarsNode grammars, final TreeItem applicationTreeItem) {
    HorizontalPanel grammarsPanel = new HorizontalPanel();
    grammarsPanel.add(new HTML(SyntaxHighlighter.highlight("<" + WadlXml.grammarsNode + ">")));
    // remove resources hyperlink
    Hyperlink removeGrammarsLink = new Hyperlink(GuiFactory.strings.remove(), true, "");
    removeGrammarsLink.addClickListener(new ClickListener() {
      public void onClick(Widget sender) {       
        grammars.getApplication().removeGrammars();       
        listGrammars(grammars.getApplication(), applicationTreeItem);
      }
    });     
View Full Code Here

      faultPanelRight.add(faultPanel1);
     
      final VerticalPanel detailsPanel = new VerticalPanel();
      detailsPanel.setVisible(false);
      faultPanel1.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());         
          }
        }
      });
      faultPanel1.add(showDetails);   
 
      HorizontalPanel faultPanel2 = new HorizontalPanel();
      faultPanel2.add(new HTML(SyntaxHighlighter.highlight(WadlXml.fault_element + "=\"")));
      final TextBox elementTextBox = new TextBox();
      elementTextBox.addChangeListener(new ChangeListener() {
        public void onChange(Widget sender) {
          fault.updateElement(fault.getElement(), elementTextBox.getText());
        }
      });   
      elementTextBox.setText(fault.getElement());
      faultPanel2.add(elementTextBox);
      faultPanel2.add(new HTML(SyntaxHighlighter.highlight("\"")));
      detailsPanel.add(faultPanel2);
     
      HorizontalPanel faultPanel3 = new HorizontalPanel();
      faultPanel3.add(new HTML(SyntaxHighlighter.highlight(WadlXml.fault_profile + "=\"")));
      final TextBox profileTextBox = new TextBox();
      profileTextBox.addChangeListener(new ChangeListener() {
        public void onChange(Widget sender) {
          fault.updateProfile(fault.getProfile(), profileTextBox.getText());
        }
      });   
      profileTextBox.setText(fault.getProfile());
      faultPanel3.add(profileTextBox);
      faultPanel3.add(new HTML(SyntaxHighlighter.highlight("\"")));
      detailsPanel.add(faultPanel3);
         
      faultPanelRight.add(detailsPanel);   
     
      HorizontalPanel faultEndPanel = new HorizontalPanel();
      faultEndPanel.add(new HTML(SyntaxHighlighter.highlight("/>")));
      Hyperlink removeFaultLink = new Hyperlink(GuiFactory.strings.remove(), true, "");
      removeFaultLink.addClickListener(new ClickListener() {
        public void onClick(Widget sender) {
          if (parentNode instanceof ApplicationNode) {
            ((ApplicationNode) parentNode).removeFault(fault);
          }
          else if (parentNode instanceof ResponseNode) {
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

    resourcesPanel.add(input);
       
    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

      representationPanelRight.add(representationPanel1);
         
      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

    HorizontalPanel containerPanel = new HorizontalPanel();   
    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

     
      final VerticalPanel detailsPanel = new VerticalPanel();
      detailsPanel.setVisible(SettingsDialog.alwaysShowDetails);
     
      parameterPanel4.add(new HTML("<img align=\"absmiddle\" src=\"./images/details.png\" style=\"margin-left:10em;\" hspace=\"2\" />"));
      final Hyperlink showDetails;
      if (SettingsDialog.alwaysShowDetails) {
        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

    });
    resourceTypePanel.add(input);
   
    resourceTypePanel.add(new HTML(SyntaxHighlighter.highlight("\" >")));
       
    Hyperlink removeResourceTypeLink = new Hyperlink(GuiFactory.strings.remove(), true, "");
    removeResourceTypeLink.addClickListener(new ClickListener() {
      public void onClick(Widget sender) {       
        resourceType.getApplication().removeResourceType(resourceType);        
        listResourceTypes(resourceType.getApplication(), applicationTreeItem);
      }
    });     
View Full Code Here

    });
    includePanel.add(input);
   
    includePanel.add(new HTML(SyntaxHighlighter.highlight("\" />")));
   
    Hyperlink removeIncludeLink = new Hyperlink(GuiFactory.strings.remove(), true, "");
    removeIncludeLink.addClickListener(new ClickListener() {
      public void onClick(Widget sender) {       
        grammars.removeInclude(input.getText());      
        listIncludes(grammars, includesPanel);
      }
    });     
View Full Code Here

TOP

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

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.