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


Java CssLayout.setStyleName方法代码示例

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


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

示例1: AttachmentPreviewView

import com.vaadin.ui.CssLayout; //导入方法依赖的package包/类
public AttachmentPreviewView() {
    CssLayout imgWrap = new CssLayout();
    imgWrap.setStyleName("image-wrap");
    imgWrap.setSizeFull();

    this.setStyleName("attachment-preview-view");
    this.setSizeFull();
    this.addComponent(imgWrap, "top: 0px left: 0px; z-index: 0;");

    backBtn = new NavigationButton(UserUIContext.getMessage(GenericI18Enum.M_BUTTON_BACK));
    backBtn.setStyleName("back-btn");

    this.addComponent(backBtn, "top: 15px; left: 15px; z-index: 1;");

    previewImage = new Image();
    imgWrap.addComponent(previewImage);
}
 
开发者ID:MyCollab,项目名称:mycollab,代码行数:18,代码来源:AttachmentPreviewView.java

示例2: displayChart

import com.vaadin.ui.CssLayout; //导入方法依赖的package包/类
final protected void displayChart() {
    removeAllComponents();
    final JFreeChart chart = createChart();
    final JFreeChartWrapper chartWrapper = new JFreeChartWrapper(chart);

    final CssLayout borderWrap = new CssLayout();
    borderWrap.addComponent(chartWrapper);
    borderWrap.setStyleName("chart-wrapper");
    borderWrap.setHeight(height + "px");
    borderWrap.setWidth(width + "px");
    chartWrapper.setHeight(height + "px");
    chartWrapper.setWidth(width + "px");
    chartWrapper.setGraphHeight(height);
    chartWrapper.setGraphWidth(width);
    this.addComponent(borderWrap);
    final Component legendBox = createLegendBox();
    if (legendBox != null) {
        this.addComponent(legendBox);
    }
}
 
开发者ID:MyCollab,项目名称:mycollab,代码行数:21,代码来源:GenericChartWrapper.java

示例3: createMessage

import com.vaadin.ui.CssLayout; //导入方法依赖的package包/类
/**
 * Create a new item into the queue. It is not visible until added with
 */
protected Message createMessage(final Component component, String style) {

    final Message m = new Message();

    // Wrap to a CssLayout (this is needed for styling and sizing correctly)
    CssLayout css = new CssLayout();
    css.setWidth("100%");
    css.setStyleName(Notifique.STYLE_ITEM);
    css.addStyleName(style != null ? style : Styles.MESSAGE);
    css.addComponent(component);

    // Wrap component into an animator
    m.component = component;
    m.animatedContent = css;

    return m;
}
 
开发者ID:Haulmont,项目名称:Notifique,代码行数:21,代码来源:Notifique.java

示例4: buildLoginInformation

import com.vaadin.ui.CssLayout; //导入方法依赖的package包/类
private CssLayout buildLoginInformation() {
    CssLayout loginInformation = new CssLayout();
    loginInformation.setStyleName("login-information");
    Label loginInfoText = new Label(
            "<h1>Login Information</h1>"
                    + "Log in as &quot;admin&quot; to have full access. Log in with any other username to have read-only access. For all users, any password is fine",
            ContentMode.HTML);
    loginInfoText.setWidth("270px");
    loginInformation.addComponent(loginInfoText);
    LanguageSelector language = new LanguageSelector();
    loginInformation.addComponent(language);
    return loginInformation;
}
 
开发者ID:viydaag,项目名称:dungeonstory-java,代码行数:14,代码来源:LoginScreen.java

示例5: buildLoginInformation

import com.vaadin.ui.CssLayout; //导入方法依赖的package包/类
private CssLayout buildLoginInformation() {
    CssLayout loginInformation = new CssLayout();
    loginInformation.setStyleName("login-information");
    Label loginInfoText = new Label(
            "<h1>Welcome to Bookery</h1>"
                    + "Please provide your login to access your library. If you have problems logging in, please contact your administrator.",
            ContentMode.HTML);
    loginInformation.addComponent(loginInfoText);
    return loginInformation;
}
 
