当前位置: 首页>>代码示例>>Java>>正文


Java Hyperlink.addClickListener方法代码示例

本文整理汇总了Java中com.google.gwt.user.client.ui.Hyperlink.addClickListener方法的典型用法代码示例。如果您正苦于以下问题:Java Hyperlink.addClickListener方法的具体用法?Java Hyperlink.addClickListener怎么用?Java Hyperlink.addClickListener使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.google.gwt.user.client.ui.Hyperlink的用法示例。


在下文中一共展示了Hyperlink.addClickListener方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: ResponseItem

import com.google.gwt.user.client.ui.Hyperlink; //导入方法依赖的package包/类
public ResponseItem(final MethodNode method, final TreeItem methodTreeItem) {
  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);
    }
  });      
  containerPanel.add(removeResponseLink);
  
  initWidget(containerPanel);
}
 
开发者ID:tomayac,项目名称:rest-describe-and-compile,代码行数:18,代码来源:ResponseItem.java

示例2: RequestItem

import com.google.gwt.user.client.ui.Hyperlink; //导入方法依赖的package包/类
public RequestItem(final MethodNode method, final TreeItem methodTreeItem) {
  HorizontalPanel containerPanel = new HorizontalPanel();    
  HTML request = new HTML(SyntaxHighlighter.highlight("<" + WadlXml.requestNode + ">"));
  containerPanel.add(request);
  
  // remove request hyperlink
  Hyperlink removeRequestLink = new Hyperlink(GuiFactory.strings.remove(), true, "");
  removeRequestLink.addClickListener(new ClickListener() {
    public void onClick(Widget sender) {        
      method.removeRequest(method.getRequest());         
      listRequest(method, methodTreeItem);
    }
  });      
  containerPanel.add(removeRequestLink);
  
  initWidget(containerPanel);
}
 
开发者ID:tomayac,项目名称:rest-describe-and-compile,代码行数:18,代码来源:RequestItem.java

示例3: listUsedClassNames

import com.google.gwt.user.client.ui.Hyperlink; //导入方法依赖的package包/类
/**
 * 
 */
private static void listUsedClassNames() {
  Iterator classNameIterator = CodeGenerator.usedClassNames.iterator();
  requestClassesPanel.clear();
  while(classNameIterator.hasNext()) {      
    final String className = (String) classNameIterator.next();
    Hyperlink hyperlink = new Hyperlink("<nobr><img align=\"absmiddle\" src=\"./images/details.png\" />" + className + "</nobr>", true, "");
    hyperlink.addClickListener(new ClickListener() {
      public void onClick(Widget sender) {
        int pos = codeTextArea.getText().indexOf(className);
        codeTextArea.setCursorPos(pos);          
        codeTextArea.setSelectionRange(pos, className.length());
      }        
    });
    requestClassesPanel.add(hyperlink);      
  }    
}
 
开发者ID:tomayac,项目名称:rest-describe-and-compile,代码行数:20,代码来源:RestCompilePanel.java

示例4: GrammarsItem

import com.google.gwt.user.client.ui.Hyperlink; //导入方法依赖的package包/类
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);
    }
  });      
  grammarsPanel.add(removeGrammarsLink);
  
  initWidget(grammarsPanel);
}
 
开发者ID:tomayac,项目名称:rest-describe-and-compile,代码行数:16,代码来源:GrammarsItem.java

示例5: WadlPanel

import com.google.gwt.user.client.ui.Hyperlink; //导入方法依赖的package包/类
/**
 * Creates the wadl panel
 */
public WadlPanel() {    
   wadlPanel.setStyleName("restDescribe-wadlPanel");  
   wadlPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_TOP);
   
   wadlHeader = new HTML("<h2>" + GuiFactory.strings.wadlFile() + "</h2>");    
   wadlPanel.add(wadlHeader);
   
   VerticalPanel buttonPanel = new VerticalPanel();          
   
   containerPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_TOP);
   
   wadlArea.setStyleName("restDescribe-wadlArea");    
   containerPanel.add(wadlArea);
      
   wadlSaveButton = new Button(GuiFactory.strings.dumpXml());  
   wadlSaveButton.setWidth("8em");
   wadlSaveButton.addClickListener(this); 
   wadlSaveButton.setEnabled(false);
   buttonPanel.add(wadlSaveButton);
   
   wadlPreviewButton = new Button(GuiFactory.strings.prettyPrintXml());
   wadlPreviewButton.setWidth("8em");
   wadlPreviewButton.addClickListener(this);
   wadlPreviewButton.setEnabled(false);
   buttonPanel.add(wadlPreviewButton);
   
   fullscreenButton = new Button(GuiFactory.strings.fullscreen());
   fullscreenButton.setWidth("8em");
   fullscreenButton.addClickListener(this);
   fullscreenButton.setEnabled(false);
   buttonPanel.add(fullscreenButton);
   
   generateCodeButton = new Button(GuiFactory.strings.generateCode());
   generateCodeButton.setWidth("8em");
   generateCodeButton.addClickListener(this);
   generateCodeButton.setEnabled(false);
   buttonPanel.add(generateCodeButton);
   
   resetButton = new Button(GuiFactory.strings.resetWadl());
   resetButton.setWidth("8em");
   resetButton.addClickListener(this);
   resetButton.setEnabled(false);
   buttonPanel.add(resetButton);
   
   Hyperlink resetLink = new Hyperlink(GuiFactory.strings.resetLink(), true, "");
   resetLink.addClickListener(new ClickListener() {
     public void onClick(Widget sender) {
       if (Window.confirm(GuiFactory.strings.reallyCompletelyReset())) {
         GuiFactory.resetApplication(GuiFactory.strings.newRequestUri());
       }
     }
   });
   buttonPanel.add(new HTML("&nbsp;"));
   buttonPanel.add(resetLink);
   containerPanel.add(buttonPanel); 
   
   wadlPanel.add(containerPanel);
     
   initWidget(wadlPanel);
}
 
开发者ID:tomayac,项目名称:rest-describe-and-compile,代码行数:64,代码来源:WadlPanel.java


注:本文中的com.google.gwt.user.client.ui.Hyperlink.addClickListener方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。