package org.pentaho.ui.xul.swt.tags;

import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.ToolBar;
import org.pentaho.ui.xul.XulComponent;
import org.pentaho.ui.xul.XulDomContainer;
import org.pentaho.ui.xul.containers.XulToolbar;
import org.pentaho.ui.xul.dom.Element;
import org.pentaho.ui.xul.swt.AbstractSwtXulContainer;

public class SwtToolbar extends AbstractSwtXulContainer implements XulToolbar{

  ToolBar toolbar;
  public SwtToolbar(Element self, XulComponent parent, XulDomContainer domContainer, String tagName) {
    super("toolbar");
    
    toolbar = new ToolBar((Composite) parent.getManagedObject(), SWT.HORIZONTAL);
    setManagedObject(toolbar);
  }

  public ToolbarMode getMode() {
    // TODO Auto-generated method stub
    return null;
  }

  public String getToolbarName() {
    // TODO Auto-generated method stub
    return null;
  }

  public void setMode(ToolbarMode mode) {
    // TODO Auto-generated method stub
    
  }

  public void setToolbarName(String name) {
    // TODO Auto-generated method stub
    
  }
  
  
}

@@ -101,16 +101,54 @@
 posite;%0A
+import org.eclipse.swt.widgets.Shell;%0A
 import o
@@ -175,24 +175,24 @@
 ts.ToolBar;%0A
-
 import org.p
@@ -635,16 +635,478 @@
 );%0A    %0A
+    String attr = self.getAttributeValue(%22parenttoouter%22);%0A    Object shell = (attr != null && attr.equals(%22true%22) && domContainer.getOuterContext() != null) %0A      ? domContainer.getOuterContext() %0A      : null; %0A    if(shell != null && shell instanceof Shell)%7B%0A      toolbar = new ToolBar((Shell) shell, SWT.HORIZONTAL);%0A    %7D else if(shell != null && shell instanceof Composite)%7B%0A      toolbar = new ToolBar((Composite) shell, SWT.HORIZONTAL);%0A    %7D else %7B%0A  
     tool
@@ -1175,24 +1175,30 @@
 ORIZONTAL);%0A
+    %7D%0A
     setManag

Support for parenting toolbar to outercontext