Fechar SectionStackSection ao abrir outro SectionStackSection

16 views
Skip to first unread message

Robinho de Morais

unread,
Nov 18, 2012, 5:08:18 PM11/18/12
to gwt-b...@googlegroups.com


Eu criei um SectionStack e 2 SectionStackSection, então eu queria que ao clicar no SectionStackSection  (skTelas) fechasse o SectionStackSection  (skTelas) e quando clicar no  SectionStackSection  (skTelas) fechasse o SectionStackSection  (skTelas), como posso fazer isso ?

abaixo o meu ssGeral...


//Sessão Geral--------------------------------------------------------------------
        final SectionStack ssGeral = new SectionStack();  
        ssGeral.setWidth("100%");       
        ssGeral.setShowResizeBar(true);  
        ssGeral.setVisibilityMode(VisibilityMode.MULTIPLE); 
        ssGeral.setOverflow(Overflow.HIDDEN);
        ssGeral.setAnimateSections(true); 
        
        
        //Sessão Atalhos------------------------------------------------------------------
        final SectionStackSection skAtalhos = new SectionStackSection("Menu");  
        skAtalhos.setExpanded(true);  
        //suppliesCategorySection.setItems(categoryTree); 
        //skMan.addItem(bt1);    
        skAtalhos.setResizeable(true);
        
       
        //------------------------------------------------------------------Sessão Atalhos

        //Sessão Telas--------------------------------------------------------------------
        final SectionStackSection skTelas = new SectionStackSection("Telas");  
        skTelas.setExpanded(false);
        //--------------------------------------------------------------------Sessão Telas        
  
        ssGeral.setSections(skAtalhos, skTelas); 
        //--------------------------------------------------------------------Sessão Geral     

Robinho de Morais

unread,
Nov 19, 2012, 10:15:36 AM11/19/12
to gwt-b...@googlegroups.com
pessoal, ainda não consegui resolver esse tópico, alguem poderia me auxiliar ?

Vitor Hugo Lourençon

unread,
Nov 28, 2012, 3:57:38 PM11/28/12
to gwt-b...@googlegroups.com
nao intendi sua pergunta! 
[]'s

Vitor Hugo Lourençon

unread,
Nov 28, 2012, 3:58:23 PM11/28/12
to gwt-b...@googlegroups.com
poderia reformular ela ? 

Robinho de Morais

unread,
Nov 29, 2012, 5:34:46 AM11/29/12
to gwt-b...@googlegroups.com
Então....eu tenho um SectionStack com duas SectionStackSection,  skAtalhos e  skTelas.

Ai quando eu clicar no skAtalhos, queria que a skTelas fechasse, (não fechar exatamente) ela se recolher....

entendeu ?

Em quarta-feira, 28 de novembro de 2012 18h58min23s UTC-2, Vitor Hugo Lourençon escreveu:
poderia reformular ela ? 

Paulo Vitor Faria Fortes Rezende

unread,
Nov 29, 2012, 6:16:54 AM11/29/12
to gwt-b...@googlegroups.com
Robinho, bom dia!

Veja se isso funciona:

SectionStack sectionStack = new SectionStack();
sectionStack.setVisibilityMode(VisibilityMode.MULTIPLE);
sectionStack.setWidth100();
sectionStack.setHeight100();

SectionStackSection parametrosSection = new SectionStackSection("Parâmetros Dashboard");
parametrosSection.setExpanded(true);
parametrosSection.addItem(formDashboard);
parametrosSection.addItem(getButtons());
sectionStack.addSection(parametrosSection);

SectionStackSection dashboardSection = new SectionStackSection("Dashboards");
dashboardSection.setExpanded(true);
dashboardSection.setCanCollapse(false);
dashboardSection.addItem(portalDashboards);
sectionStack.addSection(dashboardSection);


--
Paulo Vitor Faria Fortes Rezende
Linkedin
Skype: paulovffr
Website: http://promovepaulo.appspot.com
(11) 6368-5988 / (12) 3953-4665



--
Você está recebendo esta mensagem porque se inscreveu no grupo "GWT Google Web Toolkit Brasil" dos Grupos do Google.
Para ver esta discussão na web, acesse https://groups.google.com/d/msg/gwt-brasil/-/fiZiyDvJLnAJ.
Para postar neste grupo, envie um e-mail para gwt-b...@googlegroups.com.
Para cancelar a inscrição nesse grupo, envie um e-mail para gwt-brasil+...@googlegroups.com.
Para obter mais opções, visite esse grupo em http://groups.google.com/group/gwt-brasil?hl=pt-BR.

Robinho de Morais

unread,
Nov 29, 2012, 11:38:19 AM11/29/12
to gwt-b...@googlegroups.com
desse jeito eles ja vem todos abertos, (expandidos), mas eu quero assim, quando eu clicar no skAtalhos que vai estar com o metodo setExpanded(false), ele vai abrir...e ai queria que no clique desse para abrir ele fechasse o setExpanded(false) do skTelas.

Vitor Hugo Lourençon

unread,
Nov 30, 2012, 6:58:28 AM11/30/12
to gwt-b...@googlegroups.com
Olá Robininho, voce pode fazer isso através do SectionStack ssgeral, através do comando: 

ssGeral.addSectionHeaderClickHandler(new SectionHeaderClickHandler() {

   @Override
   public void onSectionHeaderClick(SectionHeaderClickEvent event) {
System.out.println(event.getSection().getTitle());
if (event.getSection().getTitle().equals("Menu")) {
    skTelas.setExpanded(false);

} else if (event.getSection().getTitle().equals("Telas")) {
    skAtalhos.setExpanded(false);

}

   }
});



Robinho de Morais

unread,
Nov 30, 2012, 7:10:30 AM11/30/12
to gwt-b...@googlegroups.com
Hum...tinha que ser pelo SectinStack então.....

Obrigado pela ajuda Vitor Hugo.....

valew.
Reply all
Reply to author
Forward
0 new messages