Java Code Examples for com.smartgwt.client.widgets.Label#setIcon()

The following examples show how to use com.smartgwt.client.widgets.Label#setIcon() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Editor.java    From proarc with GNU General Public License v3.0 5 votes vote down vote up
private Canvas createMainHeader(TreeGrid menu) {
        ToolStrip mainHeader = new ToolStrip();
        mainHeader.setWidth100();
        mainHeader.setHeight(40);

        mainHeader.addSpacer(6);

        Label headerItem = new Label();
        headerItem.setWrap(false);
        headerItem.setIcon("16/logo.png");
        headerItem.setIconHeight(16);
        headerItem.setIconWidth(205);
//        headerItem.setIcon("24/logo.png");
//        headerItem.setIconHeight(24);
//        headerItem.setIconWidth(307);
//        headerItem.setIcon("20/logo.png");
//        headerItem.setIconHeight(20);
//        headerItem.setIconWidth(256);

        mainHeader.addMember(createGlobalMenuButton(menu));
        mainHeader.addMember(createLangMenu());
        createUserLink(mainHeader, mainHeader.getMembers().length);
        mainHeader.addFill();
        mainHeader.addMember(headerItem);
        mainHeader.addSpacer(6);

        return mainHeader;
    }
 
Example 2
Source File: StatusView.java    From proarc with GNU General Public License v3.0 5 votes vote down vote up
private StatusView() {
    container = new HLayout();
    content = new Label();
    content.setIcon("[SKIN]/Dialog/say.png");
    content.setIconSize(20);
    content.setMargin(1);
    content.setPadding(1);

    content.setHeight(38);
    content.setValign(VerticalAlignment.CENTER);
    content.setAlign(Alignment.LEFT);
    content.setWrap(Boolean.FALSE);

    container.setMembers(content);
    container.setLeft(Page.getWidth() / 2 - 50);
    container.setTop(4);
    container.setLayoutLeftMargin(4);
    container.setLayoutRightMargin(4);
    container.setBorder("1px solid red");
    container.setBackgroundColor("white");
    container.setAutoHeight();
    container.setShowShadow(Boolean.TRUE);

    timer = new Timer() {

        @Override
        public void run() {
            container.animateHide(AnimationEffect.FADE);
        }
    };
}
 
Example 3
Source File: Setup.java    From document-management-software with GNU Lesser General Public License v3.0 4 votes vote down vote up
private void initGUI(final GUIInfo info) {
	WindowUtils.setTitle(info.getBranding().getProductName() + " " + info.getRelease()
			+ (info.getLicensee() != null ? " - " + I18N.message("licensedto") + ": " + info.getLicensee() : ""));
	WindowUtils.setFavicon(info);

	// Prepare a value manager that will include all forms spanned in each
	// tab
	vm = new ValuesManager();

	// Create all the tabs each one for a specific setup step
	tabs = new TabSet();
	tabs.setWidth(600);
	tabs.setHeight(250);

	Tab registrationTab = setupRegistration(vm);
	Tab repositoryTab = setupRepository(vm, info);
	Tab databaseTab = setupDatabase(vm, info);
	tabs.setTabs(registrationTab, repositoryTab, databaseTab);

	// This is the button used to confirm each step
	submit = new IButton();
	submit.setTitle(I18N.message("next"));
	submit.addClickHandler(new ClickHandler() {
		public void onClick(ClickEvent event) {
			onSubmit(info);
		}
	});

	// Prepare the heading panel with Logo and Title
	// Prepare the logo image to be shown inside the login form
	Label header = new Label(I18N.message("setup"));
	header.setStyleName("setupHeader");
	header.setIcon(info.getBranding().getLogoSrc());
	header.setIconWidth(205);
	header.setIconHeight(40);
	header.setHeight(45);

	// Prepare a panel to layout setup components
	VLayout layout = new VLayout();
	layout.setHeight(500);
	layout.setWidth(400);
	layout.setMembersMargin(5);
	layout.addMember(header);
	layout.addMember(tabs);
	layout.addMember(submit);

	// Panel for horizontal centering
	VLayout vPanel = new VLayout();
	vPanel.setDefaultLayoutAlign(Alignment.CENTER);
	vPanel.setWidth100();
	vPanel.setHeight(300);
	vPanel.addMember(layout);

	RootPanel.get().add(vPanel);

	// Remove the loading frame
	RootPanel.getBodyElement().removeChild(RootPanel.get("loadingwrapper-setup").getElement());
}