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

The following examples show how to use com.smartgwt.client.widgets.Img#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: TopPanel.java    From document-management-software with GNU Lesser General Public License v3.0 6 votes vote down vote up
public TopPanel() {
	setBackgroundImage(Session.get().getInfo().getBranding().getBannerSrc());
	setBackgroundRepeat(BackgroundRepeat.REPEAT_X);
	setBackgroundPosition("top left");
	setWidth100();
	setHeight(45);

	// Prepare the logo image to be shown inside the banner
	Img logoImage = ItemFactory.newBrandImg("logo_head.png", Session.get().getInfo());
	logoImage.setStyleName("logo_head");
	logoImage.setWidth(205);
	logoImage.setHeight(40);
	addMember(logoImage);

	Img separator = ItemFactory.newImg("blank.png");
	separator.setWidth100();
	addMember(separator);
	
	// Prepare the OEM logo image to be shown inside the banner
	Img logoOemImage = ItemFactory.newBrandImg("logo_head_oem.png", Session.get().getInfo());
	logoOemImage.setStyleName("logo_head_oem");
	logoOemImage.setWidth(205);
	logoOemImage.setHeight(40);
	addMember(logoOemImage);
}
 
Example 2
Source File: ProgressCanvas.java    From document-management-software with GNU Lesser General Public License v3.0 5 votes vote down vote up
public ProgressCanvas(int progress) {

		setHeight(15);
		setAlign(Alignment.CENTER);

		Progressbar progressBar = new Progressbar();
		progressBar.setHeight(8);
		progressBar.setMargin(3);
		progressBar.setVertical(false);
		progressBar.setShowTitle(true);

		boolean enabled = true;
		// record.getAttributeAsBoolean("eenabled");
		boolean running = true;
		// record.getAttributeAsInt("status") ==
		// GUITask.STATUS_RUNNING;
		Img image = new Img();
		if (enabled && running) {
			image = ItemFactory.newImgIcon("paste.gif");
		} else {
			image = ItemFactory.newImgIcon("document_lock.png");
		}

		image.setWidth("16px");
		image.setHeight("16px");

		addMember(progressBar);
		addMember(image);

		setProgress(progress);
	}
 
Example 3
Source File: StationSelector.java    From SensorWebClient with GNU General Public License v2.0 5 votes vote down vote up
private Canvas createStationLoadingSpinner() {
	stationLoadingSpinner = new Img("../img/loader.gif");
	stationLoadingSpinner.setWidth(32);
	stationLoadingSpinner.setHeight(32);
	setStationLoadingSpinnerPosition();
	return stationLoadingSpinner;
}
 
Example 4
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);
}