开发者ID:felixhusse,项目名称:bookery,代码行数:11,代码来源:LoginView.java

示例6: buildLoginInformation

import com.vaadin.ui.CssLayout; //导入方法依赖的package包/类
private CssLayout buildLoginInformation() {
    CssLayout loginInformation = new CssLayout();
    loginInformation.setStyleName("login-information");
    Label loginInfoText = new Label(
            "<h1>Login Information</h1>"
                    + "Log in as &quot;admin&quot; to have full access. Log in with any other username to have read-only access. For all users, any password is fine",
            ContentMode.HTML);
    loginInformation.addComponent(loginInfoText);
    return loginInformation;
}
 
开发者ID:jvalenciag,项目名称:VaadinSpringShiroMongoDB,代码行数:11,代码来源:LoginScreen.java

示例7: initContent

import com.vaadin.ui.CssLayout; //导入方法依赖的package包/类
@Override
protected Component initContent() {
    ProjectMemberService projectMemberService = AppContextUtil.getSpringBean(ProjectMemberService.class);
    List<SimpleUser> members = projectMemberService.getActiveUsersInProject(projectId, AppUI.getAccountId());
    CssLayout container = new CssLayout();
    container.setStyleName("followers-container");
    final CheckBox selectAllCheckbox = new CheckBox("All", defaultSelectAll);
    selectAllCheckbox.addValueChangeListener(valueChangeEvent -> {
        boolean val = selectAllCheckbox.getValue();
        for (FollowerCheckbox followerCheckbox : memberSelections) {
            followerCheckbox.setValue(val);
        }
    });
    container.addComponent(selectAllCheckbox);
    for (SimpleUser user : members) {
        final FollowerCheckbox memberCheckbox = new FollowerCheckbox(user);
        memberCheckbox.addValueChangeListener(valueChangeEvent -> {
            if (!memberCheckbox.getValue()) {
                selectAllCheckbox.setValue(false);
            }
        });
        if (defaultSelectAll || selectedUsers.contains(user.getUsername())) {
            memberCheckbox.setValue(true);
        }
        memberSelections.add(memberCheckbox);
        container.addComponent(memberCheckbox);
    }
    return container;
}
 
开发者ID:MyCollab,项目名称:mycollab,代码行数:30,代码来源:ProjectSubscribersComp.java

示例8: RightSidebarLayout

import com.vaadin.ui.CssLayout; //导入方法依赖的package包/类
public RightSidebarLayout() {
    this.setStyleName("rightsidebar-layout");
    this.setWidth("100%");

    contentWrap = new CssLayout();
    contentWrap.setStyleName("content-wrap");
    contentWrap.setWidth("100%");
    this.addComponent(contentWrap);

    sidebarWrap = new CssLayout();
    sidebarWrap.setStyleName("sidebar-wrap");
    sidebarWrap.setWidth("250px");
    this.addComponent(sidebarWrap);
}
 
开发者ID:MyCollab,项目名称:mycollab,代码行数:15,代码来源:RightSidebarLayout.java

示例9: buildLoginForm

