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

The following examples show how to use com.smartgwt.client.widgets.Label#setHeight() . 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: UserPropertiesPanel.java    From document-management-software with GNU Lesser General Public License v3.0 6 votes vote down vote up
public UserPropertiesPanel(GUIUser user, ChangedHandler changedHandler) {
	if (user == null) {
		setMembers(UsersPanel.SELECT_USER);
	} else {
		this.user = user;
		this.changedHandler = changedHandler;
		setWidth100();
		setHeight100();
		setMembersMargin(20);

		layout.setWidth(300);

		idLabel = new Label(I18N.message("id") + ": " + Long.toString(user.getId()));
		idLabel.setHeight(15);
		layout.addMember(idLabel, 0);

		prepareGUI();
	}
}
 
Example 2
Source File: TenantPropertiesPanel.java    From document-management-software with GNU Lesser General Public License v3.0 6 votes vote down vote up
public TenantPropertiesPanel(GUITenant tenant, ChangedHandler changedHandler) {
	if (tenant == null) {
		setMembers(TenantsPanel.SELECT_TENANT);
	} else {
		this.tenant = tenant;
		this.changedHandler = changedHandler;
		setWidth100();
		setHeight100();
		setMembersMargin(20);

		layout.setWidth(300);

		idLabel = new Label(I18N.message("id") + ": " + Long.toString(tenant.getId()));
		idLabel.setHeight(15);
		layout.addMember(idLabel, 0);

		refresh();
	}
}
 
Example 3
Source File: FeatureDisabled.java    From document-management-software with GNU Lesser General Public License v3.0 6 votes vote down vote up
public FeatureDisabled(Integer feature) {
	Label label = null;
	if (feature == null)
		label = new MessageLabel(new GUIMessage("<b>" + I18N.message("featuredisabled") + "</b>",
				GUIMessage.PRIO_WARN), false);
	else
		label = new MessageLabel(new GUIMessage("<b>" + I18N.message("feature_" + feature) + " "
				+ I18N.message("disabled") + "</b>", GUIMessage.PRIO_WARN), false);
	new Label();
	label.setHeight(30);
	label.setPadding(10);
	label.setAlign(Alignment.CENTER);
	label.setValign(VerticalAlignment.CENTER);
	label.setShowEdges(false);

	addMember(label);
}
 
Example 4
Source File: SessionTimeout.java    From document-management-software with GNU Lesser General Public License v3.0 6 votes vote down vote up
private SessionTimeout() {
	setShowEdges(false);
	setShowHeader(false);
	centerInPage();
	setIsModal(true);
	setVertical(true);
	setAlign(Alignment.CENTER);
	setMargin(2);
	setMembersMargin(0);
	setBodyColor("white");
	setBackgroundColor("white");
	setOverflow(Overflow.HIDDEN);
	setHeight100();
	setWidth100();

	Label message = new Label(I18N.message("sessiontimeout"));
	message.setWrap(false);
	message.setAlign(Alignment.CENTER);
	message.setStyleName("sessiontimeout");
	message.setLayoutAlign(Alignment.CENTER);
	message.setLayoutAlign(VerticalAlignment.CENTER);
	message.setHeight(50);
	message.setBackgroundColor("white");

	addMember(message);
}
 
Example 5
Source File: UpdatePanel.java    From document-management-software with GNU Lesser General Public License v3.0 5 votes vote down vote up
private void onUpdateUnavailable() {
	Label message = new Label();
	message.setContents(I18N.message("updatepackagenotfound"));
	message.setWrap(false);
	message.setAlign(Alignment.LEFT);
	message.setStyleName("updateunavailable");
	message.setLayoutAlign(Alignment.LEFT);
	message.setLayoutAlign(VerticalAlignment.TOP);
	message.setHeight(20);
	setMembers(message);
}
 
Example 6
Source File: AutomationEditor.java    From document-management-software with GNU Lesser General Public License v3.0 5 votes vote down vote up
@Override
public void onDraw() {
	if (title != null) {
		Label label = new Label(I18N.message(title));
		label.setHeight(20);
		addMember(label);
	}
	addMember(editor);

	editor.startEditor();
	editor.setMode(AceEditorMode.VELOCITY);
	editor.setTheme(AceEditorTheme.ECLIPSE);
	editor.setShowGutter(true);
	editor.setShowPrintMargin(false);
	editor.setAutocompleteEnabled(true);

	AceEditor.addCompletionProvider(new AutomationCompletionProvider());

	editor.setWidth(getWidth() - 20 + "px");
	editor.setHeight(getHeight() - 20 + "px");

	if (text != null)
		editor.setText(text);

	editor.addOnChangeHandler(new AceEditorCallback() {

		@Override
		public void invokeAceCallback(JavaScriptObject obj) {
			if (changedHandler != null)
				changedHandler.onChanged(null);
		}
	});
}
 
