當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。