/*
 * Copyright 2011 JBoss Inc
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *       http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.drools.guvnor.client.decisiontable.widget;

import org.drools.guvnor.client.messages.Constants;

import com.google.gwt.core.client.GWT;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.HorizontalPanel;
import com.google.gwt.user.client.ui.Panel;

/**
 * Simple container for controls to manipulate a Decision Table
 */
public class DecisionTableControlsWidget extends Composite {

    private Panel                    panel    = new HorizontalPanel();

    // Resources
    protected static final Constants messages = GWT.create( Constants.class );

    public DecisionTableControlsWidget(final AbstractDecisionTableWidget dtable) {

        // Add row button
        Button btnAddRow = new Button( messages.AddRow(),
                                       new ClickHandler() {

                                           public void onClick(ClickEvent event) {
                                               dtable.appendRow();
                                           }
                                       } );
        panel.add( btnAddRow );

        // Otherwise button
        Button btnOtherwise = new Button( "Otherwise",
                                       new ClickHandler() {

                                           public void onClick(ClickEvent event) {
                                               dtable.makeOtherwiseCell();
                                           }
                                       } );
        panel.add( btnOtherwise );

        initWidget( panel );

    }

}

@@ -1856,32 +1856,34 @@
 therwise button%0A
+//
         Button b
@@ -1921,16 +1921,18 @@
 rwise%22,%0A
+//
         
@@ -1975,33 +1975,37 @@
 lickHandler() %7B%0A
-%0A
+//%0A//
                 
@@ -2063,32 +2063,34 @@
 kEvent event) %7B%0A
+//
                 
@@ -2144,24 +2144,26 @@
 wiseCell();%0A
+//
             
@@ -2187,32 +2187,34 @@
               %7D%0A
+//
                 
@@ -2233,32 +2233,34 @@
            %7D );%0A
+//
         panel.ad

Comment out "otherwise" button until complete in local branch