Java Code Examples for com.smartgwt.client.widgets.layout.Layout#addMember()

The following examples show how to use com.smartgwt.client.widgets.layout.Layout#addMember() . 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: LegendEntryTimeSeries.java    From SensorWebClient with GNU General Public License v2.0 6 votes vote down vote up
private Canvas createValueIntervalLabel() {
	Layout interval = new HLayout();
	interval.setAutoWidth();
	interval.setStyleName("n52_sensorweb_client_legendInfoRow");
	this.firstValueInterval.setAutoWidth();
	this.firstValueInterval.setWrap(false);
	this.firstValueInterval.setStyleName("n52_sensorweb_client_legendlink");
	this.lastValueInterval.setAutoWidth();
	this.lastValueInterval.setWrap(false);
	this.lastValueInterval.setStyleName("n52_sensorweb_client_legendlink");
	Label separator = new Label(i18n.to());
	separator.setAlign(Alignment.CENTER);
	separator.setWidth(20);
	interval.addMember(this.firstValueInterval);
	interval.addMember(separator);
	interval.addMember(this.lastValueInterval);
	return interval;
}
 
Example 2
Source File: Header.java    From SensorWebClient with GNU General Public License v2.0 6 votes vote down vote up
private Layout getHomeLabel() {
	Layout layout = new VLayout();
	layout.setStyleName("n52_sensorweb_client_logoBlock");
	Img homeLabel = new Img("../img/client-logo.png", 289, 55);
	homeLabel.setStyleName("n52_sensorweb_client_logo");
	homeLabel.setCursor(Cursor.POINTER);
       homeLabel.addClickHandler(new ClickHandler() {
		@Override
		public void onClick(ClickEvent event) {
			String url = "http://52north.org/communities/sensorweb/";
               Window.open(url, "_blank", "");
		}
       });
       layout.addMember(homeLabel);
	return layout;
}
 
Example 3
Source File: ChannelsPanel.java    From document-management-software with GNU Lesser General Public License v3.0 5 votes vote down vote up
@Override
public void onDraw() {
	ToolStrip toolStrip = new ToolStrip();
	toolStrip.setHeight(20);
	toolStrip.setWidth100();
	toolStrip.addSpacer(2);
	ToolStripButton refresh = new ToolStripButton();
	refresh.setTitle(I18N.message("refresh"));
	toolStrip.addButton(refresh);
	refresh.addClickHandler(new ClickHandler() {
		@Override
		public void onClick(ClickEvent event) {
			list.refresh(new ChannelsDS());
		}
	});
	toolStrip.addFill();

	Layout listing = new VLayout();
	setMembers(toolStrip, listing);

	ListGridField name = new ListGridField("name", I18N.message("channel"), 150);
	name.setCanEdit(false);

	ListGridField members = new ListGridField("members", I18N.message("members"));
	members.setCanEdit(false);
	members.setWidth("*");

	list = new RefreshableListGrid();
	list.setEmptyMessage(I18N.message("notitemstoshow"));
	list.setCanEdit(false);
	list.setWidth100();
	list.setHeight100();
	list.setAutoFetchData(true);
	list.setSelectionType(SelectionStyle.SINGLE);
	list.setFields(name, members);
	list.setDataSource(new ChannelsDS());

	listing.addMember(list);
}
 
Example 4
Source File: RunLevelPanel.java    From document-management-software with GNU Lesser General Public License v3.0 5 votes vote down vote up
@Override
public void onDraw() {
	ToolStrip toolbar = new ToolStrip();
	toolbar.setWidth100();
	ToolStripButton save = new ToolStripButton(I18N.message("save"));
	save.setDisabled("demo".equals(Session.get().getConfig("runlevel")));
	save.addClickHandler(new ClickHandler() {

		@Override
		public void onClick(ClickEvent event) {
			onSave();
		}
	});
	currentRunlevel = ItemFactory.newRunlevelSelector();

	toolbar.addFormItem(currentRunlevel);
	toolbar.addSeparator();
	toolbar.addButton(save);

	Layout layout = new VLayout();
	layout.setWidth100();
	layout.setHeight100();
	layout.addMember(toolbar);
	layout.addMember(prepareAspectsTable());

	Tab tab = new Tab();
	tab.setTitle(I18N.message("runlevel"));
	tab.setPane(layout);

	TabSet tabs = new TabSet();
	tabs.setTabs(tab);

	setMembers(tabs);
}
 
