]> source.dussan.org Git - vaadin-framework.git/commitdiff
#8169, #8326 Removed SplitPanel and special handling of SplitPanel on
authorArtur Signell <artur@vaadin.com>
Tue, 31 Jan 2012 13:06:03 +0000 (15:06 +0200)
committerArtur Signell <artur@vaadin.com>
Tue, 31 Jan 2012 13:09:35 +0000 (15:09 +0200)
client side

src/com/vaadin/terminal/gwt/client/WidgetSet.java
src/com/vaadin/terminal/gwt/server/ComponentSizeValidator.java
src/com/vaadin/ui/SplitPanel.java [deleted file]
tests/server-side/com/vaadin/tests/VaadinClasses.java
tests/testbench/com/vaadin/tests/components/splitpanel/SplitPanels.java [deleted file]

index 03dde5fd2fbb86ab3648e12cfbff9d603e9b6009..390d79ce1725fc73330b295c14a9906c5243492e 100644 (file)
@@ -7,10 +7,8 @@ package com.vaadin.terminal.gwt.client;
 import com.google.gwt.core.client.GWT;
 import com.google.gwt.user.client.ui.Widget;
 import com.vaadin.terminal.gwt.client.ui.VFilterSelectPaintable;
-import com.vaadin.terminal.gwt.client.ui.VHorizontalSplitPanelPaintable;
 import com.vaadin.terminal.gwt.client.ui.VListSelectPaintable;
 import com.vaadin.terminal.gwt.client.ui.VUnknownComponentPaintable;
-import com.vaadin.terminal.gwt.client.ui.VVerticalSplitPanelPaintable;
 
 public class WidgetSet {
 
@@ -80,11 +78,7 @@ public class WidgetSet {
                     return VListSelectPaintable.class;
                 }
             }
-        } else if (widgetClass == VHorizontalSplitPanelPaintable.class
-                && uidl.hasAttribute("vertical")) {
-            return VVerticalSplitPanelPaintable.class;
         }
-
         return widgetClass;
 
     }
@@ -129,8 +123,6 @@ public class WidgetSet {
          */
         if (fullyqualifiedName.equals("com.vaadin.ui.Select")) {
             loadImplementation(VListSelectPaintable.class);
-        } else if (fullyqualifiedName.equals("com.vaadin.ui.SplitPanel")) {
-            loadImplementation(VVerticalSplitPanelPaintable.class);
         }
 
         return implementationByServerSideClassName;
index fad5220eb7f04d5e554bdd296d370745f301bbb9..d3095512bbf01e16072be1f0ef536a8133154024 100644 (file)
@@ -18,6 +18,7 @@ import java.util.logging.Logger;
 
 import com.vaadin.terminal.Sizeable.Unit;
 import com.vaadin.ui.AbstractOrderedLayout;
+import com.vaadin.ui.AbstractSplitPanel;
 import com.vaadin.ui.Component;
 import com.vaadin.ui.ComponentContainer;
 import com.vaadin.ui.CustomComponent;
@@ -26,7 +27,6 @@ import com.vaadin.ui.GridLayout;
 import com.vaadin.ui.GridLayout.Area;
 import com.vaadin.ui.Layout;
 import com.vaadin.ui.Panel;
-import com.vaadin.ui.SplitPanel;
 import com.vaadin.ui.TabSheet;
 import com.vaadin.ui.VerticalLayout;
 import com.vaadin.ui.Window;
@@ -449,7 +449,7 @@ public class ComponentSizeValidator implements Serializable {
                 }
             }
 
