Package org.vaadin.gwtgraphics.client.shape

Examples of org.vaadin.gwtgraphics.client.shape.Text


      ScreenContainer container = mapPresenter.addScreenContainer();
      rectangle = new Rectangle(60, 40, 200, 80);
      rectangle.setFillColor("#CC9900");
      rectangle.setFillOpacity(0.4);

      text = new Text(70, 60, "Drag me...");
      text.setFontFamily("Arial");
      text.setFontSize(16);
      text.setStrokeOpacity(0);
      text.setFillColor("#000000");
      container.add(text);
View Full Code Here


    Button textBtn = new Button("Draw text");
    textBtn.setWidth("200");
    textBtn.addClickHandler(new ClickHandler() {

      public void onClick(ClickEvent event) {
        Text text = new Text(70, 60, "Hello World");
        text.setFontFamily("Arial");
        text.setFontSize(16);
        text.setStrokeOpacity(0);
        text.setFillColor("#000000");
        container.add(text);
      }
    });
    leftLayout.add(textBtn);
View Full Code Here

    distanceMarker.lineRelativelyTo(92, 0);
    distanceMarker.lineRelativelyTo(0, -14);
    distanceMarker.setFillOpacity(0);
    container.add(distanceMarker);

    distance = new Text(8, viewPort.getMapHeight() - 8, "");
    distance.setFontSize(12);
    distance.setStrokeOpacity(0);
    distance.setFillColor("#000000");
    container.add(distance);
View Full Code Here

      // path[1].setStrokeColor("blue");
      // path[2].setStrokeColor("blue");
      // path[3].setStrokeColor("blue");
      // path[4].setStrokeColor("indigo");
    }
    Text t1 = new Text(c2.getX() - 50, c2.getY(), "Created by");
    Text t2 = new Text(c3.getX() - 50, c3.getY(), "Kefu Zhou");
    Text c3Text = new Text(c3.getX(), c2.getY() + 20, "3");
    Text c2Text = new Text(c2.getX(), c3.getY() + 20, "2");
    Text c1Text = new Text(c1.getX(), c1.getY() + 20, "1");
    gwtCanvas.add(t1);
    gwtCanvas.add(t2);

    gwtCanvas.add(c1Text);
    gwtCanvas.add(c2Text);
View Full Code Here

    //Window.alert(String.valueOf(inicioreal));
   
    lista_dia = (Date)inicioreal.clone();
   
    Rectangle base;
    Text txt;
    Text txtmes;
    int dia_tipo = 0;
    String color = "teal";
    int dia_diciembre = 0;
   
    int fin = contarDias(inicioreal, finreal);
    //int fin2 = calendario.getDaysBetween(inicioreal, finreal);
    if(fin<0){
      finreal.setYear(finreal.getYear()+1);
      fin = contarDias(inicioreal, finreal);
    }
   
    //Window.alert("inicio " + String.valueOf(inicioreal));
    //Window.alert("fin " + String.valueOf(finreal));
    //Window.alert("Dias totales " + String.valueOf(fin));
    //Window.alert("Dias totales 2 " + String.valueOf(fin2));
   
    canvas.setWidth((fin*20)+20);
   
    //for(int i=0; i<100; i++){
    for(int i=0; i<=fin; i++){
      
       if(lista_dia.getDate()==1 || (i==0 && lista_dia.getDate() <=24)){
         txtmes = new Text((i*20)+5,31+margen,darMes(lista_dia.getMonth())+ " 20" + String.valueOf(lista_dia.getYear()-100));
         txtmes.setFontSize(14);
         canvas.add(txtmes);
       }
      
       dia_tipo = lista_dia.getDay();
       if(dia_tipo == 0 || dia_tipo == 6){
         color = "#6c84ed";
         base = new Rectangle(i*20,53+margen,18,350);
         base.setFillOpacity(0.2);
         base.setStrokeOpacity(0.3);
         base.setStrokeColor(color);
         base.setFillColor(color);
         canvas.add(base);
       }
       else{
         color = "teal";
       }
      
       if(contarDias(lista_dia, hoy)==0){
         base = new Rectangle(i*20,53+margen,18,350);
         base.setFillOpacity(0.3);
         base.setStrokeOpacity(0.3);
         base.setStrokeColor("#facc2e");
         base.setFillColor("#facc2e");
         canvas.add(base);
       }
      
       base = new Rectangle(i*20,34+margen,18,18);
       base.setFillOpacity(0.0);
       base.setStrokeOpacity(0.5);
       base.setStrokeColor(color);
       canvas.add(base);
      
       String dia = String.valueOf(lista_dia.getDate());
       if(dia.length()==1)
         dia = "0"+dia;
       txt = new Text((i*20)+2,50+margen,dia);
       txt.setFontSize(14);
       canvas.add(txt);
        
       /*if(lista_dia.getMonth()==11 && lista_dia.getDate()==31){
         Window.alert("fecha final " + String.valueOf(lista_dia));
View Full Code Here

TOP

Related Classes of org.vaadin.gwtgraphics.client.shape.Text

Copyright © 2018 www.massapicom. 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.