1
package org.herac.tuxguitar.community.browser;
3
import java.util.ArrayList;
6
import org.herac.tuxguitar.gui.tools.browser.TGBrowserException;
7
import org.herac.tuxguitar.gui.tools.browser.base.TGBrowser;
8
import org.herac.tuxguitar.gui.tools.browser.base.TGBrowserElement;
10
public class TGBrowserImpl extends TGBrowser {
12
private TGBrowserConnection connection;
13
private TGBrowserElementImpl element;
15
public TGBrowserImpl(TGBrowserDataImpl data){
17
this.connection = new TGBrowserConnection();
20
public void open() throws TGBrowserException {
21
// TODO Auto-generated method stub
24
public void close() throws TGBrowserException {
25
// TODO Auto-generated method stub
28
public void cdRoot() throws TGBrowserException {
32
public void cdUp() throws TGBrowserException {
33
if( this.element != null ){
34
this.element = this.element.getParent();
38
public void cdElement(TGBrowserElement element) throws TGBrowserException {
39
if( element instanceof TGBrowserElementImpl ){
40
TGBrowserElementImpl nextElement = (TGBrowserElementImpl)element;
41
nextElement.setParent( this.element );
42
this.element = nextElement;
46
public List listElements() throws TGBrowserException {
47
List elements = new ArrayList();
48
this.connection.getElements(elements , this.element );