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


Java Hyperlink类代码示例

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


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

示例1: createView

import com.google.gwt.user.client.ui.Hyperlink; //导入依赖的package包/类
public void createView() {
	table = new VerticalPanel();
	createButton = new Hyperlink( "Create Company", "" );
	goToProduct = new Hyperlink( "Go To Products", "" );
	filter = new CheckBox( "Filter Company EventBus events" );
	moduleHistory = new CheckBox( "Disable Company Module History" );
	applicationHistory = new CheckBox( "Disable Application History" );

	VerticalPanel mainPanel = new VerticalPanel();
	mainPanel.add( table );
	mainPanel.setHorizontalAlignment( HasHorizontalAlignment.ALIGN_RIGHT );
	mainPanel.add( createButton );
	mainPanel.add( goToProduct );
	mainPanel.setHorizontalAlignment( HasHorizontalAlignment.ALIGN_LEFT );
	mainPanel.add( moduleHistory );
	mainPanel.add( applicationHistory );
	mainPanel.add( filter );

	initWidget( mainPanel );
}
 
开发者ID:mvp4g,项目名称:mvp4g-examples,代码行数:21,代码来源:CompanyListView.java

示例2: createLinkRenderer

import com.google.gwt.user.client.ui.Hyperlink; //导入依赖的package包/类
private static CellRenderer<DataContainerGVO, String> createLinkRenderer(final DataGridGVO source, final DataGridColumnGVO column, final String uuid, final String parent, final String targetHistoryToken, final HasDataGridMethods uiParent) {
	CellRenderer<DataContainerGVO, String> cellRenderer;
	cellRenderer = new CellRenderer<DataContainerGVO, String>() {
		public void renderRowValue(DataContainerGVO rowValue, ColumnDefinition<DataContainerGVO, String> columnDef, AbstractCellView<DataContainerGVO> view) {
			boolean alreadyRendered = false;
			String value = simpleObjectToText(columnDef.getCellValue(rowValue));
			int rowIndex = view.getRowIndex();
			String generatedId = generateIdBasedOnIndex(column, rowIndex);
			Hyperlink renderedComponent = (Hyperlink)getRenderedComponent(column, generatedId, uuid, parent);
			if (renderedComponent != null) {
				renderedComponent.setText(value);
				alreadyRendered = true;
			} else {
				renderedComponent = new Hyperlink(value, targetHistoryToken);					
			}
			
			view.setWidget(renderedComponent);
			CellRendererHelper.addBasicInfoToUIObject(renderedComponent, uuid, parent, source, column, rowValue, rowIndex, null, alreadyRendered);
			handleCellSet(uiParent, columnDef, renderedComponent, rowValue);
		}
	};
	return cellRenderer;
}
 
开发者ID:qafedev,项目名称:qafe-platform,代码行数:24,代码来源:CellRendererHelper.java

示例3: 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

示例4: 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

示例5: 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

示例6: NavigationLink

import com.google.gwt.user.client.ui.Hyperlink; //导入依赖的package包/类
public NavigationLink(String text, long projectId, String targetHistoryToken,
    Function<Void, TaPagePresenter> createPresenterFunction) {
  this.targetHistoryToken = targetHistoryToken;
  this.projectId = projectId;
  this.createPresenterFunction = createPresenterFunction;

  panel = new DeckPanel();
  SimplePanel fakeLinkPanel = new SimplePanel();
  fakeLink = new Label(text);
  fakeLinkPanel.add(fakeLink);
  realLink = new Hyperlink(text, getHyperlinkTarget());
  panel.add(realLink);
  panel.add(fakeLinkPanel);
  enable();
  super.initWidget(panel);
}
 
开发者ID:rodion-goritskov,项目名称:test-analytics-ng,代码行数:17,代码来源:NavigationLink.java

示例7: DndLink

import com.google.gwt.user.client.ui.Hyperlink; //导入依赖的package包/类
public DndLink(String text, String link, DomainObject representedDomainObject, Widget parent) {
		
		myLink = new Hyperlink(text, link);
		this.setWidget(myLink);
		
		//workaround default blue link text styling
		myLink.getElement().getFirstChildElement().getStyle().setColor("#475765");

		representedObjects = new ArrayList<DomainObject>(1);
		representedObjects.add(representedDomainObject);
//		this.parent = parent;
		// this.representedDomainObject = representedDomainObject;
		
		if(!draggable()) {
			this.getElement().getStyle().setCursor(Cursor.POINTER);
		}
	}
 
开发者ID:fhcampuswien,项目名称:atom,代码行数:18,代码来源:DndLink.java

示例8: appendToBreadcrumb

import com.google.gwt.user.client.ui.Hyperlink; //导入依赖的package包/类
private void appendToBreadcrumb(String text, String history, boolean isLast) {
	Element li = DOM.createElement("li");
	breadcrumb.appendChild(li);

	if (isLast) {
		// last element in breadcrumb
		li.setAttribute("class", "active");
		li.setInnerText(text);
	} else {
		// elements still coming
		li.appendChild(new Hyperlink(text, history).getElement());

		Element divider = DOM.createElement("span");
		divider.setAttribute("class", "divider");
		divider.setInnerText("/");
		li.appendChild(divider);
	}
}
 
开发者ID:alexjj,项目名称:encfsanywhere,代码行数:19,代码来源:ListViewImpl.java

示例9: DemoWidget

