co.fxl.gui.gwt.GWTWebsite.java Source code

Java tutorial

Introduction

Here is the source code for co.fxl.gui.gwt.GWTWebsite.java

Source

/**
 * Copyright (c) 2010-2015 Dangelmayr IT GmbH. All rights reserved.
 *  
 * This file is part of FXL GUI API.
 *  
 * FXL GUI API is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *  
 * FXL GUI API is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *  
 * You should have received a copy of the GNU General Public License
 * along with FXL GUI API.  If not, see <http://www.gnu.org/licenses/>.
 */
package co.fxl.gui.gwt;

import co.fxl.gui.api.IWebsite;

import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.Window;

class GWTWebsite implements IWebsite {

    private static final String PARAMS = "";// "menubar=yes,location=yes,resizable=yes,scrollbars=yes,status=yes";
    private String title = "";

    @Override
    public IWebsite title(String title) {
        this.title = title;
        return this;
    }

    @Override
    public IWebsite uRI(String uRI) {
        Window.open(uRI, title, PARAMS);
        return this;
    }

    @Override
    public IWebsite localURI(String uRI) {
        return uRI(GWT.getModuleBaseURL() + uRI);
    }
}