1 package org.herac.tuxguitar.community.browser;
2 
3 import org.eclipse.swt.widgets.Shell;
4 import org.herac.tuxguitar.gui.tools.browser.base.TGBrowser;
5 import org.herac.tuxguitar.gui.tools.browser.base.TGBrowserData;
6 import org.herac.tuxguitar.gui.tools.browser.base.TGBrowserFactory;
7 
8 public class TGBrowserFactoryImpl implements TGBrowserFactory {
9 
10 	private TGBrowserDataImpl data;
11 
TGBrowserFactoryImpl()12 	public TGBrowserFactoryImpl(){
13 		this.data = new TGBrowserDataImpl();
14 	}
15 
getName()16 	public String getName() {
17 		return "Community Files";
18 	}
19 
getType()20 	public String getType() {
21 		return "community";
22 	}
23 
newTGBrowser(TGBrowserData data)24 	public TGBrowser newTGBrowser(TGBrowserData data) {
25 		return new TGBrowserImpl( (TGBrowserDataImpl)data );
26 	}
27 
parseData(String string)28 	public TGBrowserData parseData(String string) {
29 		return this.data;
30 	}
31 
dataDialog(Shell parent)32 	public TGBrowserData dataDialog(Shell parent) {
33 		TGBrowserAuthDialog authDialog = new TGBrowserAuthDialog();
34 		authDialog.open( parent );
35 		if( authDialog.isAccepted() ){
36 			return this.data;
37 		}
38 		return null;
39 	}
40 
41 }
42