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

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


   
    includePanel.add(new HTML(SyntaxHighlighter.highlight("<" + WadlXml.includeNode + " " + WadlXml.include_href + "=\"")));
   
    final TextBox input = new TextBox();     
    input.setText(href);
    input.addChangeListener(new ChangeListener() {
      public void onChange(Widget sender) {
        grammars.updateInclude(href, input.getText());
      }
    });
    includePanel.add(input);
View Full Code Here


        extNamespacePanel.add(new HTML(SyntaxHighlighter.highlight(namespace.getName() + "=\"")));
      }
     
      final TextBox input = new TextBox();     
      input.setText(namespace.getValue());
      input.addChangeListener(new ChangeListener() {
        public void onChange(Widget sender) {
          application.updateNamespace(namespace.getValue(), input.getText());         
        }
      });
      extNamespacePanel.add(input);    
View Full Code Here

      httpMethodListBox.setSelectedIndex(MethodItem.indexOfName(httpMethod));
    }
    else {
      httpMethodListBox.setSelectedIndex(0);
    }
    httpMethodListBox.addChangeListener(new ChangeListener() {
      public void onChange(Widget sender) {       
        if (httpMethodListBox.getItemText(httpMethodListBox.getSelectedIndex()).equals(MethodItem.get)) {
          testRequestButton.setEnabled(true);
        }
        else {
          testRequestButton.setEnabled(false);
        }               
        updateReferences();
      }     
    });
    requestSampleBoxPanel.add(httpMethodListBox);
   
    // request uri textbox
    requestUriTextBox = new TextBox();  
    requestUriTextBox.setWidth(Math.floor(0.62 * Window.getClientWidth()) + "px");
    requestUriTextBox.setText(uriString);
    requestUriTextBox.addChangeListener(new ChangeListener() {
      public void onChange(Widget sender) {
        updateReferences();
      }
    });
    requestUriTextBox.addKeyboardListener(new KeyboardListener() {     
View Full Code Here

      
    final HTML confirmLink = new HTML("");
    confirmLangChange.add(confirmLink);
    confirmLangChange.add(new HTML("."));  
    generalPanel.add(confirmLangChange);  
    languageListBox.addChangeListener(new ChangeListener() {
      public void onChange(Widget sender) {      
        updateAndDisplayConfirmLink(languageListBox.getItemText(languageListBox.getSelectedIndex()), confirmLink, confirmLangChange);
      }
    });
    languageListBox.addClickListener(new ClickListener() {
      public void onClick(Widget sender) {
        updateAndDisplayConfirmLink(languageListBox.getItemText(languageListBox.getSelectedIndex()), confirmLink, confirmLangChange);
      }    
    });
    
    final CheckBox detailsCheckBox = new CheckBox();
    detailsCheckBox.setChecked(alwaysShowDetails);
    detailsCheckBox.addClickListener(new ClickListener() {
      public void onClick(Widget sender) {
        if (detailsCheckBox.isChecked()) {
          alwaysShowDetailsTemp = true;       
        }
        else {
          alwaysShowDetailsTemp = false;
        }
      }
    });
      
    final CheckBox treesCheckBox = new CheckBox();
    treesCheckBox.setChecked(treeItemsAlwaysOpen);
    treesCheckBox.addClickListener(new ClickListener() {
      public void onClick(Widget sender) {
        if (treesCheckBox.isChecked()) {
          treeItemsAlwaysOpenTemp = true;       
        }
        else {
          treeItemsAlwaysOpenTemp = false;
        }
      }
    });
   
    final HorizontalPanel miniSepTextPanel = new HorizontalPanel();
    final CheckBox useSeparationCharacterCheckBox = new CheckBox();
    useSeparationCharacterCheckBox.setChecked(useSeparationCharacter);
    useSeparationCharacterCheckBox.addClickListener(new ClickListener() {
      public void onClick(Widget sender) {       
        if (useSeparationCharacterCheckBox.isChecked()) {
          useSeparationCharacterTemp = true;       
        }
        else {
          useSeparationCharacterTemp = false;
        }
        miniSepTextPanel.setVisible(useSeparationCharacterTemp);
      }
    });
    
    final TextBox timeoutSecondsTextBox = new TextBox();
    timeoutSecondsTextBox.setText(Integer.toString(requestTimeoutSeconds));
    timeoutSecondsTextBox.setWidth(panelHeight);
    timeoutSecondsTextBox.addChangeListener(new ChangeListener() {
      public void onChange(Widget sender) {
        try {
          requestTimeoutSeconds = Integer.parseInt(timeoutSecondsTextBox.getText());
          timeoutSecondsTextBox.removeStyleName("restDescribe-error");
        } catch (NumberFormatException e) {   
          timeoutSecondsTextBox.setStyleName("restDescribe-error");
        }
      }    
    });  
   
    miniSepTextPanel.setVisible(useSeparationCharacter);
    final TextBox separationCharacterTextBox = new TextBox();   
    separationCharacterTextBox.setText(separationCharacter);
    separationCharacterTextBox.setWidth(panelHeight);
    separationCharacterTextBox.addChangeListener(new ChangeListener() {
      public void onChange(Widget sender) {
        separationCharacter = separationCharacterTextBox.getText();
      }    
    });
    
    final TextBox namingDepthTextBox = new TextBox();
    namingDepthTextBox.setText(Integer.toString(namingDepthLevel));
    namingDepthTextBox.setWidth(panelHeight);
    namingDepthTextBox.addChangeListener(new ChangeListener() {
      public void onChange(Widget sender) {
        try {
          namingDepthLevel = Integer.parseInt(namingDepthTextBox.getText());
          namingDepthTextBox.removeStyleName("restDescribe-error");
          if (SettingsDialog.namingDepthLevel == 0) {
            namingDepthTextBox.setStyleName("restDescribe-error");
          }
        } catch (NumberFormatException e) {   
          namingDepthTextBox.setStyleName("restDescribe-error");
        }
      }    
    });
   
    final RadioButton useParameterAsNameRadio = new RadioButton("paramOrEndpoint", GuiFactory.strings.useParam());
    useParameterAsNameRadio.setChecked(!useEndpointAsName);
    useParameterAsNameRadio.addClickListener(new ClickListener() {
      public void onClick(Widget sender) {       
        useEndpointAsName = !useParameterAsNameRadio.isChecked();       
      }     
    });
   
    final RadioButton useEndpointAsNameRadio = new RadioButton("paramOrEndpoint", GuiFactory.strings.useEndpoint());
    useEndpointAsNameRadio.setChecked(useEndpointAsName);
    useEndpointAsNameRadio.addClickListener(new ClickListener() {
      public void onClick(Widget sender) {       
        useEndpointAsName = useEndpointAsNameRadio.isChecked();
      }     
    });
   
    final TextBox indentWidthTextBox = new TextBox();
    indentWidthTextBox.setWidth(panelHeight);
    indentWidthTextBox.setText(indentWidth + "");
    indentWidthTextBox.addChangeListener(new ChangeListener() {
      public void onChange(Widget sender) {
        try {
          indentWidth = Integer.parseInt(indentWidthTextBox.getText());
          indentWidthTextBox.removeStyleName("restDescribe-error");
          if (SettingsDialog.indentWidth == 0) {
            indentWidthTextBox.setStyleName("restDescribe-error");
          }
        } catch (NumberFormatException e) {   
          indentWidthTextBox.setStyleName("restDescribe-error");
        }       
      }     
    });
   
    final HorizontalPanel indentMiniPanel = new HorizontalPanel();
    final RadioButton indentWithSpacesRadio = new RadioButton("indent", GuiFactory.strings.indentSpaces());
    indentWithSpacesRadio.setChecked(indentWithSpaces);
    indentWithSpacesRadio.addClickListener(new ClickListener() {
      public void onClick(Widget sender) {       
        indentWithSpaces = indentWithSpacesRadio.isChecked();
        indentMiniPanel.setVisible(true);
      }     
    });
   
    final RadioButton indentWithTabsRadio = new RadioButton("indent", GuiFactory.strings.indentTabs());
    indentWithTabsRadio.setChecked(!indentWithSpaces);
    indentWithTabsRadio.addClickListener(new ClickListener() {
      public void onClick(Widget sender) {       
        indentWithSpaces = !indentWithTabsRadio.isChecked();
        indentMiniPanel.setVisible(false);
      }     
    });
   
    final TextBox classSuffixTextBox = new TextBox();
    classSuffixTextBox.setText(classDefaultSuffix);
    classSuffixTextBox.setWidth(textBoxWidth);
    classSuffixTextBox.addChangeListener(new ChangeListener() {
      public void onChange(Widget sender) {
        classDefaultSuffix = classSuffixTextBox.getText();       
      }
    });
    
    final TextBox pathToDiscovererTextBox = new TextBox();
    pathToDiscovererTextBox.setText(pathToDiscoverer);
    pathToDiscovererTextBox.setWidth(textBoxWidth);
    pathToDiscovererTextBox.addChangeListener(new ChangeListener() {
      public void onChange(Widget sender) {       
        pathToDiscoverer = pathToDiscovererTextBox.getText();       
      }    
    });
   
View Full Code Here

    codeOptionsPanel.add(radioContainerPanel);
       
    final TextBox namingDepthTextBox = new TextBox();   
    namingDepthTextBox.setWidth("2em");
    namingDepthTextBox.setText(SettingsDialog.namingDepthLevel + "");
    namingDepthTextBox.addChangeListener(new ChangeListener() {
      public void onChange(Widget sender) {
        try {
          SettingsDialog.namingDepthLevel =
            Integer.parseInt(namingDepthTextBox.getText());
          namingDepthTextBox.removeStyleName("restDescribe-error");
View Full Code Here

        public void onKeyUp(Widget sender, char keyCode, int modifiers) {
          updateParameterValue(currentParameter, queryValueTextBox.getText());
        }       
      });
      queryValueTextBox.addChangeListener(new ChangeListener() {
        public void onChange(Widget sender) {
          updateParameterValue(currentParameter, queryValueTextBox.getText());
        }
      });
      containerPanel.add(queryValueTextBox);
View Full Code Here

      public void onKeyUp(Widget sender, char keyCode, int modifiers) {
        updateParameterName(queryParamNameTextBox.getText(), queryValueTextBox.getText());
      }
    });
    queryParamNameTextBox.addChangeListener(new ChangeListener() {
      public void onChange(Widget sender) {
        updateParameterName(queryParamNameTextBox.getText(), queryValueTextBox.getText());
      }
    });
    queryParamNameTextBox.setText(GuiFactory.strings.paramName());
    containerPanel.add(queryParamNameTextBox);
    queryParamNameTextBox.setSelectionRange(0, queryParamNameTextBox.getText().length());     
    HTML parameterName = new HTML("<nobr/> =&nbsp;</nobr>");
    containerPanel.add(parameterName);    
    queryValueTextBox.addKeyboardListener(new KeyboardListener() {
      public void onKeyDown(Widget sender, char keyCode, int modifiers) {
        // empty
      }

      public void onKeyPress(Widget sender, char keyCode, int modifiers) {
        // empty
      }

      public void onKeyUp(Widget sender, char keyCode, int modifiers) {
        updateParameterValue(queryParamNameTextBox.getText(), queryValueTextBox.getText());       
      }
     
    });
    queryValueTextBox.addChangeListener(new ChangeListener() {
      public void onChange(Widget sender) {     
        updateParameterValue(queryParamNameTextBox.getText(), queryValueTextBox.getText());       
      }
    });
    queryValueTextBox.setText(GuiFactory.strings.paramValue());
View Full Code Here

    final VerticalPanel containerPanel = new VerticalPanel();          
   
    containerPanel.add(new HTML("<br />" + GuiFactory.strings.availableTypes()));
    final ListBox customTypesListBox = new ListBox();
    ParamItem.addCustomTypes(customTypesListBox);
    customTypesListBox.addChangeListener(new ChangeListener() { 
      public void onChange(Widget sender) {
        loadOptions(customTypesListBox.getItemText(customTypesListBox.getSelectedIndex()));
      }     
    });
    String listBoxAndTextBoxWidth = "12em";
View Full Code Here

     * Contrucotr with default values and no handler
     *
     * @param str
     */
    public EditableLabelExtension(String str) {
        this(str, new ChangeListener() {
            public void onChange(Widget sender) {
            }
        });
    }
View Full Code Here

    super(true);
    setWidget(picker);
    this.picker = picker;
    this.owner = owner;

    picker.addChangeListener(new ChangeListener() {
      public void onChange(Widget sender) {
        hide();
      }
    });
  }
View Full Code Here

TOP

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

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.