Wednesday, May 2, 2012

style css and gwt



hello,

I would like to add the following html menu style http://css.mammouthland.net/menu-horizontal-en-css.php  in my menu in gwt


package com.ql.client;

import com.google.gwt.user.client.Command;

import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.user.client.Window;
//import com.google.gwt.user.client.ui.Button;
//import com.google.gwt.user.client.ui.ClickListener;
import com.google.gwt.user.client.ui.RootPanel;
//import com.google.gwt.user.client.ui.Widget;
import com.google.gwt.user.client.ui.MenuBar;
import com.google.gwt.user.client.ui.MenuItem;


public class Menu implements EntryPoint, Command  {

  public void onModuleLoad() {
    
    //création de la barre du menu 
    
    MenuBar menu = new MenuBar();
    menu.setAutoOpen(true);

    MenuBar subMenu = new MenuBar(true);
   subMenu.addItem("<code>Code</code>", true, this);
    subMenu.addItem("<strike>Strikethrough</strike>", true, this);
    subMenu.addItem("<u>Underlined</u>", true, this);

    // les fils du premier parent 
    MenuBar menu0 = new MenuBar(true);
    menu0.addItem("More &#187;", true, subMenu);
    
    // les fils du 2 eme parent 
    MenuBar menu1 = new MenuBar(true);;
   menu1.addItem("<font color='#8BEE13'><b>D</b></font>", true, this);
    
    //les fils du 3 eme parent
    MenuBar menu2 = new MenuBar(true);
   
    menu2.addItem("<code>!!!</code>", true, this);
    
    //les fils du 4 eme parent
    MenuBar menu3 = new MenuBar(true);
    
    // les éléments parents du menu

    menu.addItem(new MenuItem("F", menu0));
    menu.addItem(new MenuItem("E", menu1));
    menu.addItem(new MenuItem("A", menu2));
    menu.addItem(new MenuItem("G", menu3));

    // le menu prend la totalité de la page
    menu.setWidth("100%");
 
//ajouter menu au panel root
    RootPanel.get().add(menu);
  }
  public void execute() {
    Window.alert("a menu item.");
  }  
}


thank you for help
--
 
Assiya EL
Master Qualité du Logiciel 



Plz consider environment - Only print this if necessary


--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate