Package solysombra.client.views

Source Code of solysombra.client.views.ViewVolver

package solysombra.client.views;

import java.util.HashMap;

import solysombra.client.SolYSombra;

import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.HorizontalPanel;
import com.google.gwt.user.client.ui.Hyperlink;
import com.google.gwt.user.client.ui.Image;
import com.google.gwt.user.client.ui.PushButton;
import com.google.gwt.user.client.ui.VerticalPanel;

public class ViewVolver extends Composite {

  private final HorizontalPanel mainPanel;

  public ViewVolver(HashMap<String, Integer> params) {

    final HashMap<String, Integer> params2 = params;
   
    mainPanel = new HorizontalPanel();
    initWidget(mainPanel);
   
    mainPanel.getElement().addClassName("panelVolver");
   
    Image image = new Image("images/volver.png");
    image.getElement().addClassName("imageVolver");
   
    PushButton button = new PushButton(image);
    button.getElement().addClassName("botonVolver");
   
    button.addClickHandler(new ClickHandler() {
     
      @Override
      public void onClick(ClickEvent event) {
        SolYSombra.go("principal", params2);
      }
    });
   
    //Creamos los paneles del label y de los links
    HorizontalPanel labelPanel = new HorizontalPanel();
    labelPanel.getElement().addClassName("labelPanel");
    HorizontalPanel linksPanel = new HorizontalPanel();
    linksPanel.getElement().addClassName("linksPanel");

    //Creamos el label y los links
//    Label label = new Label("Mi ruta solar");
    Image label = new Image("images/rutaSolar.png");
    label.getElement().addClassName("labelMiRutaSolar");
    Hyperlink huellaSolar = new Hyperlink("Huella Solar","http://www.huellasolar.com/");
    huellaSolar.getElement().addClassName("huellaSolar");
    Hyperlink google = new Hyperlink("GooleMaps", "http://google.com");
    google.getElement().addClassName("google");
    Hyperlink weather = new Hyperlink("The weather channel","http://www.weather.com/");
    weather.getElement().addClassName("weatherCannel");
   
   
    labelPanel.add(label);
    linksPanel.add(huellaSolar);
    linksPanel.add(google);
    linksPanel.add(weather);
   
    VerticalPanel rutaSolarPanel = new VerticalPanel();
    rutaSolarPanel.getElement().addClassName("rutaSolarPanel");
   
    rutaSolarPanel.add(labelPanel);
    rutaSolarPanel.add(linksPanel);
   
    mainPanel.add(button);
    mainPanel.add(rutaSolarPanel);
  }
 
}
TOP

Related Classes of solysombra.client.views.ViewVolver

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.