hi

iam new to GWT-Ext   iam developing  gwt-ext application

creating Basic Border Layout  application  with  3 panels
1.northpanel
2.westpanel
3.centerpanel

i am adding  labels to west panel , i want application when i click on
the westpanel labels
corresponding responses will be showed in centeral panel.

my program

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package org.yournamehere.client;
import org.yournamehere.client.MainEntryPoint;
import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.user.client.ui.ClickListener;
import com.google.gwt.user.client.ui.Frame;
import com.google.gwt.user.client.ui.HorizontalPanel;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.RootPanel;
import com.google.gwt.user.client.ui.Widget;
import com.gwtext.client.core.EventObject;
import com.gwtext.client.core.Margins;
import com.gwtext.client.core.RegionPosition;
import com.gwtext.client.widgets.Button;
import com.gwtext.client.widgets.MessageBox;
import com.gwtext.client.widgets.PaddedPanel;
import com.gwtext.client.widgets.Panel;
import com.gwtext.client.widgets.TabPanel;
import com.gwtext.client.widgets.Viewport;
import com.gwtext.client.widgets.Window;
import com.gwtext.client.widgets.event.ButtonListenerAdapter;
import com.gwtext.client.widgets.event.PanelListenerAdapter;
import com.gwtext.client.widgets.layout.AccordionLayout;
import com.gwtext.client.widgets.layout.BorderLayout;
import com.gwtext.client.widgets.layout.BorderLayoutData;
import com.gwtext.client.widgets.layout.FitLayout;
import com.gwtext.client.widgets.layout.VerticalLayout;

/**
 *
 * @author prasad
 */
public class BasicBorderLayout implements EntryPoint {
    public Panel centerPanel;
     public Panel panel;
    public  void onModuleLoad(){

          final Panel panel = new Panel();
         panel.setBorder(false);
         panel.setPaddings(15);
         panel.setLayout(new FitLayout());

         final Panel borderPanel = new Panel();
         borderPanel.setLayout(new BorderLayout());

         //add north panel
         Panel northPanel = new Panel();
         northPanel.setHtml("<p>north panel</p>");
         northPanel.setHeight(32);
         northPanel.setBodyStyle("background-color:EEEEEE");
         borderPanel.add(northPanel, new BorderLayoutData
(RegionPosition.NORTH));

         //add south panel


         //add east panel


         final Panel westPanel = new Panel();

         westPanel.setHtml("<p>west panel</p>");
         westPanel.setTitle("West");
         westPanel.setBodyStyle("background-color:EEEEEE");
         westPanel.setCollapsible(true);
         westPanel.setWidth(200);
      // westPanel.addListener(new PanelListenerAdapter(){
      //     public void onActivate(Panel panel) {
      //        MessageBox.alert("panel is clicked");
      //    }
     //  });
        // creating modules and adding  them to west panel
        // master setup module
        final Panel masterSetup = new Panel();
        //masterSetup.setHtml(getShortBogusMarkup());
        masterSetup.setTitle("Masters");
        masterSetup.setBodyStyle("background-color:EEEEEE");
        masterSetup.setCollapsible(true);
        masterSetup.setWidth(200);
        masterSetup.setAutoScroll(true);
        masterSetup.collapse();
        masterSetup.setBorder(true);
        masterSetup.setIconCls("folder-icon");

      // labs label listener
     Label labs= new Label("Labs");




     labs.addClickListener(new ClickListener() {

            public void onClick(Widget arg0) {
              // String str= display();
            // MessageBox.alert(str);
              MainEntryPoint obj =new MainEntryPoint();
              Panel mainpanel= obj.getDisplayPanel();

              centerPanel.add(new Label("centeral Leabel"));
              centerPanel.add(mainpanel);
              centerPanel.show();
              centerPanel.setVisible(true);
              borderPanel.add(centerPanel, new BorderLayoutData
(RegionPosition.CENTER));
              panel.add(borderPanel);


            RootPanel.get().add(panel);




            }


        });
        masterSetup.add(labs);
      //Unit   panel

        // labs label listener
     Label units= new Label("Units");
     units.addClickListener(new ClickListener() {

            public void onClick(Widget arg0) {
               MessageBox.alert("Units is clicked");
               centerPanel.setVisible(true);
            }
        });
        masterSetup.add(units);

        // Container label listener
     Label container= new Label("Container");
     container.addClickListener(new ClickListener() {

            public void onClick(Widget arg0) {
               MessageBox.alert("Container is clicked");
                centerPanel.setVisible(true);
            }
        });
        masterSetup.add(container);

     // Container label listener
     Label specimen= new Label("Specimen");
     specimen.addClickListener(new ClickListener() {

            public void onClick(Widget arg0) {
               MessageBox.alert("Specimen is clicked");
               centerPanel.setVisible(true);
            }
        });
        masterSetup.add(specimen);

         // Methods label listener
     Label methods= new Label("Methods");
     methods.addClickListener(new ClickListener() {

            public void onClick(Widget arg0) {
               MessageBox.alert("Methods is clicked");
               centerPanel.setVisible(true);
            }
        });
        masterSetup.add(methods);

       //Equipments panel
     Label equipments= new Label("Equipments");
    equipments.addClickListener(new ClickListener() {

            public void onClick(Widget arg0) {
               MessageBox.alert("Equipments is clicked");
               centerPanel.setVisible(true);
               centerPanel.show();
            }
        });
       masterSetup.add(equipments);
       // Kits panel

     Label  kits= new Label("Kits");
    equipments.addClickListener(new ClickListener() {

            public void onClick(Widget arg0) {
               MessageBox.alert("Kits is clicked");
               centerPanel.setVisible(true);
            }
        });
       masterSetup.add(kits);
       //Reagents panel
    Label  reagents= new Label("Reagents");
    reagents.addClickListener(new ClickListener() {

            public void onClick(Widget arg0) {
               MessageBox.alert("Reagents is clicked");
                centerPanel.setVisible(true);
            }
        });
       masterSetup.add(reagents);
       // Panels panel
      Label  panels= new Label("Panels");
     panels.addClickListener(new ClickListener() {

            public void onClick(Widget arg0) {
               MessageBox.alert("Panels is clicked");
               centerPanel.setVisible(true);
            }
        });
       masterSetup.add(panels);
       //Profiles panel
     Label  profiles= new Label("Profiles");
    profiles.addClickListener(new ClickListener() {

            public void onClick(Widget arg0) {
               MessageBox.alert("Profiles is clicked");
               centerPanel.setVisible(true);
            }
        });
       masterSetup.add(profiles);
       //Reflex panels
    Label  reflex= new Label("Reflex");
    reflex.addClickListener(new ClickListener() {

            public void onClick(Widget arg0) {
               MessageBox.alert("Reflex is clicked");
               centerPanel.setVisible(true);
            }
        });
       masterSetup.add(reflex);
       // Profile Test Link panel
    Label  profileTestLink= new Label("Profile Test Link");
    profileTestLink.addClickListener(new ClickListener() {

            public void onClick(Widget arg0) {
               MessageBox.alert("Profile Test Link");
               centerPanel.setVisible(true);
            }
        });
       masterSetup.add(profileTestLink);
       //Panel Test Link panel
    Label  panelTestLink= new Label("Panel Test Link");
    panelTestLink.addClickListener(new ClickListener() {

            public void onClick(Widget arg0) {
               MessageBox.alert("Panel Test Link");
               centerPanel.setVisible(true);
            }
        });
       masterSetup.add(panelTestLink);
        //Reflex Test Link
      Label  reflexTestLink= new Label("Reflex Test Link");
      reflexTestLink.addClickListener(new ClickListener() {

            public void onClick(Widget arg0) {
               MessageBox.alert("Reflex Test Link is clicked");
               centerPanel.setVisible(true);
            }
        });
       masterSetup.add(reflexTestLink);

       // Doctors Test Link panel
       Label  doctorsTestLink= new Label("Doctors Test Link");
       doctorsTestLink.addClickListener(new ClickListener() {

            public void onClick(Widget arg0) {
               MessageBox.alert("Doctors Test Link is clicked");
               centerPanel.setVisible(true);
            }
        });
       masterSetup.add(doctorsTestLink);
       // Test Link panel

       Label  testLinkpanel= new Label("Test Link panel");
        testLinkpanel.addClickListener(new ClickListener() {

            public void onClick(Widget arg0) {
               MessageBox.alert("Test Link panel is clicked");
               centerPanel.setVisible(true);
            }
        });
       masterSetup.add(testLinkpanel);


        masterSetup.addListener(new PanelListenerAdapter(){
           public void onActivate(Panel panel) {
            //  MessageBox.alert("panel is clicked");
          }
           public void onExpand(Panel panel) {

               // MessageBox.alert("panel is expanded");
                masterSetup.expand(true);
           }
           public boolean doBeforeClose(Panel panel) {
              // MessageBox.alert("doBeforeClose");
               return true;
             }

       });
       westPanel.add(masterSetup);






         // Transactions module panel
        Panel transactions = new Panel();
       // laboratory.setHtml(getShortBogusMarkup());
        transactions.setTitle("Transactions");
        transactions.setBodyStyle("background-color:EEEEEE");
        transactions.setCollapsible(true);
        transactions.setWidth(200);
        transactions.setAutoScroll(true);
        transactions.setBorder(false);
        transactions.setIconCls("folder-icon");


       // Order Booking
       Label  orderBooking= new Label("Order Booking");
        orderBooking.addClickListener(new ClickListener() {

            public void onClick(Widget arg0) {
               MessageBox.alert("label is clicked");
            }
        });
       transactions.add( orderBooking);


       //Sample Collections
       Label  sampleCollections= new Label("Sample Collections");
        sampleCollections.addClickListener(new ClickListener() {

            public void onClick(Widget arg0) {
               MessageBox.alert("label is clicked");
            }
        });
       transactions.add( sampleCollections);
       // Sample Recieve
        Label  sampleRecieve= new Label("Sample Recieve");
         sampleRecieve.addClickListener(new ClickListener() {

            public void onClick(Widget arg0) {
               MessageBox.alert("label is clicked");
            }
        });
       transactions.add(sampleRecieve);
       //Sample Acceptance panel
        Label  sampleAcceptancepanel= new Label("Sample Acceptance ");
         sampleAcceptancepanel.addClickListener(new ClickListener() {

            public void onClick(Widget arg0) {
               MessageBox.alert("label is clicked");
            }
        });
       transactions.add(sampleAcceptancepanel);
       //Sample Processing Preparation panel
        Label sampleProcessingPreparation= new Label("Sample
Processing Preparation");
          sampleProcessingPreparation.addClickListener(new
ClickListener() {

            public void onClick(Widget arg0) {
               MessageBox.alert("label is clicked");
            }
        });
       transactions.add(sampleProcessingPreparation);
       //Reporting Of Result panel
       Label reportingOfResult= new Label("Reporting Of Result");
         reportingOfResult.addClickListener(new ClickListener() {

            public void onClick(Widget arg0) {
               MessageBox.alert("label is clicked");
            }
        });
       transactions.add(reportingOfResult);
       // Verification Of Result panel
        Label verificationOfResult= new Label("Verification Of
Result");
          verificationOfResult.addClickListener(new ClickListener() {

            public void onClick(Widget arg0) {
               MessageBox.alert("label is clicked");
            }
        });
       transactions.add( verificationOfResult);
       // Dispatch Panel
       Label dispatch= new Label("Dispatch");
          dispatch.addClickListener(new ClickListener() {

            public void onClick(Widget arg0) {
               MessageBox.alert("label is clicked");
            }
        });
       transactions.add(dispatch);

        westPanel.add(transactions);

         // Reports module panel
        Panel reports = new Panel();
       // radiology.setHtml(getShortBogusMarkup());
        reports.setTitle("Reports");
        reports.setBodyStyle("background-color:EEEEEE");
        reports.setCollapsible(true);
        reports.setWidth(200);
        reports.setAutoScroll(true);
        reports.setBorder(false);
        reports.setIconCls("folder-icon");
        westPanel.add(reports);


         // changePassword module panel
        Panel changePassword = new Panel();
       // pharamacy.setHtml(getShortBogusMarkup());
        changePassword.setTitle("ChangePassword");
        changePassword.setBodyStyle("background-color:EEEEEE");
        changePassword.setWidth(200);
        changePassword.setBorder(false);
        changePassword.setIconCls("folder-icon");
        westPanel.add(changePassword);

         Panel logout = new Panel();
        //logout.setHtml(getShortBogusMarkup());
        logout.setTitle("Logout");
        logout.setBodyStyle("background-color:EEEEEE");
        logout.setCollapsible(true);
        logout.setWidth(200);
        logout.setAutoScroll(true);
        logout.setBorder(false);
        logout.setIconCls("folder-icon");
        westPanel.add(logout);
        BorderLayoutData westData = new BorderLayoutData
(RegionPosition.WEST);
        westData.setSplit(true);
        westData.setMinSize(175);
        westData.setMaxSize(400);
        borderPanel.add(westPanel, westData);


        centerPanel = new Panel();


        centerPanel.setVisible(true);
        centerPanel.setHtml("<p>center panel</p>");
        centerPanel.setBodyStyle("background-color:C3D9FF");
       // Frame frame = new Frame("http://www.google.com/";);
       // frame.setWidth("100%");
      //  frame.setHeight("450px");
      //  centerPanel.add(frame);


         borderPanel.add(centerPanel, new BorderLayoutData
(RegionPosition.CENTER));

         panel.add(borderPanel);


           // RootPanel.get("demo").add(frame);

         Viewport viewport = new Viewport(panel);
    }





      private static String getShortBogusMarkup() {
        return "<p>Lorem ipsum dolor sit amet, consectetuer adipiscing
elit. " +
                 "Sed metus nibh, sodales a, porta at, vulputate eget,
dui.  " +
                 "In pellentesque nisl non sem. Suspendisse nunc sem,
pretium eget, " +
                 "cursus a, fringilla vel, urna.";
    }
       private String display() {
              String str=" diplay method";
              return str;
            }

}

please help me
or suggest any examples  site

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"GWT-Ext Developer Forum" 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/gwt-ext?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to