2011-04-28 122 views
0

我們可以將具有邊框佈局的內容面板添加到具有手風琴佈局的平鋪中:我們正在試圖將我們的中心盤區和西部盤區放在一個以手風琴視圖顯示的盤區上。但無法做到這一點,因爲數據不顯示kinldy請求建議。在手風琴佈局中添加邊框佈局

問候 薩蒂什

回答

1

你說這個?

public class test extends Composite { 
    private ContentPanel accordionPanel; 
    private ContentPanel borderPanel; 
    private ContentPanel westPanel; 
    private ContentPanel centerPanel; 

    public test() { 

     accordionPanel = new ContentPanel(); 
     accordionPanel.setLayout(new AccordionLayout()); 

     borderPanel = new ContentPanel(); 
     borderPanel.setLayout(new BorderLayout()); 

     westPanel = new ContentPanel(); 
     borderPanel.add(westPanel, new BorderLayoutData(LayoutRegion.WEST)); 

     centerPanel = new ContentPanel(); 
     borderPanel.add(centerPanel, new BorderLayoutData(LayoutRegion.CENTER)); 
     accordionPanel.add(borderPanel); 
     initComponent(accordionPanel); 
    } 

}