In the WestPart class have a constructor which takes the BorderLayoutPanel
as argument and store that in a member variable. Now in the clicklistener in
westpart class, create a new CenterPart class and add the centerpart panel
to this borderlayout member variable.

I dont understand whts the big deal in this?? Or may be I am not getting ur
point.... :-(

Regards,
Litty Preeth

On Fri, Dec 5, 2008 at 5:38 PM, rajasekhar <[EMAIL PROTECTED]> wrote:

>
> These methods are in LeftContainer and CenterContainer classes.
>
> CenterContainer  class :
> public class CenterPart {
> Panel panel=new Panel();
> public Panel displayCenter(String s)
> {
>        Window.alert(s);
>        Button  button=new Button(s);
> //      Window.alert(s);
>        panel.add(button);
>
>        return panel;
> }
>
>
> LeftContainer  Class:
>
> public class WestPart {
>
>           Button west;
>
> public Panel dispalyButton(String s)
> {
>         Panel  panel=new Panel();
>         final CheckBox emailCheckBox=new CheckBox();
>         emailCheckBox.setText("");
>         emailCheckBox.setChecked(true);
>     panel.add(emailCheckBox);
>     west=new Button("West");
>         west.addClickListener(this);
>         panel.add( west);
>          Hyperlink link = new Hyperlink("WEST","WEST");
>         panel.add(link);
>         return panel;
> }
>
> The Main class :
> public class PanelRefresh extends Composite implements ClickListener {
>        Panel panel = new Panel();
>    String var="CENTER";
>        private Image loadingImg;
>    Button west1;
>    Panel centerPanel = new Panel();
>    Panel borderPanel= new Panel();
>    PanelRefreshServiceAsync panelRefreshService;
>    StackPanel stackPanel=new StackPanel();
>    Viewport viewport;
>    Panel westPanel=new Panel();
>    int count;
>    Panel southPanel = new Panel();
>    PanelRefresh view;
>    DockPanel parent = null;
>        public void dispalyLayout(String s)
>        {
>
>                   //displayWidget();
>                    stackPanel.clear();
>                panel.setBorder(false);
>                panel.setPaddings(15);
>                panel.setLayout(new FitLayout());
>                borderPanel.setLayout(new BorderLayout());
>
>                //add north panel
>                Panel northPanel = new Panel();
>                northPanel.setHtml("<p>north panel</p>");
>                northPanel.setHeight(32);
>                northPanel.setBodyStyle("background-color:#FFFF88");
>                borderPanel.add(northPanel, new BorderLayoutData
> (RegionPosition.NORTH));
>                WestPart westPart=new WestPart();
>
>                //add south panel
>                 final CheckBox emailCheckBox=new CheckBox();
>                    emailCheckBox.setText("");
>                    emailCheckBox.setChecked(true);
>                     southPanel.setHtml("<p>south panel</p>");
>                southPanel.setHeight(100);
>                southPanel.setBodyStyle("background-color:#CDEB8B");
>                southPanel.setCollapsible(true);
>                southPanel.setTitle("South");
>                southPanel.add(emailCheckBox);
>
>                BorderLayoutData southData = new BorderLayoutData
> (RegionPosition.SOUTH);
>                southData.setMinSize(100);
>                southData.setMaxSize(200);
>                southData.setMargins(new Margins(0, 0, 0, 0));
>                southData.setSplit(true);
>                borderPanel.add(southPanel, southData);
>
>                //add east panel
>                Panel eastPanel = new Panel();
>                eastPanel.setHtml("<p>east panel</p>");
>                eastPanel.setTitle("East Side");
>                eastPanel.setCollapsible(true);
>                eastPanel.setWidth(225);
>
>
>                BorderLayoutData eastData = new BorderLayoutData
> (RegionPosition.EAST);
>                eastData.setSplit(true);
>                eastData.setMinSize(175);
>                eastData.setMaxSize(400);
>                eastData.setMargins(new Margins(0, 0, 5, 0));
>
>                borderPanel.add(eastPanel, eastData);
>
>
>                westPanel.setHtml("<p>west panel</p>");
>                westPanel.setTitle("West");
>                westPanel.setBodyStyle("background-color:#EEEEEE");
>                westPanel.setCollapsible(true);
>                westPanel.setWidth(200);
>
>                 westPanel.add(westPart.dispalyButton("WEST"));
>
>
>                west1=new Button("west1");
>                west1.addClickListener(this);
>             //   westPanel.add(west1);
>
>                BorderLayoutData westData = new BorderLayoutData
> (RegionPosition.WEST);
>                westData.setSplit(true);
>
>                westData.setMinSize(175);
>                westData.setMaxSize(400);
>                westData.setMargins(new Margins(0, 5, 0, 0));
>
>                borderPanel.add(westPanel, westData);
>
>                borderPanel.add(new CenterPart().displayCenter("CENTER"),
> new
> BorderLayoutData(RegionPosition.CENTER));
>           // displayCenter(var);
>                panel.add(borderPanel);
>                viewport= new Viewport(panel);
>                        //initWidget(panel);
>
>
>        }
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to