-            if (parent instanceof Panel || parent instanceof SplitPanel
+            if (parent instanceof Panel || parent instanceof AbstractSplitPanel
                     || parent instanceof TabSheet
                     || parent instanceof CustomComponent) {
                 // height undefined, we know how how component works and no
@@ -552,7 +552,7 @@ public class ComponentSizeValidator implements Serializable {
                  * the component width
                  */
                 return hasNonRelativeWidthComponent((Form) parent);
-            } else if (parent instanceof SplitPanel
+            } else if (parent instanceof AbstractSplitPanel
                     || parent instanceof TabSheet
                     || parent instanceof CustomComponent) {
                 // FIXME Could we use com.vaadin package name here and
diff --git a/src/com/vaadin/ui/SplitPanel.java b/src/com/vaadin/ui/SplitPanel.java
deleted file mode 100644 (file)
index f4c5b7e..0000000
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
-@VaadinApache2LicenseForJavaFiles@
- */
-
-package com.vaadin.ui;
-
-import com.vaadin.terminal.PaintException;
-import com.vaadin.terminal.PaintTarget;
-import com.vaadin.terminal.gwt.client.ui.VHorizontalSplitPanelPaintable;
-import com.vaadin.ui.ClientWidget.LoadStyle;
-
-/**
- * SplitPanel.
- * 
- * <code>SplitPanel</code> is a component container, that can contain two
- * components (possibly containers) which are split by divider element.
- * 
- * @author Vaadin Ltd.
- * @version
- * @VERSION@
- * @since 5.0
- * @deprecated in 6.5. Use {@link HorizontalSplitPanel} or
- *             {@link VerticalSplitPanel} instead.
- */
-@Deprecated
-@ClientWidget(value = VHorizontalSplitPanelPaintable.class, loadStyle = LoadStyle.EAGER)
-public class SplitPanel extends AbstractSplitPanel {
-
-    /* Predefined orientations */
-
-    /**
-     * Components are to be laid out vertically.
-     */
-    public static final int ORIENTATION_VERTICAL = 0;
-
-    /**
-     * Components are to be laid out horizontally.
-     */
-    public static final int ORIENTATION_HORIZONTAL = 1;
-
-    /**
-     * Orientation of the layout.
-     */
-    private int orientation;
-
-    /**
-     * Creates a new split panel. The orientation of the panels is
-     * <code>ORIENTATION_VERTICAL</code>.
-     */
-    public SplitPanel() {
-        super();
-        orientation = ORIENTATION_VERTICAL;
-        setSizeFull();
-    }
-
-    /**
-     * Create a new split panels. The orientation of the panel is given as
-     * parameters.
-     * 
-     * @param orientation
-     *            the Orientation of the layout.
-     */
-    public SplitPanel(int orientation) {
-        this();
-        setOrientation(orientation);
-    }
-
-    /**
-     * Paints the content of this component.
-     * 
-     * @param target
-     *            the Paint Event.
-     * @throws PaintException
-     *             if the paint operation failed.
-     */
-    @Override
-    public void paintContent(PaintTarget target) throws PaintException {
-        super.paintContent(target);
-
-        if (orientation == ORIENTATION_VERTICAL) {
-            target.addAttribute("vertical", true);
-        }
-
-    }
-
-    /**
-     * Gets the orientation of the split panel.
-     * 
-     * @return the Value of property orientation.
-     * 
-     */
-    public int getOrientation() {
-        return orientation;
-    }
-
-    /**
-     * Sets the orientation of the split panel.
-     * 
-     * @param orientation
-     *            the New value of property orientation.
-     */
-    public void setOrientation(int orientation) {
-
-        // Checks the validity of the argument
-        if (orientation < ORIENTATION_VERTICAL
-                || orientation > ORIENTATION_HORIZONTAL) {
-            throw new IllegalArgumentException();
-        }
-
-        this.orientation = orientation;
-        requestRepaint();
-    }
-
-}
index 707fc020b604866fb549b8c1caac2ad1972edf27..b74af660e4f7f80688a52868abf14ba7afff00f3 100644 (file)
@@ -27,7 +27,6 @@ import com.vaadin.ui.HorizontalSplitPanel;
 import com.vaadin.ui.LoginForm;
 import com.vaadin.ui.PopupView;
 import com.vaadin.ui.Root;
-import com.vaadin.ui.SplitPanel;
 import com.vaadin.ui.VerticalSplitPanel;
 import com.vaadin.ui.Window;
 
@@ -105,7 +104,6 @@ public class VaadinClasses {
 
     public static List<Class<? extends ComponentContainer>> getComponentContainersSupportingUnlimitedNumberOfComponents() {
         List<Class<? extends ComponentContainer>> classes = getComponentContainersSupportingAddRemoveComponent();
-        classes.remove(SplitPanel.class);
         classes.remove(VerticalSplitPanel.class);
         classes.remove(HorizontalSplitPanel.class);
         classes.remove(Window.class);
diff --git a/tests/testbench/com/vaadin/tests/components/splitpanel/SplitPanels.java b/tests/testbench/com/vaadin/tests/components/splitpanel/SplitPanels.java
deleted file mode 100644 (file)
index ebe9427..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-package com.vaadin.tests.components.splitpanel;\r
-\r
-import java.util.LinkedHashMap;\r
-\r
-import com.vaadin.ui.SplitPanel;\r
-\r
-@SuppressWarnings("deprecation")\r
-public class SplitPanels extends AbstractSplitPanelTest<SplitPanel> {\r
-\r
-    private Command<SplitPanel, Integer> orientationCommand = new Command<SplitPanel, Integer>() {\r
-\r
-        public void execute(SplitPanel c, Integer value, Object data) {\r
-            c.setOrientation(value);\r
-        }\r
-    };\r
-\r
-    @Override\r
-    protected Class<SplitPanel> getTestClass() {\r
-        return SplitPanel.class;\r
-    }\r
-\r
-    @Override\r
-    protected void createActions() {\r
-        super.createActions();\r
-        createOrientationSelect(CATEGORY_FEATURES);\r
-\r
-    }\r
-\r
-    private void createOrientationSelect(String category) {\r
-        LinkedHashMap<String, Integer> options = new LinkedHashMap<String, Integer>();\r
-        options.put("Horizontal", SplitPanel.ORIENTATION_HORIZONTAL);\r
-        options.put("Vertical", SplitPanel.ORIENTATION_VERTICAL);\r
-        createSelectAction("Orientation", category, options, "Horizontal",\r
-                orientationCommand);\r
-\r
-    }\r
-}\r