Example 5
Source File: OverUndershootRuleTemplate.java    From SensorWebClient with GNU General Public License v2.0 5 votes vote down vote up
@Override
public Canvas createEditCanvas() {
    controller.clearSelectionData();
    Layout layout = new VLayout();
    layout.setStyleName("n52_sensorweb_client_create_abo_template_overundershootcondition");
    layout.addMember(alignVerticalCenter(createEntryConditionEditCanvas()));
    layout.addMember(alignVerticalCenter(createExitConditionEditCanvas()));
    return layout;
}
 
Example 6
Source File: EventSubscriptionWindow.java    From SensorWebClient with GNU General Public License v2.0 5 votes vote down vote up
private Canvas createSubscribeAndHelpContent() {
    Layout layout = new HLayout();
    layout.addMember(createNewEventAbonnementCanvas());
    layout.addMember(createContextWindowHelp());
    layout.setOverflow(VISIBLE);
    return layout;
}
 
Example 7
Source File: EventSubscriptionWindow.java    From SensorWebClient with GNU General Public License v2.0 5 votes vote down vote up
private Canvas createNewEventAbonnementCanvas() {
    Layout subscriptionContent = new VLayout();
    subscriptionContent.setStyleName("n52_sensorweb_client_create_abo_form_content");
    subscriptionContent.addMember(createStationInfo());
    subscriptionContent.addMember(createRuleTemplateSelectionCanvas());
    subscriptionContent.addMember(new EventNameForm(controller));
    subscriptionContent.addMember(createApplyCancelCanvas());
    subscriptionContent.addMember(new TimeSeriesMetadataTable(controller));
    return subscriptionContent;
}
 
Example 8
Source File: EventSubscriptionWindow.java    From SensorWebClient with GNU General Public License v2.0 5 votes vote down vote up
private Canvas createRuleTemplateSelectionCanvas() {
    Layout selectionCanvas = new VLayout();
    SelectSubscriptionForm selectionRadioForm = new SelectSubscriptionForm(controller);
    SubscriptionTemplate template = selectionRadioForm.getDefaultSubscriptionTemplate();
    Canvas ruleTemplateEditCanvas = createRuleTemplateEditorCanvas(template);
    selectionCanvas.addMember(selectionRadioForm);
    selectionCanvas.addMember(ruleTemplateEditCanvas);
    return selectionCanvas;
}
 
Example 9
Source File: SensorLossRuleTemplate.java    From SensorWebClient with GNU General Public License v2.0 5 votes vote down vote up
@Override
public Canvas createEditCanvas() {
    controller.clearSelectionData();
    Layout layout = new VLayout();
    layout.setStyleName("n52_sensorweb_client_create_abo_template_sensorlosscondition");
    layout.addMember(alignVerticalCenter(createEditConditionCanvas()));
    return layout;
}
 
Example 10
Source File: StationSelector.java    From SensorWebClient with GNU General Public License v2.0 5 votes vote down vote up
private Canvas createSelectionMenuWindow() {
	Layout layout = new Layout();
       layout.addMember(createExpandableSelectionGrid());
	selectionMenu = new InteractionWindow(layout);
	selectionMenu.setZIndex(1000000);
	selectionMenu.setWidth(250);
	selectionMenu.setHeight(290);
	selectionMenu.setWindowTitle(i18n.dataprovider());
	setSelectionMenuWindowPosition();
	return selectionMenu;
}
 
