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


Java CustomComponent类代码示例

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


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

示例1: createMenuButton

import com.vaadin.ui.CustomComponent; //导入依赖的package包/类
private Button createMenuButton(VaadinIcons icon, String caption, Supplier<CustomComponent> content) {

    final Button button = new Button(caption, (e) -> {
      contentLayout.removeAllComponents();
      contentLayout.addComponent(content.get());
    });
    button.setIcon(icon);
    button.addStyleName(ValoTheme.BUTTON_HUGE);
    button.addStyleName(ValoTheme.BUTTON_ICON_ALIGN_TOP);
    button.addStyleName(ValoTheme.BUTTON_BORDERLESS);
    button.addStyleName(ValoTheme.MENU_ITEM);
    button.setWidth("100%");

    button.setId(buttonID().apply(MainView.class, caption));

    return button;
  }
 
开发者ID:Java-Publications,项目名称:javamagazin-009-microkernel,代码行数:18,代码来源:MainView.java

示例2: getToolbars

import com.vaadin.ui.CustomComponent; //导入依赖的package包/类
@Override
public ComponentContainer[] getToolbars() {
	List<CustomComponent> result = new ArrayList<CustomComponent>();
	@SuppressWarnings("rawtypes")
	Iterator iterator = this.getComponentIterator();
	
	while(iterator.hasNext()){
		
		Component component = (Component) iterator.next();
		if(component instanceof CustomComponent){
			result.add((CustomComponent) component);
		}
	}
	
	CustomComponent[] resultToArray = new CustomComponent[result.size()];
	return result.toArray(resultToArray);
}
 
开发者ID:thingtrack,项目名称:konekti,代码行数:18,代码来源:ToolbarLayout.java

示例3: createMenuButton

import com.vaadin.ui.CustomComponent; //导入依赖的package包/类
private Pair<String, Button> createMenuButton(VaadinIcons icon, String caption, Supplier<CustomComponent> content) {
  final Button button = new Button(caption, (e) -> {
    contentLayout.removeAllComponents();
    contentLayout.addComponent(content.get());
  });
  button.setIcon(icon);
  button.addStyleName(ValoTheme.BUTTON_HUGE);
  button.addStyleName(ValoTheme.BUTTON_ICON_ALIGN_TOP);
  button.addStyleName(ValoTheme.BUTTON_BORDERLESS);
  button.addStyleName(ValoTheme.MENU_ITEM);
  button.setWidth("100%");

  button.setId(buttonID().apply(this.getClass(), caption));
  return new Pair<>(mapToShiroRole(caption), button);
}
 
开发者ID:Java-Publications,项目名称:vaadin-016-helloworld-14,代码行数:16,代码来源:MenuComponent.java

示例4: resetAttributeOption

import com.vaadin.ui.CustomComponent; //导入依赖的package包/类
protected void resetAttributeOption() {
	//
	// Remove GUI components from layout
	//
	this.horizontalLayoutAttribute.removeAllComponents();
	this.currentComponent = null;
	//
	// Grab our currently selected option value
	//
	Object value = self.optionGroupAttribute.getValue();
	//
	// What is it set to?
	//
	if (value.toString().equals(ATTRIBUTE_OPTION_DICTIONARY)) {
		this.currentComponent = new AttributeDictionarySelectorComponent(this.datatype, this.defaultAttribute);
	} else if (value.toString().equals(ATTRIBUTE_OPTION_STANDARD)) {
		this.currentComponent = new AttributeStandardSelectorComponent(this.datatype, this.defaultAttribute);
	} else if (value.toString().equals(ATTRIBUTE_OPTION_INPUT)) {
		this.currentComponent = new AttributeSimpleCreatorComponent(this.datatype, this.defaultAttribute);
	} else {
		logger.error("Unknown option" + value);
		return;
	}
	this.currentComponent.addListener(this);
	this.horizontalLayoutAttribute.addComponent((CustomComponent) this.currentComponent);
	this.currentComponent.fireAttributeChanged(this.currentComponent.getAttribute());
}
 
开发者ID:apache,项目名称:incubator-openaz,代码行数:28,代码来源:AttributeSelectionWindow.java

示例5: showView

import com.vaadin.ui.CustomComponent; //导入依赖的package包/类
@Override
public void showView(View view) {
    logger.debug("Displaying View " + view);
    if (view instanceof CustomComponent) {
        setContent((CustomComponent) view);
    } else if (view instanceof ComponentContainer) {
        setContent((ComponentContainer) view);
    } else {
        throw new IllegalStateException("View not supported! ");
    }
}
 
开发者ID:antoniomaria,项目名称:gazpachoquest,代码行数:12,代码来源:GazpachoViewDisplay.java

示例6: create

import com.vaadin.ui.CustomComponent; //导入依赖的package包/类
/**
 *
 * @param ctx
 * @return Tab that should be added to the dialog.
 */
public static CustomComponent create(UserDialogContext ctx) {
    final ConfigCopyPasteTab tab = new ConfigCopyPasteTab(ctx);
    tab.buildLayout();
    return tab;
}
 
开发者ID:UnifiedViews,项目名称:Plugin-DevEnv,代码行数:11,代码来源:ConfigCopyPaste.java

示例7: removeToolbar

import com.vaadin.ui.CustomComponent; //导入依赖的package包/类
@Override
public void removeToolbar(CustomComponent toolbar) {
	this.removeComponent(toolbar);
	
}
 
开发者ID:thingtrack,项目名称:konekti,代码行数:6,代码来源:ToolbarLayout.java

示例8: setContenido

import com.vaadin.ui.CustomComponent; //导入依赖的package包/类
/***
 * Agrega un componente al panel de contenido.
 * @param component
 */
public void setContenido(CustomComponent component) {
	this.mainLayout.addComponent(component);
}
 
开发者ID:unicesi,项目名称:academ,代码行数:8,代码来源:PanelContenido.java

示例9: removeToolbar

import com.vaadin.ui.CustomComponent; //导入依赖的package包/类
public void removeToolbar(CustomComponent toolbar); 
开发者ID:thingtrack,项目名称:konekti,代码行数:2,代码来源:IToolbarLayout.java


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