import com.vaadin.ui.CssLayout; //导入方法依赖的package包/类
private Component buildLoginForm() {
    FormLayout loginForm = new FormLayout();

    loginForm.addStyleName(DSTheme.LOGIN_FORM);
    loginForm.setSizeUndefined();
    loginForm.setMargin(false);
    loginForm.setId("loginForm");

    username = new TextField();
    username.setValue("admin");
    username.setId("username");
    username.setWidth(15, Unit.EM);
    loginForm.addComponent(username);

    password = new PasswordField();
    password.setId("password");
    password.setWidth(15, Unit.EM);
    loginForm.addComponent(password);

    CssLayout buttons = new CssLayout();
    buttons.setStyleName(DSTheme.LOGIN_BUTTON_LAYOUT);
    loginForm.addComponent(buttons);

    loginButton = new Button();
    loginButton.setId("login");
    loginButton.setDisableOnClick(true);
    loginButton.addClickListener(e -> {
        try {
            login();
        } finally {
            loginButton.setEnabled(true);
        }
    });
    buttons.addComponent(loginButton);

    loginButton.setClickShortcut(ShortcutAction.KeyCode.ENTER);
    loginButton.addStyleName(ValoTheme.BUTTON_FRIENDLY);

    forgotPassword = new Button();
    forgotPassword.setId("forgotPassword");
    forgotPassword.addStyleName(ValoTheme.BUTTON_LINK);
    //        forgotPassword.addClickListener(e -> showNotification(new Notification("Hint: Try anything")));

    buttons.addComponent(forgotPassword);

    newUserButton = new Button();
    newUserButton.setId("newUser");
    newUserButton.addClickListener(e -> {
        centeringLayout.removeAllComponents();
        centeringLayout.addComponent(newUserForm);
        centeringLayout.setComponentAlignment(newUserForm, Alignment.MIDDLE_CENTER);
    });
    buttons.addComponent(newUserButton);

    return loginForm;
}
 
开发者ID:viydaag,项目名称:dungeonstory-java,代码行数:57,代码来源:LoginScreen.java

示例10: buildHeader

import com.vaadin.ui.CssLayout; //导入方法依赖的package包/类
private static Component buildHeader() {
    final CssLayout cssLayout = new CssLayout();
    cssLayout.setStyleName("view-header");
    return cssLayout;
}
 
开发者ID:eclipse,项目名称:hawkbit,代码行数:6,代码来源:AbstractHawkbitLoginUI.java

示例11: buildHeader

import com.vaadin.ui.CssLayout; //导入方法依赖的package包/类
private Component buildHeader() {
    final CssLayout cssLayout = new CssLayout();
    cssLayout.setStyleName("view-header");
    return cssLayout;
}
 
开发者ID:eclipse,项目名称:hawkbit,代码行数:6,代码来源:AbstractHawkbitUI.java

示例12: initialize

import com.vaadin.ui.CssLayout; //导入方法依赖的package包/类
@Override
public void initialize(Localizer localizer, LevelMathDataWrapper<E> data,
		S submInfo, TempFilesManager tempMan, ExecutionSettings execSettings) {
	this.execSettings = execSettings;
	this.localizer = localizer;
	this.submInfo = submInfo;
	allLevels = data;
	
	easy = MathUIFactory.getStarButton(
			localizer.getUIText(UIConstants.LEVEL_EASY), localizer);
	easy.setIcon(MathIcons.getIcon(MathIcons.STAR_EASY));
	easy.setId("math-easy");

	normal = MathUIFactory.getStarButton(
			localizer.getUIText(UIConstants.LEVEL_NORMAL), localizer);
	normal.setIcon(MathIcons.getIcon(MathIcons.STAR_NORMAL));
	normal.setId("math-normal");

	hard = MathUIFactory.getStarButton(
			localizer.getUIText(UIConstants.LEVEL_HARD), localizer);
	hard.setIcon(MathIcons.getIcon(MathIcons.STAR_HARD));
	hard.setId("math-hard");
	
	List<Button> buttonList = new ArrayList<>();
	buttonList.add(easy);
	buttonList.add(normal);
	buttonList.add(hard);
	
	CssLayout buttons = new CssLayout();
	buttons.setStyleName("math-levelbutton-wrapper");
	
	buttonList.forEach(b -> {
		b.addClickListener(cl);
		b.addStyleName("math-levelbutton");
		buttons.addComponent(b);
	});
	
	Label header = new Label(localizer.getUIText(UIConstants.CHOOSE_LEVEL));
	header.addStyleName("math-h1");
	header.setSizeUndefined();
	
	addComponents(header, buttons);
}
 
开发者ID:villeteam,项目名称:vexer,代码行数:44,代码来源:LevelMathExecutorWrapper.java


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