Commits

Alireza Savand committed 1c6a41c

import ListView to the main application
also lazy initializations used ;)

  • Participants
  • Parent commits 354e30d

Comments (0)

Files changed (1)

src/com/example/advanceaddressbook/AdvanceAddressBookApplication.java

 package com.example.advanceaddressbook;
 
+import com.example.advanceaddressbook.ui.ListView;
 import com.example.advanceaddressbook.ui.NavigationTree;
 import com.vaadin.Application;
 import com.vaadin.ui.*;
 	private Button help = new Button("Help");
 	private HorizontalSplitPanel horizontalSplit = new HorizontalSplitPanel();
 	private NavigationTree tree = new NavigationTree();
+	private ListView listView = null;
 	
 	@Override
 	public void init() {
 		buildMainLayout();
 		setTheme("runo");
+		setMainComponent(getListView());
 	}
 	
 	private void buildMainLayout() {
 		
 		return lo;
 	}
+	
+	private void setMainComponent(Component c) {
+		horizontalSplit.setSecondComponent(c);
+	}
+	
+	private ListView getListView() {
+		if (listView == null) {
+			listView = new ListView();
+		}
+		return listView;
+	}
 
 }