Example 11
Source File: Header.java    From SensorWebClient with GNU General Public License v2.0 5 votes vote down vote up
private void generateHeader(){

        setStyleName("n52_sensorweb_client_headerContainer");
        setBackgroundImage("../img/52n_bg.png");
        setAutoHeight();

        addMember(getHomeLabel());

        Layout rightLayout = new VLayout();
        Layout linkLayout = new HLayout();
        linkLayout.setStyleName("n52_sensorweb_client_linkBlock");
        linkLayout.setAlign(Alignment.RIGHT);

//        linkLayout.addMember(getVersionInfo());
//        linkLayout.addMember(getSeparator());
        
        // temporary button for metadata reset
        //linkLayout.addMember(getMetadatareset());
        //linkLayout.addMember(getSeparator());
        
        linkLayout.addMember(getPermalinkLink());
        linkLayout.addMember(getSeparator());
        linkLayout.addMember(getHelpLink());
        linkLayout.addMember(getSeparator());
        linkLayout.addMember(getAddBookmarkLink());
        linkLayout.addMember(getSeparator());
        linkLayout.addMember(getImprintLink());
        linkLayout.addMember(getSeparator());
        linkLayout.addMember(getCopyrightLink());
        rightLayout.addMember(linkLayout);
        
        if (ClientUtils.isSesEnabled()) {
        	rightLayout.addMember(createLoginInfo());
        }
        
        addMember(rightLayout);
    }
 
Example 12
Source File: Impressum.java    From SensorWebClient with GNU General Public License v2.0 5 votes vote down vote up
public Impressum() {
	setTitle(IMPRESSUM_TITLE);
       setWidth(500);
       setHeight(500);
       centerInPage();
       setIsModal(true);
       Layout layout = new VLayout();
       HTMLPane htmlContentPane = new HTMLPane();
       htmlContentPane.setContentsURL(CONTENT_PATH);
       layout.addMember(htmlContentPane);
       addItem(layout);
}
 
Example 13
Source File: SearchIndexingPanel.java    From document-management-software with GNU Lesser General Public License v3.0 4 votes vote down vote up
private Tab fillLanguagesTab() {
	Tab languagesTab = new Tab(I18N.message("languages"));
	Layout languagesTabPanel = new HLayout();
	languagesTabPanel.setWidth100();
	languagesTabPanel.setHeight100();

	ListGridField enabled = new ListGridField("eenabled", " ", 24);
	enabled.setType(ListGridFieldType.IMAGE);
	enabled.setCanSort(false);
	enabled.setAlign(Alignment.CENTER);
	enabled.setShowDefaultContextMenu(false);
	enabled.setImageURLPrefix(Util.imagePrefix());
	enabled.setImageURLSuffix(".gif");
	enabled.setCanFilter(false);

	ListGridField code = new ListGridField("code", I18N.message("code"), 80);
	code.setCanEdit(false);

	ListGridField name = new ListGridField("name", I18N.message("name"));
	name.setCanEdit(false);

	langsList = new ListGrid();
	langsList.setCanEdit(false);
	langsList.setWidth100();
	langsList.setHeight100();
	langsList.setAutoFetchData(true);
	langsList.setDataSource(new LanguagesDS(false));
	langsList.setShowFilterEditor(true);
	langsList.setFilterOnKeypress(true);
	langsList.setSelectionType(SelectionStyle.SINGLE);
	langsList.setFields(enabled, code, name);

	languagesTabPanel.addMember(langsList);
	languagesTab.setPane(languagesTabPanel);

	if (Feature.enabled(Feature.INDEX_LANGUAGES))
		langsList.addCellContextClickHandler(new CellContextClickHandler() {
			@Override
			public void onCellContextClick(CellContextClickEvent event) {
				showLanguagesMenu();
				event.cancel();
			}
		});

	return languagesTab;
}