• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java VButton类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: enableAddAllBtn

import com.vaadin.client.ui.VButton; //导入依赖的package包/类
protected void enableAddAllBtn() {
    HTML br1 = new HTML("<span/>");
    br1.setStyleName(CLASSNAME + "-deco");
    buttons.add(br1);
    buttons.insert(br1, buttons.getWidgetIndex(add) + 1);
    addAll = new VButton();
    addAll.setText(">>");
    addAll.addStyleName("addAll");
    addAllHandlerRegistration = addAll.addClickHandler(this);
    buttons.insert(addAll, buttons.getWidgetIndex(br1) + 1);

    HTML br2 = new HTML("<span/>");
    br2.setStyleName(CLASSNAME + "-deco");
    buttons.add(br2);

    removeAll = new VButton();
    removeAll.setText("<<");
    removeAll.addStyleName("removeAll");
    removeAllHandlerRegistration = removeAll.addClickHandler(this);
    buttons.add(removeAll);
}
 
开发者ID:cuba-platform,项目名称:cuba,代码行数:22,代码来源:CubaTwinColSelectWidget.java


示例2: extend

import com.vaadin.client.ui.VButton; //导入依赖的package包/类
@Override
protected void extend(ServerConnector target) {
    final VButton button = (VButton) ((ComponentConnector) target).getWidget();

    button.addClickHandler(new ClickHandler() {
        @Override
        public void onClick(ClickEvent event) {
            if (getState().copyTargetSelector != null) {
                boolean success = copyToClipboard(getState().copyTargetSelector.startsWith(".")
                        ? getState().copyTargetSelector
                        : "." + getState().copyTargetSelector);
                getRpcProxy(CubaCopyButtonExtensionServerRpc.class).copied(success);
            }
        }
    });
}
 
开发者ID:cuba-platform,项目名称:cuba,代码行数:17,代码来源:CubaCopyButtonExtensionConnector.java


示例3: render

import com.vaadin.client.ui.VButton; //导入依赖的package包/类
@Override
public void render(RendererCellReference cell, RolloutRendererData text, VButton button) {
	final String creating = "CREATING";
	button.setText(text.getName());
	applystyle(button);
	// this is to allow the button to disappear, if the text is null
	button.setVisible(text.getName() != null);
	button.getElement().setId(new StringBuilder("link").append(".").append(text.getName()).toString());
	/*
	 * checking Rollout Status for applying button style. If Rollout status
	 * is not "CREATING", then the Rollout button is applying hyperlink
	 * style
	 */
	final boolean isStatusCreate = text.getStatus() != null && creating.equalsIgnoreCase(text.getStatus());
	if (isStatusCreate) {
		button.addStyleName(getStyle("boldhide"));
		button.setEnabled(false);
	} else {
		button.setEnabled(true);
	}
}
 
开发者ID:eclipse,项目名称:hawkbit,代码行数:22,代码来源:RolloutRenderer.java


示例4: resetItemSelection

import com.vaadin.client.ui.VButton; //导入依赖的package包/类
public static void resetItemSelection(Widget popup) {
    if (popup instanceof VAbstractOrderedLayout) {
        VAbstractOrderedLayout content = (VAbstractOrderedLayout) popup;
        if (content.getStyleName().contains(CUBA_CONTEXT_MENU_CONTAINER)) {
            for (Widget slot : content) {
                VButton button = (VButton) ((Slot) slot).getWidget();
                if (button != null && button.getStyleName().contains(SELECTED_ITEM_STYLE)) {
                    button.removeStyleName(SELECTED_ITEM_STYLE);
                }
            }
        }
    }
}
 
开发者ID:cuba-platform,项目名称:cuba,代码行数:14,代码来源:Tools.java


示例5: isSuitableWidget

import com.vaadin.client.ui.VButton; //导入依赖的package包/类
public static boolean isSuitableWidget(Widget slotWidget) {
    if (slotWidget instanceof VButton) {
        VButton button = (VButton) slotWidget;

        if (button.isEnabled()) {
            return true;
        }
    } else if (slotWidget instanceof CubaFileUploadWidget) {
        return true;
    } else if (slotWidget instanceof VUpload) {
        return true;
    }

    return false;
}
 
开发者ID:cuba-platform,项目名称:cuba,代码行数:16,代码来源:Tools.java


示例6: applystyles

import com.vaadin.client.ui.VButton; //导入依赖的package包/类
private void applystyles(final Button button, final boolean buttonEnable) {

        button.setStyleName(VButton.CLASSNAME);
        button.addStyleName(getStyle("tiny"));
        button.addStyleName(getStyle("borderless-colored"));
        button.addStyleName(getStyle("button-no-border"));
        button.addStyleName(getStyle("action-type-padding"));

        if (buttonEnable) {
            return;
        }
        button.addStyleName("v-disabled");
    }
 