Example 7
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 8
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());
}
 
Example 9
Source File: AboutDialog.java    From document-management-software with GNU Lesser General Public License v3.0 4 votes vote down vote up
public AboutDialog() {
	super();

	addCloseClickHandler(new CloseClickHandler() {
		@Override
		public void onCloseClick(CloseClickEvent event) {
			destroy();
		}
	});

	setHeaderControls(HeaderControls.HEADER_LABEL, HeaderControls.CLOSE_BUTTON);
	setTitle(I18N.message("about") + " " + Session.get().getInfo().getBranding().getProductName());
	setWidth(400);
	setPadding(2);
	setAutoSize(true);
	setIsModal(true);
	setShowModalMask(true);
	centerInPage();

	HTMLPane vspacer1 = new HTMLPane();
	vspacer1.setContents("<div>&nbsp;</div>");
	vspacer1.setPixelSize(100, 5);
	vspacer1.setOverflow(Overflow.HIDDEN);

	Img logoImage = ItemFactory.newBrandImg("logo.png", Session.get().getInfo());
	logoImage.setWidth(205);
	logoImage.setHeight(40);

	Label productName = new Label(Session.get().getInfo().getBranding().getProductName());
	productName.setWrap(false);
	productName.setHeight(10);
	productName.setAlign(Alignment.CENTER);

	Label version = new Label(I18N.message("version") + " " + Session.get().getInfo().getRelease());
	version.setWrap(false);
	version.setHeight(10);
	version.setAlign(Alignment.CENTER);

	Label copyright = new Label("&copy; " + Session.get().getInfo().getYear() + " "
			+ Session.get().getInfo().getBranding().getVendor());
	copyright.setWrap(false);
	copyright.setHeight(20);
	copyright.setAlign(Alignment.CENTER);

	Label trademark = new Label(I18N.message("copyrights", new String[] { Session.get().getInfo().getBranding().getProduct(),
			Session.get().getInfo().getBranding().getProduct(), Session.get().getInfo().getBranding().getVendor() }));
	trademark.setWidth("80%");
	trademark.setHeight(40);
	trademark.setAlign(Alignment.CENTER);

	// Prepare the website link
	String wsurl = Session.get().getInfo().getBranding().getUrl();

	String htmlUrl = "";
	if (Session.get().getInfo().getBranding().getUrl() != null && !"-".equals(Session.get().getInfo().getBranding().getUrl()))
		htmlUrl = "<div style='text-align: center;'><a href='" + wsurl + "' target='_blank'>" + wsurl
				+ "</a></div>";
	HTMLPane sitelink = new HTMLPane();
	sitelink.setContents(htmlUrl);
	sitelink.setPixelSize(300, 16);
	sitelink.setAlign(Alignment.CENTER);
	sitelink.setLayoutAlign(Alignment.CENTER);

	// Prepare the support link
	String support = Session.get().getInfo().getBranding().getSupport();
	String htmlSupp = "<div style='text-align: center;'><a href='mailto:" + support + "'>" + support + "</a></div>";
	HTMLPane maillink = new HTMLPane();
	maillink.setContents(htmlSupp);
	maillink.setPixelSize(300, 16);
	maillink.setAlign(Alignment.CENTER);
	maillink.setLayoutAlign(Alignment.CENTER);

	HTMLPane vspacer2 = new HTMLPane();
	vspacer2.setContents("<div>&nbsp;</div>");
	vspacer2.setPixelSize(100, 10);
	vspacer2.setOverflow(Overflow.HIDDEN);

	VStack content = new VStack();
	content.setWidth("100%");
	content.setMembersMargin(5);
	content.setMargin(4);
	content.setAlign(Alignment.CENTER);
	content.setDefaultLayoutAlign(Alignment.CENTER);
	content.setBackgroundColor("#ffffff");
	content.setMembers(vspacer1, logoImage, productName, version, copyright, trademark, sitelink, maillink,
			vspacer2);

	addItem(content);
}