import com.google.gwt.user.client.ui.Hyperlink; //导入依赖的package包/类
public DemoWidget(Mediator mediator) {
    mediator.setDemoWidget(this);

    final DemoSubjectsController demoSubjectsController = new DemoSubjectsController(mediator);
    final DemoSubjectsWidget demoSubjectsWidget = new DemoSubjectsWidget(mediator, demoSubjectsController);

    add(demoSubjectsWidget);

    final Label introLabel = new HTML(StringConstants.StringConstantsSingleton.getInstance().intro());

    final Hyperlink registerHyperlink = new Hyperlink(
            StringConstants.StringConstantsSingleton.getInstance().registerRightNow(),
            HistoryToken.registration.toString()
    );
    registerHyperlink.setStylePrimaryName("registerHyperlink");

    final VerticalPanel introPanel = new VerticalPanel();
    introPanel.add(introLabel);
    introPanel.add(registerHyperlink);
    introPanel.setStylePrimaryName("borderedIntro");
    introPanel.setSpacing(10);

    add(demoSubjectsWidget);
    add(introPanel);
}
 
开发者ID:halls,项目名称:wannatrak,代码行数:26,代码来源:DemoWidget.java

示例10: render

import com.google.gwt.user.client.ui.Hyperlink; //导入依赖的package包/类
public Widget render(Row row, Column column, Object value) {
  if(value == null || !(value instanceof String)) {
    return null;
  } else {
    Hyperlink hyperlink = new Hyperlink((String)value, _asHTML, _targetHistoryToken);
    if(_title != null) hyperlink.setTitle(_title);
    return hyperlink;
  }
}
 
开发者ID:sanderberents,项目名称:gwtlib,代码行数:10,代码来源:HyperlinkRenderer.java

示例11: addAttributeRow

import com.google.gwt.user.client.ui.Hyperlink; //导入依赖的package包/类
private void addAttributeRow(HoverGridWidget widget, int row, final GWT_AttributeBean aBean) {
	widget.setText(row, NAME_COL, aBean.getDisplayName());
	widget.setText(row, ALIAS_COL, aBean.getAlias());
	widget.setWidget(row, TYPE_COL, new Hyperlink(aBean.getType(), null));
	widget.setText(row, REF_TYPE_COL, aBean.getRefType());
	widget.setText(row, DERIVED_COL, aBean.isDerived() ? "*" : " ");
	widget.setText(row, MIN_COL, aBean.getMinOccurs());
	widget.setText(row, MAX_COL, aBean.getMaxOccurs());
	List values = currentTemplate.fetchAttributeValueBeans(aBean.getAlias());
	if (values != null && values.size() > 0) {
		GWT_ValueBean value = (GWT_ValueBean) values.get(0);
		widget.setText(row, DEFAULT_VALUE_COL, value.getValue());
	} else {
		widget.setText(row, DEFAULT_VALUE_COL, "");
	}
	if (!aBean.isDerived()) {
		Image delete = new Image("images/trashcan16.gif");
		delete.setTitle("Delete attribute " + aBean.getDisplayName());
		delete.addClickListener(new ClickListener() {

			public void onClick(Widget sender) {
				delete(aBean);
			}
			
		});
		widget.setWidget(row, DEFAULT_VALUE_COL+1, delete);
	}
	
	rowMap.put(new Integer(row), aBean);
}
 
开发者ID:luox12,项目名称:onecmdb,代码行数:31,代码来源:ListAttributeScreen.java

示例12: ClickableTextItem

import com.google.gwt.user.client.ui.Hyperlink; //导入依赖的package包/类
/**
 * Create a new ClickableTextItem.
 * 
 * @param name the name of the bean member.
 * @param title the label text.
 * @param valueAdapter the adapter for the field value.
 */
public ClickableTextItem(String name, String title, ValueAdapter<T> valueAdapter) {
    super(name, title);
    _link = new Hyperlink();
    _valueAdapter = valueAdapter;

    resetMetaData();
}
 
开发者ID:jboss-switchyard,项目名称:switchyard,代码行数:15,代码来源:ClickableTextItem.java

示例13: 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

示例14: prepareLink

import com.google.gwt.user.client.ui.Hyperlink; //导入依赖的package包/类
private Widget prepareLink(Hyperlink link) {
	HorizontalPanel horizontalPanel = new HorizontalPanel();
	horizontalPanel.setStyleName(panelStyle.padding());
	horizontalPanel.add(new Image(AtomClientBundle.INSTANCE.linkArrow()));
	link.setStyleName(panelStyle.link());
	horizontalPanel.add(link);
	return horizontalPanel;
}
 
开发者ID:fhcampuswien,项目名称:atom,代码行数:9,代码来源:WelcomeFrame.java

示例15: getHyperlink

import com.google.gwt.user.client.ui.Hyperlink; //导入依赖的package包/类
/**
 * Get a {@link Hyperlink} to a section based on the name of the
 * {@link ContentWidget} example.
 *
 * @param cwClass the {@link ContentWidget} class
 * @param name the name to display for the link
 * @return a {@link Hyperlink}
 */
@ShowcaseSource
private <C extends ContentWidget> Hyperlink getHyperlink(
    Class<C> cwClass, String name) {
  Hyperlink link = new Hyperlink(
      name, Showcase.getContentWidgetToken(cwClass));
  link.ensureDebugId("cwHyperlink-" + cwClass.getName());
  return link;
}
 
开发者ID:Peergos,项目名称:Peergos,代码行数:17,代码来源:CwHyperlink.java


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