开发者ID:eclipse,项目名称:hawkbit,代码行数:14,代码来源:HtmlButtonRenderer.java


示例7: applyStyles

import com.vaadin.client.ui.VButton; //导入依赖的package包/类
private static void applyStyles(final Button button, final boolean buttonDisabled, final String additionalStyle) {

        button.setStyleName(VButton.CLASSNAME);
        button.addStyleName(getStyle("tiny"));
        button.addStyleName(getStyle("borderless"));
        button.addStyleName(getStyle("button-no-border"));
        button.addStyleName(getStyle("action-type-padding"));
        button.addStyleName(getStyle(additionalStyle));

        if (buttonDisabled) {
            button.addStyleName("v-disabled");
        }
    }
 
开发者ID:eclipse,项目名称:hawkbit,代码行数:14,代码来源:GridButtonRenderer.java


示例8: createWidget

import com.vaadin.client.ui.VButton; //导入依赖的package包/类
@Override
public VButton createWidget() {
	VButton b = GWT.create(VButton.class);
	b.addClickHandler(this);
	b.setStylePrimaryName("v-nativebutton");
	return b;
}
 
开发者ID:eclipse,项目名称:hawkbit,代码行数:8,代码来源:RolloutRenderer.java


示例9: applystyle

import com.vaadin.client.ui.VButton; //导入依赖的package包/类
private void applystyle(VButton button) {
	button.setStyleName(VButton.CLASSNAME);
	button.addStyleName(getStyle("borderless"));
	button.addStyleName(getStyle("small"));
	button.addStyleName(getStyle("on-focus-no-border"));
	button.addStyleName(getStyle("link"));
}
 
开发者ID:eclipse,项目名称:hawkbit,代码行数:8,代码来源:RolloutRenderer.java


示例10: createCloseButton

import com.vaadin.client.ui.VButton; //导入依赖的package包/类
private Widget createCloseButton() {
    VButton closeButton = new VButton();
    if(getState().closeCaption != null) {
        closeButton.setText(getState().closeCaption);
    } else {
        closeButton.setHtml("&#10005;");
    }
    closeButton.addStyleName("close-button");
    closeButton.addClickHandler(e -> {
        closeOverlay();
        resetTimeout();
    });
    return closeButton;
}
 
开发者ID:alump,项目名称:IdleAlarm,代码行数:15,代码来源:IdleAlarmConnector.java


示例11: createButton

import com.vaadin.client.ui.VButton; //导入依赖的package包/类
private Widget createButton(final int id, int index, String caption, Collection<String> styleNames) {
    VButton redirectButton = new VButton();
    if(caption != null) {
        redirectButton.setText(caption);
    }
    redirectButton.addStyleName("button-" + index);
    styleNames.forEach(styleName -> redirectButton.addStyleName(styleName));
    redirectButton.addClickHandler(e -> {
        MouseEventDetails details = MouseEventDetailsBuilder.buildMouseEventDetails(e.getNativeEvent());
        getRpcProxy(IdleAlarmServerRpc.class).buttonClicked(id, details);
    });
    return redirectButton;
}
 
开发者ID:alump,项目名称:IdleAlarm,代码行数:14,代码来源:IdleAlarmConnector.java


示例12: getSubmitButton

import com.vaadin.client.ui.VButton; //导入依赖的package包/类
public VButton getSubmitButton() {
    return submitButton;
}
 
开发者ID:cuba-platform,项目名称:cuba,代码行数:4,代码来源:CubaFileUploadWidget.java


示例13: getStyle

import com.vaadin.client.ui.VButton; //导入依赖的package包/类
private String getStyle(final String style) {
    return new StringBuilder(style).append(" ").append(VButton.CLASSNAME).append("-").append(style).toString();
}
 
开发者ID:eclipse,项目名称:hawkbit,代码行数:4,代码来源:HtmlButtonRenderer.java


示例14: getStyle

import com.vaadin.client.ui.VButton; //导入依赖的package包/类
private static String getStyle(final String style) {
    return new StringBuilder(style).append(" ").append(VButton.CLASSNAME).append("-").append(style).toString();
}
 
开发者ID:eclipse,项目名称:hawkbit,代码行数:4,代码来源:GridButtonRenderer.java


示例15: getStyle

import com.vaadin.client.ui.VButton; //导入依赖的package包/类
private String getStyle(final String style) {
	return new StringBuilder(style).append(" ").append(VButton.CLASSNAME).append("-").append(style).toString();
}
 
开发者ID:eclipse,项目名称:hawkbit,代码行数:4,代码来源:RolloutRenderer.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java SyncGenerationPolicy类代码示例发布时间:2022-05-23
下一篇:
Java ApiException类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap