Hello,
i am just a beginner with GWT and i want to build an application with
a navigation panel on the left side(WEST). If you choose an item on
the navigation panel, it will be shown (CENTER) a new panel on the
right side. i think it should be the same like an email application,
or? By the way the code:
[code]
public void onModuleLoad() {
Panel panel = new Panel();
panel.setBorder(false);
panel.setPaddings(15);
panel.setLayout(new FitLayout());
Panel borderPanel = new Panel();
borderPanel.setTitle("Use of BorderLayout, AccordionLayout and
ColumnLayout");
borderPanel.setLayout(new BorderLayout());
final AccordionLayout accordion = new AccordionLayout();
accordion.setAnimate(true);
//create single Panels
Panel northPanel = new Panel();
northPanel.setTitle("WILLKOMMEN BEIM");
northPanel.add(img2);
northPanel.setHeight(130);
Panel westPanel = new Panel();
westPanel.setTitle("Men"+uuml);
westPanel.setCollapsible(true);
westPanel.setWidth(200);
westPanel.setLayout(accordion);
Panel southPanel = new Panel();
southPanel.add(img);
southPanel.setHeight(80);
-->//Single Panels for the WEST Panel (Navigation)
Panel productionPanel = new Panel();
productionPanel.setTitle("Produktion");
productionPanel.setAutoScroll(true);
productionPanel.setBorder(false);
productionPanel.setIconCls("folder-icon");
-->//Build a tree with ITEMS
Tree tree1 = new Tree();
tree1.setAnimate(true);
TreeItem fmachine = new TreeItem("Maschinen");
tree1.getRootItem().add(machine);
TreeItem ressource = new TreeItem("Rohstoffe");
tree1.getRootItem().add(ressource);
//family.addListener(eventType, listener)
productionPanel.add(tree1);
westPanel.add(productionPanel);
//New Section for WEST Panel
Panel hrPanel = new Panel();
hrPanel.setHtml(getShortBogusMarkup());
hrPanel.setTitle("Personal");
hrPanel.setAutoScroll(true);
hrPanel.setBorder(false);
hrPanel.setIconCls("settings-icon");
westPanel.add(hrPanel);
//Settings for BORDERLAYOUT
BorderLayoutData northData = new BorderLayoutData
(RegionPosition.NORTH);
northData.setSplit(false);
northData.setFloatable(false);
northData.setMargins(new Margins(10, 5, 15, 15));
borderPanel.add(northPanel,northData);
BorderLayoutData westData = new BorderLayoutData
(RegionPosition.WEST);
westData.setSplit(true);
westData.setMinSize(175);
westData.setMaxSize(400);
westData.setMargins(new Margins(15, 5, 0, 5));
westData.setCMargins(new Margins(15, 5, 5, 5));
borderPanel.add(westPanel, westData);
Panel centerPanel = new Panel();
centerPanel.setAutoScroll(true);
centerPanel.setLayout(new ColumnLayout());
centerPanel.add(new Humanresource());
BorderLayoutData centerData = new BorderLayoutData
(RegionPosition.CENTER);
centerData.setMargins(15, 0, 5, 5);
borderPanel.add(centerPanel, centerData);
BorderLayoutData southData = new BorderLayoutData
(RegionPosition.SOUTH);
southData.setMargins(5, 5, 5, 5);
borderPanel.add(southPanel,southData);
panel.add(borderPanel);
new Viewport(panel);
}
[/code]
So now i want to press on TREEITEM "machine" and on CENTER Panel
should be opened the right panel for machine. this panel is perhaps
implemented on another class or something like that.
i think I have to use the TreeListener or? Or is there an other
possiblity to solve this without TREE?
sry for my awfull english ^^
kind regards
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---