List of usage examples for com.google.gwt.user.client.ui CustomButton CustomButton
public CustomButton(String upText, String downText)
CustomButton. From source file:edu.udes.bio.genus.client.ui.menu.Menu.java
License:Open Source License
/** * Instantiates a new general menu.//w w w . j a v a 2 s . c om */ public Menu() { super(); setSize("220px", "100%"); // create the menu with a stack panel this.menu.setSize("100%", "100%");// add(this.menu); // Creating the RNA STRANDS sections final Menu_Strands strandMenu = new Menu_Strands(); this.menu.add(strandMenu, "RNA STRANDS"); // Add the STRUCTURES sub menu this.menu.add(this.structMenu, "STRUCTURES"); // Add the SEQUENCES sub menu this.menu.add(this.seqMenu, "SEQUENCES"); // Add the ALGORITHMS sub menu final Menu_Algo algoMenu = new Menu_Algo(195); this.menu.add(algoMenu, "ALGORITHMS"); // // Add the CONFIG sub menu // final Menu_Configs configMenu = new Menu_Configs(); // this.menu.add(configMenu, "CONFIGS"); // Create and setup the hide button final CustomButton btnHide = new CustomButton("<<", ">>") { @Override protected void onClick() { super.onClick(); Menu.this.menu.setVisible(isDown()); setDown(!isDown()); getParent().setSize("20px", "100%"); } }; btnHide.setSize("19px", "19px"); DOM.setStyleAttribute(btnHide.getElement(), "border", "1px solid lightgray"); DOM.setStyleAttribute(btnHide.getElement(), "backgroundColor", "#e3e8f3"); add(btnHide); }