package org.gwtbootstrap3.client.ui.impl;

/*
 * #%L
 * GwtBootstrap3
 * %%
 * Copyright (C) 2013 - 2014 GwtBootstrap3
 * %%
 * 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.
 * #L%
 */

import org.gwtbootstrap3.client.ui.SimpleRadioButton;

import com.google.gwt.event.dom.client.BlurEvent;
import com.google.gwt.event.dom.client.BlurHandler;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.event.dom.client.KeyDownEvent;
import com.google.gwt.event.dom.client.KeyDownHandler;
import com.google.gwt.event.dom.client.MouseUpEvent;
import com.google.gwt.event.dom.client.MouseUpHandler;
import com.google.gwt.event.logical.shared.ValueChangeEvent;
import com.google.gwt.user.client.ui.SimpleCheckBox;

public class SimpleRadioButtonImplIE8 extends SimpleRadioButtonImpl {
	
	private static class Handler implements ClickHandler, MouseUpHandler, BlurHandler, KeyDownHandler {

		private final SimpleCheckBox simpleRadioButton;
		private Boolean oldValue;
		
		public Handler(SimpleRadioButton simpleRadioButton) {
			this.simpleRadioButton = simpleRadioButton;
		}

		@Override
		public void onClick(ClickEvent event) {
			ValueChangeEvent.fireIfNotEqual(simpleRadioButton, oldValue,
					simpleRadioButton.getValue());
		}

		@Override
		public void onKeyDown(KeyDownEvent event) {
			oldValue = simpleRadioButton.getValue();
		}

		@Override
		public void onBlur(BlurEvent event) {
			oldValue = simpleRadioButton.getValue();
		}

		@Override
		public void onMouseUp(MouseUpEvent event) {
			oldValue = simpleRadioButton.getValue();
		}
		
	}
	
	@Override
	public void ensureDomEventHandlers(SimpleRadioButton simpleRadioButton) {
		Handler handler = new Handler(simpleRadioButton);
		simpleRadioButton.addClickHandler(handler);
		simpleRadioButton.addMouseUpHandler(handler);
		simpleRadioButton.addBlurHandler(handler);
		simpleRadioButton.addKeyDownHandler(handler);
	}
	
}

@@ -1350,19 +1350,21 @@
 nImpl %7B%0A
-%09%0A%09
+%0A    
 private 
@@ -1456,18 +1456,24 @@
 dler %7B%0A%0A
-%09%09
+        
 private 
@@ -1512,18 +1512,24 @@
 Button;%0A
-%09%09
+        
 private 
@@ -1550,13 +1550,17 @@
 ue;%0A
-%09%09%0A%09%09
+%0A        
 publ
@@ -1609,19 +1609,28 @@
 tton) %7B%0A
-%09%09%09
+            
 this.sim
@@ -1665,23 +1665,35 @@
 Button;%0A
-%09%09%7D%0A%0A%09%09
+        %7D%0A%0A        
 @Overrid
@@ -1686,34 +1686,40 @@
       @Override%0A
-%09%09
+        
 public void onCl
@@ -1742,19 +1742,28 @@
 vent) %7B%0A
-%09%09%09
+            
 ValueCha
@@ -1819,13 +1819,28 @@
 ue,%0A
-%09%09%09%09%09
+                    
 simp
@@ -1866,23 +1866,35 @@
 lue());%0A
-%09%09%7D%0A%0A%09%09
+        %7D%0A%0A        
 @Overrid
@@ -1887,34 +1887,40 @@
       @Override%0A
-%09%09
+        
 public void onKe
@@ -1939,35 +1939,44 @@
 nEvent event) %7B%0A
-%09%09%09
+            
 oldValue = simpl
@@ -1992,39 +1992,51 @@
 ton.getValue();%0A
-%09%09%7D%0A%0A%09%09
+        %7D%0A%0A        
 @Override%0A%09%09publ
@@ -2021,34 +2021,40 @@
       @Override%0A
-%09%09
+        
 public void onBl
@@ -2067,35 +2067,44 @@
 rEvent event) %7B%0A
-%09%09%09
+            
 oldValue = simpl
@@ -2132,15 +2132,27 @@
 ();%0A
-%09%09%7D%0A%0A%09%09
+        %7D%0A%0A        
 @Ove
@@ -2157,18 +2157,24 @@
 verride%0A
-%09%09
+        
 public v
@@ -2213,11 +2213,20 @@
 ) %7B%0A
-%09%09%09
+            
 oldV
@@ -2266,21 +2266,30 @@
 ();%0A
-%09%09%7D%0A%09%09%0A%09%7D%0A%09%0A%09
+        %7D%0A%0A    %7D%0A%0A    
 @Ove
@@ -2294,17 +2294,20 @@
 verride%0A
-%09
+    
 public v
@@ -2372,18 +2372,24 @@
 tton) %7B%0A
-%09%09
+        
 Handler 
@@ -2430,18 +2430,24 @@
 utton);%0A
-%09%09
+        
 simpleRa
@@ -2474,34 +2474,40 @@
 ndler(handler);%0A
-%09%09
+        
 simpleRadioButto
@@ -2528,34 +2528,40 @@
 ndler(handler);%0A
-%09%09
+        
 simpleRadioButto
@@ -2591,10 +2591,16 @@
 r);%0A
-%09%09
+        
 simp
@@ -2645,11 +2645,13 @@
 r);%0A
-%09
+    
 %7D%0A
-%09
 %0A%7D%0A

Use spaces for indentation not tabs