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

The following examples show how to use com.smartgwt.client.widgets.layout.Layout#setStyleName() . 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: DataControlsTimeSeries.java    From SensorWebClient with GNU General Public License v2.0 6 votes vote down vote up
private Canvas createAutoScaleButton() {
	Layout layout = new Layout();
	layout.setStyleName("n52_sensorweb_client_scaleButtonLayout");
	autoScaleButton = new Label(i18n.resetScale());
	autoScaleButton.setStyleName("n52_sensorweb_client_scaleButton");
    autoScaleButton.addClickHandler(new ClickHandler() {
        public void onClick(ClickEvent event) {
            EventBus.getMainEventBus().fireEvent(new SwitchAutoscaleEvent(true), new EventCallback() {
                public void onEventFired() {
                    EventBus.getMainEventBus().fireEvent(new RequestDataEvent());
                }
            });
        }
    });
    autoScaleButton.setWidth(80);
    autoScaleButton.setWrap(false);
    return autoScaleButton;
}
 
Example 2
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 3
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 4
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 5
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 6
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 7
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);
    }