]> source.dussan.org Git - vaadin-framework.git/commitdiff
Renamed VButtonState to ButtonState as it is a server side class that
authorArtur Signell <artur@vaadin.com>
Thu, 23 Feb 2012 11:34:00 +0000 (13:34 +0200)
committerArtur Signell <artur@vaadin.com>
Thu, 23 Feb 2012 11:34:00 +0000 (13:34 +0200)
happens to be in a client side package.

src/com/vaadin/terminal/gwt/client/ui/ButtonState.java [new file with mode: 0644]
src/com/vaadin/terminal/gwt/client/ui/VButtonPaintable.java
src/com/vaadin/terminal/gwt/client/ui/VButtonState.java [deleted file]
src/com/vaadin/terminal/gwt/client/ui/VNativeButtonPaintable.java
src/com/vaadin/ui/Button.java

diff --git a/src/com/vaadin/terminal/gwt/client/ui/ButtonState.java b/src/com/vaadin/terminal/gwt/client/ui/ButtonState.java
new file mode 100644 (file)
index 0000000..7786f4c
--- /dev/null
@@ -0,0 +1,65 @@
+/*
+@VaadinApache2LicenseForJavaFiles@
+ */
+
+package com.vaadin.terminal.gwt.client.ui;
+
+import com.vaadin.terminal.gwt.client.ComponentState;
+import com.vaadin.ui.Button;
+
+/**
+ * Shared state for Button and NativeButton.
+ * 
+ * @see ComponentState
+ * 
+ * @since 7.0
+ */
+public class ButtonState extends ComponentState {
+    private boolean disableOnClick = false;
+    private int clickShortcutKeyCode = 0;
+
+    /**
+     * Checks whether the button should be disabled on the client side on next
+     * click.
+     * 
+     * @return true if the button should be disabled on click
+     */
+    public boolean isDisableOnClick() {
+        return disableOnClick;
+    }
+
+    /**
+     * Sets whether the button should be disabled on the client side on next
+     * click.
+     * 
+     * @param disableOnClick
+     *            true if the button should be disabled on click
+     */
+    public void setDisableOnClick(boolean disableOnClick) {
+        this.disableOnClick = disableOnClick;
+    }
+
+    /**
+     * Returns the key code for activating the button via a keyboard shortcut.
+     * 
+     * See {@link Button#setClickShortcut(int, int...)} for more information.
+     * 
+     * @return key code or 0 for none
+     */
+    public int getClickShortcutKeyCode() {
+        return clickShortcutKeyCode;
+    }
+
+    /**
+     * Sets the key code for activating the button via a keyboard shortcut.
+     * 
+     * See {@link Button#setClickShortcut(int, int...)} for more information.
+     * 
+     * @param clickShortcutKeyCode
+     *            key code or 0 for none
+     */
+    public void setClickShortcutKeyCode(int clickShortcutKeyCode) {
+        this.clickShortcutKeyCode = clickShortcutKeyCode;
+    }
+
+}
index d191713aaf04d45bd229d300ac48c8d363c73fd1..940e115cfd133422fb4278d06ccae6cc908620a9 100644 (file)
@@ -96,12 +96,12 @@ public class VButtonPaintable extends VAbstractPaintableWidget {
     }
 
     @Override
-    public VButtonState getState() {
-        return (VButtonState) super.getState();
+    public ButtonState getState() {
+        return (ButtonState) super.getState();
     }
 
     @Override
     protected ComponentState createState() {
-        return GWT.create(VButtonState.class);
+        return GWT.create(ButtonState.class);
     }
 }
diff --git a/src/com/vaadin/terminal/gwt/client/ui/VButtonState.java b/src/com/vaadin/terminal/gwt/client/ui/VButtonState.java
deleted file mode 100644 (file)
index e452ba6..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
-@VaadinApache2LicenseForJavaFiles@
- */
-
-package com.vaadin.terminal.gwt.client.ui;
-
-import com.vaadin.terminal.gwt.client.ComponentState;
-import com.vaadin.ui.Button;
-
-/**
- * Shared state for Button and NativeButton.
- * 
- * @see ComponentState
- * 
- * @since 7.0
- */
-public class VButtonState extends ComponentState {
-    private boolean disableOnClick = false;
-    private int clickShortcutKeyCode = 0;
-
-    /**
-     * Checks whether the button should be disabled on the client side on next
-     * click.
-     * 
-     * @return true if the button should be disabled on click
-     */
-    public boolean isDisableOnClick() {
-        return disableOnClick;
-    }
-
-    /**
-     * Sets whether the button should be disabled on the client side on next
-     * click.
-     * 
-     * @param disableOnClick
-     *            true if the button should be disabled on click
-     */
-    public void setDisableOnClick(boolean disableOnClick) {
-        this.disableOnClick = disableOnClick;
-    }
-
-    /**
-     * Returns the key code for activating the button via a keyboard shortcut.
-     * 
-     * See {@link Button#setClickShortcut(int, int...)} for more information.
-     * 
-     * @return key code or 0 for none
-     */
-    public int getClickShortcutKeyCode() {
-        return clickShortcutKeyCode;
-    }
-
-    /**
-     * Sets the key code for activating the button via a keyboard shortcut.
-     * 
-     * See {@link Button#setClickShortcut(int, int...)} for more information.
-     * 
-     * @param clickShortcutKeyCode
-     *            key code or 0 for none
-     */
-    public void setClickShortcutKeyCode(int clickShortcutKeyCode) {
-        this.clickShortcutKeyCode = clickShortcutKeyCode;
-    }
-
-}
index febc76178a304e74ed47ff4cc9be6ba85d33d1fe..a2aa9695de17a4c0c38b001ccb5015bac497521a 100644 (file)
@@ -92,12 +92,12 @@ public class VNativeButtonPaintable extends VAbstractPaintableWidget {
     }
 
     @Override
-    public VButtonState getState() {
-        return (VButtonState) super.getState();
+    public ButtonState getState() {
+        return (ButtonState) super.getState();
     }
 
     @Override
     protected ComponentState createState() {
-        return GWT.create(VButtonState.class);
+        return GWT.create(ButtonState.class);
     }
 }
\ No newline at end of file
index 4ca274abf94b8ddbb95a100ee8c59c0813a5ae2c..84abcdc294a109c085ed4d171c1f139711b34246 100644 (file)
@@ -22,7 +22,7 @@ import com.vaadin.terminal.gwt.client.ComponentState;
 import com.vaadin.terminal.gwt.client.MouseEventDetails;
 import com.vaadin.terminal.gwt.client.ui.VButton.ButtonClientToServerRpc;
 import com.vaadin.terminal.gwt.client.ui.VButtonPaintable;
-import com.vaadin.terminal.gwt.client.ui.VButtonState;
+import com.vaadin.terminal.gwt.client.ui.ButtonState;
 import com.vaadin.terminal.gwt.server.RpcTarget;
 import com.vaadin.tools.ReflectTools;
 import com.vaadin.ui.ClientWidget.LoadStyle;
@@ -492,11 +492,11 @@ public class Button extends AbstractComponent implements
 
     @Override
     protected ComponentState createState() {
-        return new VButtonState();
+        return new ButtonState();
     }
 
     @Override
-    public VButtonState getState() {
-        return (VButtonState) super.getState();
+    public ButtonState getState() {
+        return (ButtonState) super.getState();
     }
 }