1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78
|
public TextBox repo;
public Button afficheRepo;
public Tree arborescence;
public void onModuleLoad() {
VerticalPanel layoutPrinc=new VerticalPanel();
/*****************************************/
/** PARTIE HAUTE **/
/*****************************************/
FlowPanel panHaut=new FlowPanel();
HTML HTMLPubRepo=new HTML("Public repository: ");
panHaut.add(HTMLPubRepo);
repo=new TextBox();
repo.addKeyUpHandler(new KeyUpHandler() {
public void onKeyUp(KeyUpEvent event) {
if(event.getNativeKeyCode()==KeyCodes.KEY_ENTER){
//TODO declencher un clic sur le bouton afficheRepo
}
}
});
repo.setPixelSize(500, 25);
panHaut.add(repo);
afficheRepo=new Button("Affiche repository");
afficheRepo.addClickHandler(new GestionClick(this));
panHaut.add(afficheRepo);
layoutPrinc.add(panHaut);
/*****************************************/
/** PARTIE GAUCHE **/
/*****************************************/
SplitLayoutPanel gaucheCentre=new SplitLayoutPanel();
TreeItem root = new TreeItem("root");
for(int i=0;i<100;i++)
root.addItem("item"+i);
arborescence=new Tree();
arborescence.addItem(root);
ScrollPanel scroll=new ScrollPanel();
scroll.add(arborescence);
gaucheCentre.addWest(scroll, 128);
/*****************************************/
/** PARTIE CENTRALE **/
/*****************************************/
gaucheCentre.add(new Label("bblavbsdujfhnds"));
layoutPrinc.add(gaucheCentre);
/*****************************************/
/** **/
/*****************************************/
RootLayoutPanel rp = RootLayoutPanel.get();
rp.add(layoutPrinc);
//RootPanel.get("divMain").add(layoutPrinc);
} |