diff options
197 files changed, 834 insertions, 2901 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000000..9f652e633f --- /dev/null +++ b/.gitignore @@ -0,0 +1,53 @@ + +# / +/.classpath +/.cvsignore +/.project +/.tomcatplugin +/.settings +/work +/.gwt-cache + +# /WebContent/VAADIN/themes/base/ +/WebContent/VAADIN/themes/base/styles.css + +# /WebContent/VAADIN/themes/chameleon/ +/WebContent/VAADIN/themes/chameleon/styles.css + +# /WebContent/VAADIN/themes/liferay/ +/WebContent/VAADIN/themes/liferay/styles.css + +# /WebContent/VAADIN/themes/reindeer/ +/WebContent/VAADIN/themes/reindeer/styles.css + +# /WebContent/VAADIN/themes/reindeer/button/img/ +/WebContent/VAADIN/themes/reindeer/button/img/*-sprites*.png + +# /WebContent/VAADIN/themes/reindeer/common/img/ +/WebContent/VAADIN/themes/reindeer/common/img/*-sprites*.png + +# /WebContent/VAADIN/themes/runo/ +/WebContent/VAADIN/themes/runo/styles.css + +# /WebContent/VAADIN/themes/runo/common/img/ +/WebContent/VAADIN/themes/runo/common/img/ajax-loader-red.gif +/WebContent/VAADIN/themes/runo/common/img/ajax-loader-yellow.gif + +# /WebContent/VAADIN/widgetsets/ +/WebContent/VAADIN/widgetsets +/WebContent/VAADIN/gwt-unitCache* + +# /WebContent/WEB-INF/ +/WebContent/WEB-INF/classes + +# /build/ +/build/result +/build/gwt +/build/checkout +/build/classes +/build/test-output +/build/integration-test-output + +# /build/buildhelpers/com/vaadin/buildhelpers/ +/build/buildhelpers/com/vaadin/buildhelpers/*.class +/bin diff --git a/WebContent/VAADIN/themes/base/button/button.css b/WebContent/VAADIN/themes/base/button/button.css index 2212120915..1bc7d3ac92 100644 --- a/WebContent/VAADIN/themes/base/button/button.css +++ b/WebContent/VAADIN/themes/base/button/button.css @@ -29,14 +29,6 @@ cursor: default;
}
-.v-ie6 .v-button {
- display: inline;
-}
-
-.v-ie7 .v-button {
- display: inline;
-}
-
.v-button-wrap,
.v-button-caption {
vertical-align: middle;
@@ -117,10 +109,7 @@ zoom: 1;
float: none;
}
-/* Fixes streched buttons in IE6 and IE7*/
-.v-ie6 .v-nativebutton {
- width: 1px;
-}
+/* Fixes stretched buttons in IE7*/
.v-ie .v-nativebutton {
overflow: visible;
padding-left: 1em;
@@ -147,12 +136,6 @@ white-space: nowrap;
}
-/* Fix for IE6/IE7 issue where checkbox moves 1 pixel down after selection (#4636) */
-.v-ie6 .v-checkbox,
-.v-ie7 .v-checkbox {
- vertical-align: baseline;
-}
-
.v-checkbox .v-icon {
margin: 0 2px;
}
diff --git a/WebContent/VAADIN/themes/base/caption/caption.css b/WebContent/VAADIN/themes/base/caption/caption.css index bdeaae3de2..549d4f9cef 100644 --- a/WebContent/VAADIN/themes/base/caption/caption.css +++ b/WebContent/VAADIN/themes/base/caption/caption.css @@ -29,14 +29,6 @@ overflow: hidden; } -/* Fix IE6 "double-float-margin-bug" */ -.v-ie6 .v-errorindicator, -.v-ie6 .v-icon, -.v-ie6 .v-captiontext, -.v-ie6 .v-required-field-indicator { - display: inline; -} - .v-ie9 .v-gridlayout-margin>div>div>.v-caption, .v-ie9 .v-verticallayout>div>div>.v-caption, .v-ie9 .v-horizontallayout>div>div>.v-caption { diff --git a/WebContent/VAADIN/themes/base/datefield/datefield.css b/WebContent/VAADIN/themes/base/datefield/datefield.css index 72d9510c3f..88d6f92c79 100644 --- a/WebContent/VAADIN/themes/base/datefield/datefield.css +++ b/WebContent/VAADIN/themes/base/datefield/datefield.css @@ -61,16 +61,6 @@ outline: 1px dotted black; } -.v-ie6 .v-datefield-calendarpanel-day, -.v-ie7 .v-datefield-calendarpanel-day { - margin: 1px; -} -.v-ie6 .v-datefield-calendarpanel-day-focused, -.v-ie7 .v-datefield-calendarpanel-day-focused { - border: 1px dotted black; - margin: 0px; -} - .v-datefield-time { white-space: nowrap; } @@ -94,10 +84,3 @@ background-color: #ffe0e0; } */ -/* IE somehow loses generic v-disabled alpha. See #1960 */ -.v-ie6 .v-disabled .v-datefield-button, -.v-ie6 .v-disabled .v-datefield-textfield, -.v-ie7 .v-disabled .v-datefield-button, -.v-ie7 .v-disabled .v-datefield-textfield { - filter: alpha(opacity=30); -}
\ No newline at end of file diff --git a/WebContent/VAADIN/themes/base/gridlayout/gridlayout.css b/WebContent/VAADIN/themes/base/gridlayout/gridlayout.css index 87cdcfd361..38e2bb3aed 100644 --- a/WebContent/VAADIN/themes/base/gridlayout/gridlayout.css +++ b/WebContent/VAADIN/themes/base/gridlayout/gridlayout.css @@ -23,8 +23,3 @@ .v-gridlayout-spacing-off { overflow: hidden; } -/* Ensure that resizing gridlayout works in IE */ -.v-ie6 .v-gridlayout, -.v-ie7 .v-gridlayout { - overflow: hidden; -}
\ No newline at end of file diff --git a/WebContent/VAADIN/themes/base/orderedlayout/orderedlayout.css b/WebContent/VAADIN/themes/base/orderedlayout/orderedlayout.css index 9f91669385..6ed04d8f06 100644 --- a/WebContent/VAADIN/themes/base/orderedlayout/orderedlayout.css +++ b/WebContent/VAADIN/themes/base/orderedlayout/orderedlayout.css @@ -31,12 +31,3 @@ padding-top: 0; padding-left: 0; } -/* To make sure IE don't expand elements larger than they should */ -.v-ie6 .v-orderedlayout, -.v-ie6 .v-horizontallayout, -.v-ie6 .v-verticallayout, -.v-ie7 .v-orderedlayout, -.v-ie7 .v-horizontallayout, -.v-ie7 .v-verticallayout { - overflow: hidden; -} diff --git a/WebContent/VAADIN/themes/base/progressindicator/progressindicator.css b/WebContent/VAADIN/themes/base/progressindicator/progressindicator.css index a9a90c4b06..4037802cf2 100644 --- a/WebContent/VAADIN/themes/base/progressindicator/progressindicator.css +++ b/WebContent/VAADIN/themes/base/progressindicator/progressindicator.css @@ -1,21 +1,17 @@ .v-progressindicator { - overflow: hidden; /* for IE6 */ width: 150px; } .v-progressindicator-wrapper { - overflow: hidden; /* for IE6 */ height: 7px; border: 1px solid #ddd; } .v-progressindicator-indicator { height: 7px; - overflow: hidden; /* for IE6 */ background: #ddd; } div.v-progressindicator-indeterminate { height: 20px; width: 20px; - overflow: hidden; /* for IE6 */ background: #fff url(../common/img/ajax-loader-medium.gif) no-repeat 50%; border-radius: 4px; -webkit-border-radius: 4px; @@ -31,6 +27,5 @@ div.v-progressindicator-indeterminate { div.v-progressindicator-indeterminate-disabled { height: 20px; width: 20px; - overflow: hidden; /* for IE6 */ background: transparent; }
\ No newline at end of file diff --git a/WebContent/VAADIN/themes/base/shadow/shadow.css b/WebContent/VAADIN/themes/base/shadow/shadow.css index 209dd0e235..c576a026bd 100644 --- a/WebContent/VAADIN/themes/base/shadow/shadow.css +++ b/WebContent/VAADIN/themes/base/shadow/shadow.css @@ -66,20 +66,3 @@ width: 10px; height: 10px; background: transparent url(img/bottom-right.png); } - - - - - -/* For IE6 (no transparent png's, we use a blur filter) */ - -.v-ie6 .v-shadow * { - display: none; -} - -.v-ie6 .v-shadow { - background: #000; - filter: progid:DXImageTransform.Microsoft.Blur(pixelRadius=2) alpha(opacity=20); - margin-top: -2px; - margin-left: -2px; -}
\ No newline at end of file diff --git a/WebContent/VAADIN/themes/base/slider/slider.css b/WebContent/VAADIN/themes/base/slider/slider.css index 5ee6cbf31c..1be474f04e 100644 --- a/WebContent/VAADIN/themes/base/slider/slider.css +++ b/WebContent/VAADIN/themes/base/slider/slider.css @@ -63,15 +63,3 @@ background: #FFE0E0; } */ - -/* IE specific styles */ -.v-ie6 .v-slider, -.v-ie6 .v-slider-vertical { - margin: 0; -} -.v-ie6 .v-slider .v-slider-handle { - margin: -1px 0; -} -.v-ie6 .v-slider-vertical .v-slider-handle { - margin: 0 -1px; -}
\ No newline at end of file diff --git a/WebContent/VAADIN/themes/base/splitpanel/splitpanel.css b/WebContent/VAADIN/themes/base/splitpanel/splitpanel.css index 80a2133b23..7831a8d9ce 100644 --- a/WebContent/VAADIN/themes/base/splitpanel/splitpanel.css +++ b/WebContent/VAADIN/themes/base/splitpanel/splitpanel.css @@ -4,11 +4,9 @@ } .v-splitpanel-hsplitter { width: 6px; - font-size: 1px; /* for IE6 */ } .v-splitpanel-hsplitter div { width: 6px; - font-size: 1px; /* for IE6 */ position: absolute; top: 0; bottom: 0; @@ -21,11 +19,9 @@ } .v-splitpanel-vsplitter { height: 6px; - font-size: 1px; /* for IE6 */ } .v-splitpanel-vsplitter div { height: 6px; - font-size: 1px; /* for IE6 */ background: #ddd; cursor: s-resize; cursor: row-resize; @@ -33,13 +29,3 @@ .v-disabled .v-splitpanel-vsplitter div { cursor: default; } -/* IE specific styles */ -.v-ie6 .v-splitpanel-hsplitter div { - height: 99%; -} -.v-ie6 .v-splitpanel-first-container, -.v-ie6 .v-splitpanel-second-container, -.v-ie7 .v-splitpanel-first-container, -.v-ie7 .v-splitpanel-second-container { - position: relative; -}
\ No newline at end of file diff --git a/WebContent/VAADIN/themes/base/table/table.css b/WebContent/VAADIN/themes/base/table/table.css index 4b3922c554..e2b2a16ffe 100644 --- a/WebContent/VAADIN/themes/base/table/table.css +++ b/WebContent/VAADIN/themes/base/table/table.css @@ -26,9 +26,6 @@ overflow: hidden; text-align: left; /* Force default alignment */ } -.v-ie7 .v-table { - overflow: visible; -} .v-table-header-wrap { overflow: hidden; border: 1px solid #aaa; @@ -93,10 +90,6 @@ white-space: nowrap; margin-left: 6px; } -.v-ie7 .v-table-caption-container-align-right { - margin-left: 0px; - padding-left: 6px; -} .v-table-caption-container-align-right { float: right; } @@ -181,10 +174,6 @@ position: relative; /* hide this from IE, it works without it */ cursor: pointer; } -.v-ie6 .v-table-column-selector, -.v-ie7 .v-table-column-selector { - position: static; -} .v-table-focus-slot-left { border-left: 2px solid #999; float: none; diff --git a/WebContent/VAADIN/themes/base/tabsheet/tabsheet.css b/WebContent/VAADIN/themes/base/tabsheet/tabsheet.css index 6fae7381a1..7f978076b8 100644 --- a/WebContent/VAADIN/themes/base/tabsheet/tabsheet.css +++ b/WebContent/VAADIN/themes/base/tabsheet/tabsheet.css @@ -36,9 +36,6 @@ text-align: right; margin-top: -1em; } -.v-ff2 .v-tabsheet-scroller { - position: relative; -} .v-disabled .v-tabsheet-scroller { display: none; } @@ -81,13 +78,9 @@ cursor: default; visibility: hidden; } -.v-tabsheet-tabitem:hover .v-tabsheet-caption-close, -.v-ie6 .v-tabsheet-caption-close { +.v-tabsheet-tabitem:hover .v-tabsheet-caption-close { visibility: visible; } -.v-ie6 .v-tabsheet-caption-close { - float: right; -} .v-tabsheet-tabitem { border: 1px solid #aaa; border-right: none; @@ -111,10 +104,6 @@ border-bottom: none; position: relative; } -.v-ie6 .v-tabsheet-content, -.v-ie7 .v-tabsheet-content { - zoom: 1; -} .v-tabsheet-deco { height: 1px; background: #aaa; diff --git a/WebContent/VAADIN/themes/base/tree/img/connector-collapse-ie6.png b/WebContent/VAADIN/themes/base/tree/img/connector-collapse-ie6.png Binary files differdeleted file mode 100644 index f0e5953235..0000000000 --- a/WebContent/VAADIN/themes/base/tree/img/connector-collapse-ie6.png +++ /dev/null diff --git a/WebContent/VAADIN/themes/base/tree/img/connector-collapse-last-ie6.png b/WebContent/VAADIN/themes/base/tree/img/connector-collapse-last-ie6.png Binary files differdeleted file mode 100644 index 0d2fd54885..0000000000 --- a/WebContent/VAADIN/themes/base/tree/img/connector-collapse-last-ie6.png +++ /dev/null diff --git a/WebContent/VAADIN/themes/base/tree/img/connector-expand-ie6.png b/WebContent/VAADIN/themes/base/tree/img/connector-expand-ie6.png Binary files differdeleted file mode 100644 index 1a7758fce5..0000000000 --- a/WebContent/VAADIN/themes/base/tree/img/connector-expand-ie6.png +++ /dev/null diff --git a/WebContent/VAADIN/themes/base/tree/img/connector-expand-last-ie6.png b/WebContent/VAADIN/themes/base/tree/img/connector-expand-last-ie6.png Binary files differdeleted file mode 100644 index db94fc0d8e..0000000000 --- a/WebContent/VAADIN/themes/base/tree/img/connector-expand-last-ie6.png +++ /dev/null diff --git a/WebContent/VAADIN/themes/base/tree/tree-connectors.css b/WebContent/VAADIN/themes/base/tree/tree-connectors.css index 6e7ce45391..c60e41c48b 100644 --- a/WebContent/VAADIN/themes/base/tree/tree-connectors.css +++ b/WebContent/VAADIN/themes/base/tree/tree-connectors.css @@ -33,17 +33,3 @@ .v-tree-connectors .v-tree-node-drag-top.v-tree-node-leaf { background-position: 2px 50%; } - -/* IE6 */ -.v-ie6 .v-tree-connectors .v-tree-node { - background: transparent url(img/connector-expand-ie6.png) no-repeat 2px -52px; -} -.v-ie6 .v-tree-connectors .v-tree-node-expanded { - background: transparent url(img/connector-collapse-ie6.png) no-repeat 2px -52px; -} -.v-ie6 .v-tree-connectors .v-tree-node-last { - background: transparent url(img/connector-expand-last-ie6.png) no-repeat 2px -52px; -} -.v-ie6 .v-tree-connectors .v-tree-node-last.v-tree-node-expanded { - background: transparent url(img/connector-collapse-last-ie6.png) no-repeat 2px -52px; -}
\ No newline at end of file diff --git a/WebContent/VAADIN/themes/base/tree/tree-default.css b/WebContent/VAADIN/themes/base/tree/tree-default.css index c486233ea8..23721c77ae 100644 --- a/WebContent/VAADIN/themes/base/tree/tree-default.css +++ b/WebContent/VAADIN/themes/base/tree/tree-default.css @@ -37,27 +37,6 @@ div.v-tree-node-leaf { .v-tree-node-children { padding-left: 1em; } -/* ie6compatnode is hidden from non ie6 browsers, for ie6 - * uses weird hack to sink all events properly - */ -.v-tree-node-ie6compatnode { - display: none; -} -/* IMPORTANT keep the offsetWidth of this element the same as the margin-left of v-tree-node-caption */ -.v-ie6 .v-tree-node-ie6compatnode { - display: inline; - float: left; - background: orange; - margin: 0; - width: 0.8em; - height: 0.8em; - padding: 0.1em; - filter: alpha(opacity=0); -} -.v-ie6 .v-tree-node, -.v-ie6 .v-tree-node-children { - clear: left; -} /*************************************** * Drag'n'drop styles ***************************************/ @@ -106,9 +85,6 @@ div.v-tree-node-leaf { margin: -2px 2px -2px -2px; background-color: #bcdcff; } -.v-ie6 .v-tree .v-tree-node-caption-drag-center div { - margin: -2px ; -} .v-tree .v-tree-node-caption-drag-center div { background-color: rgba(169,209,255,.6); } diff --git a/WebContent/VAADIN/themes/base/treetable/treetable.css b/WebContent/VAADIN/themes/base/treetable/treetable.css index 1bc21b890c..de505ba774 100644 --- a/WebContent/VAADIN/themes/base/treetable/treetable.css +++ b/WebContent/VAADIN/themes/base/treetable/treetable.css @@ -5,26 +5,15 @@ /* defines the amount of indent per level */ width: 18px; } -.v-ie7 .v-treetable-treespacer{ - height: 100%; /* #7388 */ -} .v-treetable-node-closed { background: url(../treetable/img/arrow-right.png) right center no-repeat; } -.v-ie6 .v-treetable-node-closed { - background-image: url(../treetable/img/arrow-right.gif); -} - .v-treetable-node-open { background: url(../treetable/img/arrow-down.png) right center no-repeat; } -.v-ie6 .v-treetable-node-open { - background-image: url(../treetable/img/arrow-down.gif); -} - .v-treetable .v-checkbox { display: inline-block; padding-bottom: 4px; diff --git a/WebContent/VAADIN/themes/base/upload/upload.css b/WebContent/VAADIN/themes/base/upload/upload.css index e6b58fb14e..adc5751d7c 100644 --- a/WebContent/VAADIN/themes/base/upload/upload.css +++ b/WebContent/VAADIN/themes/base/upload/upload.css @@ -2,10 +2,6 @@ white-space: nowrap; } -.v-ie6 .v-upload, -.v-ie7 .v-upload { - margin:0; -} .v-upload-immediate { position: relative; diff --git a/WebContent/VAADIN/themes/base/window/window.css b/WebContent/VAADIN/themes/base/window/window.css index d4c03bd82e..d5dfd66e2b 100644 --- a/WebContent/VAADIN/themes/base/window/window.css +++ b/WebContent/VAADIN/themes/base/window/window.css @@ -17,9 +17,6 @@ div.v-window-header { overflow: hidden; padding: 0; } -.v-ie6 .v-window-header { - width: 100%; -} .v-window-header .v-icon { vertical-align: middle; /* This has to be 'middle', not 'bottom', to allow larger icons than 16px */ } @@ -77,15 +74,6 @@ div.v-window-header { height: 100%; filter: alpha(opacity=50); } -/* IE6 workaround for position:fixed; */ -.v-ie6 .v-window-modalitycurtain { - position: absolute; - top: expression(document.documentElement.scrollTop + "px"); -} -/* min-width for IE6 */ -.v-ie6 .v-window { - width: 0; /* */ -} /* Shadow for window */ .v-shadow-window { position: absolute; @@ -147,13 +135,3 @@ div.v-window-header { width: 28px; height: 28px; background: transparent url(img/shadow/bottom-right.png); } -/* For IE6 (no transparent png's, we use a blur filter) */ -.v-ie6 .v-shadow-window * { - display: none; -} -.v-ie6 .v-shadow-window { - background: #000; - filter: progid:DXImageTransform.Microsoft.Blur(pixelRadius=5) alpha(opacity=20); - margin-top: 2px; - margin-left: 2px; -}
\ No newline at end of file diff --git a/WebContent/VAADIN/themes/chameleon/common/common.css b/WebContent/VAADIN/themes/chameleon/common/common.css index e1a5bdce7a..9d5a64b2ad 100644 --- a/WebContent/VAADIN/themes/chameleon/common/common.css +++ b/WebContent/VAADIN/themes/chameleon/common/common.css @@ -28,8 +28,7 @@ -moz-border-radius: 4px; } -.v-sa .v-tooltip, -.v-ff3 .v-tooltip { +.v-sa .v-tooltip { outline: 1px solid rgba(0,0,0,.2); -webkit-border-radius: 0; -moz-border-radius: 0; @@ -98,16 +97,6 @@ overflow: hidden; } -.v-ie6 .v-window, -.v-ie6 .v-popupview-popup, -.v-ie6 .v-filterselect-suggestpopup, -.v-ie6 .v-datefield-popup, -.v-ie6 .v-contextmenu, -.v-ie6 .v-Notification, -.v-ie6 .v-menubar-submenu { - background-image: none; - } - .v-filterselect-suggestpopup, .v-contextmenu, .v-menubar-submenu { diff --git a/WebContent/VAADIN/themes/chameleon/components/accordion/accordion.css b/WebContent/VAADIN/themes/chameleon/components/accordion/accordion.css index 6b0f69aaaa..8fb7254008 100644 --- a/WebContent/VAADIN/themes/chameleon/components/accordion/accordion.css +++ b/WebContent/VAADIN/themes/chameleon/components/accordion/accordion.css @@ -14,10 +14,6 @@ border-style: solid none; } -.v-ie6 .v-accordion-item-caption { - background-image: none; - } - div.v-accordion-item-caption, div.v-accordion-item-open .v-accordion-item-caption:active { background-color: transparent; diff --git a/WebContent/VAADIN/themes/chameleon/components/button/button.css b/WebContent/VAADIN/themes/chameleon/components/button/button.css index 13fa53cc3f..6629cfeb1e 100644 --- a/WebContent/VAADIN/themes/chameleon/components/button/button.css +++ b/WebContent/VAADIN/themes/chameleon/components/button/button.css @@ -1,5 +1,4 @@ .v-button:active, -.v-ie7 .v-pressed.v-button, .v-ie8 .v-pressed.v-button, div.v-button-down { background-image: url(../../img/grad-dark-bottom2.png); @@ -7,7 +6,6 @@ div.v-button-down { } .v-button:active .v-button-wrap, -.v-ie7 .v-pressed.v-button .v-button-wrap, .v-ie8 .v-pressed.v-button .v-button-wrap, .v-button-down .v-button-wrap { background-image: url(../../img/grad-dark-top2.png); @@ -22,10 +20,6 @@ div.v-button-down .v-button-wrap { background-image: url(../../img/grad-dark-top2.png); } -.v-ie6 div.v-button-down .v-button-wrap { - background-image: none; - } - .v-button { overflow: hidden; } @@ -66,16 +60,6 @@ div.v-button-down .v-button-wrap { overflow: hidden; } -body.v-ie6 .v-button { - background-image: none; - } - -body.v-ie6 .v-button .v-button-wrap { - background-image: none; - display: inline; - zoom: 1; - } - .v-button:focus { outline: none; } @@ -110,7 +94,6 @@ body.v-ie6 .v-button .v-button-wrap { } .v-button-small:active .v-button-wrap, -.v-ie7 .v-button-small.v-pressed .v-button-wrap, .v-ie8 .v-button-small.v-pressed .v-button-wrap, .v-button-down.small .v-button-wrap { padding: 2px 10px; @@ -131,7 +114,6 @@ body.v-ie6 .v-button .v-button-wrap { } .v-button-wide:active .v-button-wrap, -.v-ie7 .v-button-wide.v-pressed .v-button-wrap, .v-ie8 .v-button-wide.v-pressed .v-button-wrap { padding-left: 25px; padding-right: 25px; @@ -147,7 +129,6 @@ body.v-ie6 .v-button .v-button-wrap { } .v-button-tall:active .v-button-wrap, -.v-ie7 .v-button-tall.v-pressed .v-button-wrap, .v-ie8 .v-button-tall.v-pressed .v-button-wrap { padding-top: 12px; padding-bottom: 12px; @@ -263,22 +244,6 @@ body.v-ie .v-pressed.v-button-borderless .v-button-wrap { margin-right: -0.5em; } -.v-ie6 .v-button-icon-on-right, -.v-ie7 .v-button-icon-on-right { - position: relative; - } - -.v-ie6 .v-button-icon-on-right .v-button-caption, -.v-ie7 .v-button-icon-on-right .v-button-caption { - padding-right: 14px; - } - -.v-ie6 .v-button-icon-on-right .v-icon, -.v-ie7 .v-button-icon-on-right .v-icon { - position: absolute; - right: 0; - margin: 0; - } /******************************************************************************* * Icon-only diff --git a/WebContent/VAADIN/themes/chameleon/components/datefield/datefield.css b/WebContent/VAADIN/themes/chameleon/components/datefield/datefield.css index 71771ad6e1..3804ab52e0 100644 --- a/WebContent/VAADIN/themes/chameleon/components/datefield/datefield.css +++ b/WebContent/VAADIN/themes/chameleon/components/datefield/datefield.css @@ -23,25 +23,6 @@ height: 1.2em; } -.v-ie6 .v-datefield-button, -.v-ie7 .v-datefield-button { - height: 1.55em; - margin-top: 1px; - padding: 0; - } - -.v-ie7 .v-datefield-button { - height: 1.85em; - } - -.v-ie7 .v-datefield-small .v-datefield-button { - height: 1.75em; - } - -.v-ie7 .v-datefield-big .v-datefield-button { - height: 2em; - } - .v-ie8 .v-datefield-button { height: 1.6em; padding: 0; @@ -116,10 +97,6 @@ td.v-datefield-calendarpanel-month { text-shadow: 0 1px 0 rgba(255,255,255,.7); } -.v-ie6 td.v-datefield-calendarpanel-month { - background-image: none; - } - span.v-datefield-calendarpanel-month { display: block; text-align: center; @@ -172,10 +149,6 @@ td.v-datefield-calendarpanel-nextyear { background-position: 0 0; } -.v-ie6 .v-datefield-calendarpanel-header button { - background-image: none; - } - .v-datefield-calendarpanel-header button:active { background-image: url(../../img/grad-dark-top2.png); } @@ -239,10 +212,6 @@ td.v-datefield-calendarpanel-nextyear { margin-bottom: 2px; } -.v-ie6 .v-datefield-calendarpanel-weekdays strong { - background-image: none; - } - .v-datefield-calendarpanel .v-first strong { -webkit-border-bottom-left-radius: 3px; -moz-border-radius-bottomleft: 3px; @@ -293,10 +262,6 @@ td.v-datefield-calendarpanel-nextyear { border: 1px solid #c9c9c9; } -.v-ie6 .v-datefield-calendarpanel-day-today { - background-image: none; - } - .v-datefield-calendarpanel-day-selected, .v-datefield-calendarpanel-day-selected:hover { margin: 0 0 0 .3em; diff --git a/WebContent/VAADIN/themes/chameleon/components/menubar/menubar.css b/WebContent/VAADIN/themes/chameleon/components/menubar/menubar.css index 00b062f8d6..4f6be1b923 100644 --- a/WebContent/VAADIN/themes/chameleon/components/menubar/menubar.css +++ b/WebContent/VAADIN/themes/chameleon/components/menubar/menubar.css @@ -5,10 +5,6 @@ border-width: 1px 0; } -.v-ie6 .v-menubar { - background-image: none; - } - .v-menubar .v-menubar-menuitem { padding: .2em .5em; line-height: normal; @@ -26,7 +22,3 @@ background-image: url(../../img/grad-light-top2.png); background-position: 0 -1px; } - -.v-ie6 .v-menubar-submenu .v-menubar-menuitem-selected { - background-image: none; - }
\ No newline at end of file diff --git a/WebContent/VAADIN/themes/chameleon/components/notification/notification.css b/WebContent/VAADIN/themes/chameleon/components/notification/notification.css index 1e4268cf92..ee686912c5 100644 --- a/WebContent/VAADIN/themes/chameleon/components/notification/notification.css +++ b/WebContent/VAADIN/themes/chameleon/components/notification/notification.css @@ -47,10 +47,6 @@ div.v-Notification-tray { text-shadow: 0 1px 1px rgba(0,0,0,.5); } -.v-ie6 .v-Notification-tray { - background-image: none; - } - .v-Notification-tray h1 { font-size: 14px; line-height: 18px; diff --git a/WebContent/VAADIN/themes/chameleon/components/panel/panel.css b/WebContent/VAADIN/themes/chameleon/components/panel/panel.css index e83e245ce6..0e5dcb8a38 100644 --- a/WebContent/VAADIN/themes/chameleon/components/panel/panel.css +++ b/WebContent/VAADIN/themes/chameleon/components/panel/panel.css @@ -87,10 +87,6 @@ div.v-panel-content-light { padding: .3em .6em; } -.v-ie6 .v-panel-bubble .v-panel-caption-bubble { - background-image: none; - } - .v-panel-nocaption-bubble { padding: 0; margin: 0; diff --git a/WebContent/VAADIN/themes/chameleon/components/progressindicator/progressindicator.css b/WebContent/VAADIN/themes/chameleon/components/progressindicator/progressindicator.css index b13b627ed6..c080c0fc43 100644 --- a/WebContent/VAADIN/themes/chameleon/components/progressindicator/progressindicator.css +++ b/WebContent/VAADIN/themes/chameleon/components/progressindicator/progressindicator.css @@ -18,11 +18,6 @@ border: 1px solid #b3b3b3; } -.v-ie6 .v-progressindicator-wrapper, -.v-ie6 .v-progressindicator-indicator { - background-image: none; - } - /******************************************************************************* * Small diff --git a/WebContent/VAADIN/themes/chameleon/components/selects/selects.css b/WebContent/VAADIN/themes/chameleon/components/selects/selects.css index 170a4bb991..3c8496f0fe 100644 --- a/WebContent/VAADIN/themes/chameleon/components/selects/selects.css +++ b/WebContent/VAADIN/themes/chameleon/components/selects/selects.css @@ -84,13 +84,6 @@ body .v-filterselect-suggestpopup-big td { -ms-user-select: none; } -.v-ie6 .v-filterselect-prevpage-off, -.v-ie6 .v-filterselect-nextpage-off, -.v-ie6 .v-filterselect-prevpage, -.v-ie6 .v-filterselect-nextpage { - background-image: none; - } - .v-filterselect-prevpage:active, .v-filterselect-nextpage:active { background-image: (../../img/grad-dark-bottom2.png); @@ -126,10 +119,6 @@ body .v-filterselect-suggestpopup-big td { background-position: 0 -1px; } -.v-ie6 .v-filterselect-suggestmenu .gwt-menuItem-selected { - background-image: none; - } - .v-filterselect-suggestpopup-small .v-filterselect-status { font-size: .8em; } @@ -156,10 +145,6 @@ body .v-filterselect-suggestpopup-big td { padding: .3em .5em; } -.v-ie6 .v-filterselect-select-button { - background-image: none; - } - .v-filterselect-select-button .v-filterselect-input { display: block; width: 100% !important; @@ -176,10 +161,3 @@ body .v-filterselect-suggestpopup-big td { height: 100%; background-position: 100% -8px; } - -.v-ie6 .v-filterselect-select-button .v-filterselect-button { - float: none; - position: relative; - margin: -1.8em -.5em -.3em -.5em; - padding: .3em .5em; - }
\ No newline at end of file diff --git a/WebContent/VAADIN/themes/chameleon/components/slider/slider.css b/WebContent/VAADIN/themes/chameleon/components/slider/slider.css index c0fc271d3f..6a430723e2 100644 --- a/WebContent/VAADIN/themes/chameleon/components/slider/slider.css +++ b/WebContent/VAADIN/themes/chameleon/components/slider/slider.css @@ -42,10 +42,6 @@ border-width: 0 1px; } -.v-ie6 .v-slider-vertical { - width: 6px; - } - .v-slider-vertical .v-slider-base { background-image: none; width: 4px; @@ -58,8 +54,3 @@ margin: 0; margin-left: -5px; } - -.v-ie6 .v-slider-base, -.v-ie6 .v-slider-handle { - background-image: none; - }
\ No newline at end of file diff --git a/WebContent/VAADIN/themes/chameleon/components/splitpanel/splitpanel.css b/WebContent/VAADIN/themes/chameleon/components/splitpanel/splitpanel.css index bd407592cb..1cb04bc29b 100644 --- a/WebContent/VAADIN/themes/chameleon/components/splitpanel/splitpanel.css +++ b/WebContent/VAADIN/themes/chameleon/components/splitpanel/splitpanel.css @@ -5,11 +5,6 @@ width: 9px; } -.v-ie6 .v-splitpanel-hsplitter div, -.v-ie6 .v-splitpanel-vsplitter div { - background-image: url(../../img/split-handle-ie6.png); - } - .v-splitpanel-vsplitter div { background-position: 50% 2px; margin: -1px 0; @@ -35,13 +30,6 @@ background: #b3b3b3 url(../../img/grad-light-top.png) repeat-x; } -.v-ie6 .v-splitpanel-hsplitter, -.v-ie6 .v-splitpanel-hsplitter-locked, -.v-ie6 .v-splitpanel-vsplitter, -.v-ie6 .v-splitpanel-vsplitter-locked { - background-image: none; - } - /******************************************************************************* * Small ******************************************************************************/ @@ -61,11 +49,6 @@ body .v-splitpanel-vsplitter-small-locked { line-height: 1px; } -body.v-ie6 .v-splitpanel-vsplitter-small, -body.v-ie6 .v-splitpanel-vsplitter-small-locked { - overflow: hidden; - } - .v-splitpanel-hsplitter-small div { width: 7px; margin-left: -2px; @@ -78,8 +61,3 @@ body.v-ie6 .v-splitpanel-vsplitter-small-locked { background: transparent; overflow: hidden; } - -.v-ie6 .v-splitpanel-hsplitter-small div, -.v-ie6 .v-splitpanel-vsplitter-small div { - background-image: none; - }
\ No newline at end of file diff --git a/WebContent/VAADIN/themes/chameleon/components/table/table.css b/WebContent/VAADIN/themes/chameleon/components/table/table.css index 1511beb913..ea56b14f98 100644 --- a/WebContent/VAADIN/themes/chameleon/components/table/table.css +++ b/WebContent/VAADIN/themes/chameleon/components/table/table.css @@ -5,11 +5,6 @@ line-height: normal; } -.v-ie6 .v-table-header-wrap, -.v-ie6 .v-table-header-drag { - background-image: none; - } - .v-table-caption-container, .v-table-header-drag { padding-top: .2em; @@ -52,10 +47,6 @@ div.v-table-focus-slot-left { background-position: 0 -1px; } -.v-ie6 .v-table tr.v-selected { - background-image: none; - } - div.v-table-focus-slot-right { background: transparent; border-right: 2px solid #b3b3b3; diff --git a/WebContent/VAADIN/themes/chameleon/components/tabsheet/tabsheet.css b/WebContent/VAADIN/themes/chameleon/components/tabsheet/tabsheet.css index 1c52c27576..0db9b9d960 100644 --- a/WebContent/VAADIN/themes/chameleon/components/tabsheet/tabsheet.css +++ b/WebContent/VAADIN/themes/chameleon/components/tabsheet/tabsheet.css @@ -36,10 +36,6 @@ -moz-border-radius-topright: 2px; } -.v-ie6 .v-tabsheet-tabitem-selected .v-caption { - background-image: none; - } - .v-tabsheet-content { background: #fff; border-color: #b3b3b3; @@ -62,10 +58,6 @@ margin: .2em 0 0 0; } -.v-ie6 .v-tabsheet-caption-close { - background-image: url(../../img/close-btn-ie6.png); - } - .v-tabsheet-caption-close:hover { background-position: .5em -25px; } @@ -89,10 +81,6 @@ -moz-border-radius: 6px; } -.v-ie6 .v-tabsheet-scroller { - background-image: none; - } - .v-tabsheet-scrollerPrev, .v-tabsheet-scrollerNext, .v-tabsheet-scrollerPrev-disabled, @@ -110,13 +98,6 @@ filter: alpha(opacity=50); } -.v-ie6 .v-tabsheet-scrollerPrev, -.v-ie6 .v-tabsheet-scrollerNext, -.v-ie6 .v-tabsheet-scrollerPrev-disabled, -.v-ie6 .v-tabsheet-scrollerNext-disabled{ - background-image: url(../../img/tab-arrows-ie6.png); - } - .v-tabsheet-scroller button::-moz-focus-inner { border: none; padding: 0; diff --git a/WebContent/VAADIN/themes/chameleon/components/textfield/textfield.css b/WebContent/VAADIN/themes/chameleon/components/textfield/textfield.css index 9c448eee00..42bd986cef 100644 --- a/WebContent/VAADIN/themes/chameleon/components/textfield/textfield.css +++ b/WebContent/VAADIN/themes/chameleon/components/textfield/textfield.css @@ -123,8 +123,3 @@ input.v-textfield-search[type=text], .v-filterselect-search { padding-left: 17px; } - -.v-ie6 input.v-textfield-search { - /* Compensate for big style as well, since IE6 doesn't handle the selector */ - padding-left: 21px; - }
\ No newline at end of file diff --git a/WebContent/VAADIN/themes/chameleon/components/window/window.css b/WebContent/VAADIN/themes/chameleon/components/window/window.css index 3034a58fbf..b5cc0170ac 100644 --- a/WebContent/VAADIN/themes/chameleon/components/window/window.css +++ b/WebContent/VAADIN/themes/chameleon/components/window/window.css @@ -11,10 +11,6 @@ z-index: 2; } -.v-ie6 .v-window-closebox { - background-image: url(../../img/close-btn-ie6.png); - } - .v-window-closebox:hover { background-position: 0 -25px; } @@ -35,10 +31,6 @@ background-repeat: repeat-x; } -.v-ie6 .v-window-wrap { - background: transparent !important; - } - .v-window-outerheader { padding: .2em 1.7em .5em 1.2em; height: auto; diff --git a/WebContent/VAADIN/themes/chameleon/compound/sidebar-menu/sidebar-menu.css b/WebContent/VAADIN/themes/chameleon/compound/sidebar-menu/sidebar-menu.css index 83b736584f..e2ab7f2080 100644 --- a/WebContent/VAADIN/themes/chameleon/compound/sidebar-menu/sidebar-menu.css +++ b/WebContent/VAADIN/themes/chameleon/compound/sidebar-menu/sidebar-menu.css @@ -33,11 +33,6 @@ color: #fff; } -.v-ie6 .sidebar-menu .tab-selected, -.v-ie6 .sidebar-menu .selected { - background-image: none; - } - .sidebar-menu .tab-selected:focus, .sidebar-menu .selected:focus { outline: none; diff --git a/WebContent/VAADIN/themes/chameleon/compound/toolbar/toolbar.css b/WebContent/VAADIN/themes/chameleon/compound/toolbar/toolbar.css index 594fc245a6..468172037e 100644 --- a/WebContent/VAADIN/themes/chameleon/compound/toolbar/toolbar.css +++ b/WebContent/VAADIN/themes/chameleon/compound/toolbar/toolbar.css @@ -4,10 +4,6 @@ border-width: 1px 0; } -.v-ie6 .v-csslayout-toolbar { - background-image: none; - } - .v-csslayout-toolbar .v-csslayout-margin { margin: 3px .3em 2px; padding-bottom: 1px; diff --git a/WebContent/VAADIN/themes/chameleon/img/close-btn-ie6.png b/WebContent/VAADIN/themes/chameleon/img/close-btn-ie6.png Binary files differdeleted file mode 100644 index 334b03769a..0000000000 --- a/WebContent/VAADIN/themes/chameleon/img/close-btn-ie6.png +++ /dev/null diff --git a/WebContent/VAADIN/themes/chameleon/img/date-btn-ie6.png b/WebContent/VAADIN/themes/chameleon/img/date-btn-ie6.png Binary files differdeleted file mode 100644 index d22411b260..0000000000 --- a/WebContent/VAADIN/themes/chameleon/img/date-btn-ie6.png +++ /dev/null diff --git a/WebContent/VAADIN/themes/chameleon/img/split-handle-ie6.png b/WebContent/VAADIN/themes/chameleon/img/split-handle-ie6.png Binary files differdeleted file mode 100644 index 2e23c10d90..0000000000 --- a/WebContent/VAADIN/themes/chameleon/img/split-handle-ie6.png +++ /dev/null diff --git a/WebContent/VAADIN/themes/chameleon/img/tab-arrows-ie6.png b/WebContent/VAADIN/themes/chameleon/img/tab-arrows-ie6.png Binary files differdeleted file mode 100644 index 963cf2e1a0..0000000000 --- a/WebContent/VAADIN/themes/chameleon/img/tab-arrows-ie6.png +++ /dev/null diff --git a/WebContent/VAADIN/themes/liferay/button/button.css b/WebContent/VAADIN/themes/liferay/button/button.css index 8181a041a0..bd0f307947 100644 --- a/WebContent/VAADIN/themes/liferay/button/button.css +++ b/WebContent/VAADIN/themes/liferay/button/button.css @@ -50,11 +50,6 @@ line-height: 16px; } -.v-ie6 .v-button .v-button-wrap { - display: inline; - zoom: 1; -} - /* Link style button */ .v-button-link, .v-disabled.v-button-link, diff --git a/WebContent/VAADIN/themes/liferay/common/common.css b/WebContent/VAADIN/themes/liferay/common/common.css index 26a0354ff3..521c4f3ac1 100644 --- a/WebContent/VAADIN/themes/liferay/common/common.css +++ b/WebContent/VAADIN/themes/liferay/common/common.css @@ -33,7 +33,3 @@ div.v-app { font-weight: bold; margin: 1px 0 4px 0; } - -.v-ie6 .v-view { - border-top: none; -}
\ No newline at end of file diff --git a/WebContent/VAADIN/themes/liferay/datefield/datefield.css b/WebContent/VAADIN/themes/liferay/datefield/datefield.css index 4307658449..6040052798 100644 --- a/WebContent/VAADIN/themes/liferay/datefield/datefield.css +++ b/WebContent/VAADIN/themes/liferay/datefield/datefield.css @@ -116,13 +116,6 @@ span.v-datefield-calendarpanel-month { min-width: 22px; } -.v-ie6 .v-datefield-calendarpanel-prevyear button, -.v-ie6 .v-datefield-calendarpanel-nextyear button, -.v-ie7 .v-datefield-calendarpanel-prevyear button, -.v-ie7 .v-datefield-calendarpanel-nextyear button { - width: 22px; -} - .v-datefield-calendarpanel-day { display: block; width: 22px; diff --git a/WebContent/VAADIN/themes/liferay/select/select.css b/WebContent/VAADIN/themes/liferay/select/select.css index 48e35f9baa..66672cc573 100644 --- a/WebContent/VAADIN/themes/liferay/select/select.css +++ b/WebContent/VAADIN/themes/liferay/select/select.css @@ -7,10 +7,6 @@ select { background-color: #fff; } -.v-ie6 select { - font-size: 1em; -} - .v-filterselect-button { width: 24px; height: 24px; diff --git a/WebContent/VAADIN/themes/liferay/tabsheet/close-ie6.png b/WebContent/VAADIN/themes/liferay/tabsheet/close-ie6.png Binary files differdeleted file mode 100644 index fcbbedb6d4..0000000000 --- a/WebContent/VAADIN/themes/liferay/tabsheet/close-ie6.png +++ /dev/null diff --git a/WebContent/VAADIN/themes/liferay/tabsheet/tabsheet.css b/WebContent/VAADIN/themes/liferay/tabsheet/tabsheet.css index 4d5c21d7af..7f23edb809 100644 --- a/WebContent/VAADIN/themes/liferay/tabsheet/tabsheet.css +++ b/WebContent/VAADIN/themes/liferay/tabsheet/tabsheet.css @@ -132,7 +132,6 @@ .v-tabsheet-caption-close { background: transparent url(close.png) no-repeat right top; - -background-image: url(close-ie6.png); cursor: default; float: right; margin: 3px -1px 0; diff --git a/WebContent/VAADIN/themes/liferay/tree/arrows_sprites-ie6.png b/WebContent/VAADIN/themes/liferay/tree/arrows_sprites-ie6.png Binary files differdeleted file mode 100644 index c9a0bbd388..0000000000 --- a/WebContent/VAADIN/themes/liferay/tree/arrows_sprites-ie6.png +++ /dev/null diff --git a/WebContent/VAADIN/themes/liferay/tree/tree.css b/WebContent/VAADIN/themes/liferay/tree/tree.css index 23fe10f52e..33da398736 100644 --- a/WebContent/VAADIN/themes/liferay/tree/tree.css +++ b/WebContent/VAADIN/themes/liferay/tree/tree.css @@ -1,6 +1,5 @@ .v-tree-node { background: transparent url(arrows_sprites.png) no-repeat -42px 1px; - -background: transparent url(arrows_sprites-ie6.png) no-repeat -42px 1px; } .v-tree-node span { diff --git a/WebContent/VAADIN/themes/liferay/window/window.css b/WebContent/VAADIN/themes/liferay/window/window.css index 6b61d880f1..5ac7c02175 100644 --- a/WebContent/VAADIN/themes/liferay/window/window.css +++ b/WebContent/VAADIN/themes/liferay/window/window.css @@ -10,21 +10,6 @@ background: #fff url(top-left.png) no-repeat; } -.v-ie6 .v-window-wrap, -.v-ie7 .v-window-wrap { - background-position: 1px 1px; -} - -.v-ie6 .v-window-wrap { - border-bottom: none; -} - -.v-ie6 .v-window-footer { - border-bottom: 1px solid #c8c9ca; - margin-top: -1px; - padding-top: 1px; -} - .v-window-outerheader { height: 16px; margin-left: 9px; diff --git a/WebContent/VAADIN/themes/reindeer/button/button-firefox.css b/WebContent/VAADIN/themes/reindeer/button/button-firefox.css deleted file mode 100644 index 4e8a1f58c9..0000000000 --- a/WebContent/VAADIN/themes/reindeer/button/button-firefox.css +++ /dev/null @@ -1,5 +0,0 @@ -.v-ff2 .v-button .v-button-caption { - display: -moz-inline-box; - padding-top: 6px; - height: 20px; - }
\ No newline at end of file diff --git a/WebContent/VAADIN/themes/reindeer/button/button-ie.css b/WebContent/VAADIN/themes/reindeer/button/button-ie.css index aaac6bf0b6..47d9496e81 100644 --- a/WebContent/VAADIN/themes/reindeer/button/button-ie.css +++ b/WebContent/VAADIN/themes/reindeer/button/button-ie.css @@ -1,75 +1,4 @@ -.v-ie6 .v-nativebutton-link, -.v-ie7 .v-nativebutton-link, .v-ie8 .v-nativebutton-link { padding: 0; text-align: left; } - -/** - * IE6 buttons -------------------------- - */ -.v-ie6 .v-button { - border: 1px solid #b3b3b3; - border-bottom-color: #9a9a9a; - background: #d8d8d8 url(img/right.png) no-repeat 0 -1px; - padding: 0 15px; - height: 23px; -} -.v-ie6 .v-button .v-button-wrap { - background: transparent; - height: 20px; - padding: 3px 0 0; - display: inline; - zoom: 1; -} -.v-ie6 .v-button-primary { - background-image: url(img/primary-right.png); -} -.v-ie6 .v-button-small { - background-image: url(img/small-right.png); - height: 17px; -} -.v-ie6 .v-button-small .v-button-wrap { - height: 17px; - padding: 0; -} -.v-ie6 .v-button.v-pressed { - background: transparent url(img/right-pressed.png) no-repeat 0 -1px; -} -/* Buttons on blue background */ -.v-ie6 .blue .v-button { - border-color: #84949c; - border-top-color: #83939b; - border-bottom-color: #888d91; -} -/* Buttons on black background */ -.v-ie6 .black .v-button { - border: 1px solid #0d0e0f; - background: #202224 url(img/black/right.png) no-repeat 0 -1px; - color: #c9ccce; -} -.v-ie6 .black .v-button-primary { - background-image: url(img/black/primary-right.png); -} -.v-ie6 .black .v-button-small { - background-image: url(img/black/small-right.png); -} -.v-ie6 .black .v-button.v-pressed { - background-image: url(img/black/right-pressed.png); -} - - -/* Link style button */ -.v-ie6 .v-button-link, -.v-ie6 .black .v-button-link { - background: transparent; - border: none; - height: auto; - line-height: normal; - padding: 0; -} -.v-ie6 .v-button-link .v-button-wrap, -.v-ie6 .black .v-button-link .v-button-wrap { - padding: 0; - height: auto; -}
\ No newline at end of file diff --git a/WebContent/VAADIN/themes/reindeer/button/button.css b/WebContent/VAADIN/themes/reindeer/button/button.css index 14da4facc5..1948e5aafb 100644 --- a/WebContent/VAADIN/themes/reindeer/button/button.css +++ b/WebContent/VAADIN/themes/reindeer/button/button.css @@ -7,5 +7,4 @@ @import "button-link-style.css"; /* Browser-specific corrections to the standard implementation */ -@import "button-firefox.css"; @import "button-ie.css";
\ No newline at end of file diff --git a/WebContent/VAADIN/themes/reindeer/common/common.css b/WebContent/VAADIN/themes/reindeer/common/common.css index 50dcdd84ab..ff8ae47036 100644 --- a/WebContent/VAADIN/themes/reindeer/common/common.css +++ b/WebContent/VAADIN/themes/reindeer/common/common.css @@ -44,9 +44,6 @@ height: 16px; background: transparent url(../common/icons/error.png) no-repeat 50%; } -.v-ie6 .v-errorindicator { - background-image: url(../common/icons/error-ie6.png); -} .v-tooltip { background-color: #fffcdd; border: 1px solid #b8b295; diff --git a/WebContent/VAADIN/themes/reindeer/common/icons/bullet-ie6.png b/WebContent/VAADIN/themes/reindeer/common/icons/bullet-ie6.png Binary files differdeleted file mode 100644 index 7ba2e118a6..0000000000 --- a/WebContent/VAADIN/themes/reindeer/common/icons/bullet-ie6.png +++ /dev/null diff --git a/WebContent/VAADIN/themes/reindeer/common/icons/bullet-white-ie6.png b/WebContent/VAADIN/themes/reindeer/common/icons/bullet-white-ie6.png Binary files differdeleted file mode 100644 index 9661802744..0000000000 --- a/WebContent/VAADIN/themes/reindeer/common/icons/bullet-white-ie6.png +++ /dev/null diff --git a/WebContent/VAADIN/themes/reindeer/common/icons/error-ie6.png b/WebContent/VAADIN/themes/reindeer/common/icons/error-ie6.png Binary files differdeleted file mode 100644 index dce7941157..0000000000 --- a/WebContent/VAADIN/themes/reindeer/common/icons/error-ie6.png +++ /dev/null diff --git a/WebContent/VAADIN/themes/reindeer/datefield/datefield.css b/WebContent/VAADIN/themes/reindeer/datefield/datefield.css index 7217d70576..1dbc59257a 100644 --- a/WebContent/VAADIN/themes/reindeer/datefield/datefield.css +++ b/WebContent/VAADIN/themes/reindeer/datefield/datefield.css @@ -43,13 +43,7 @@ span.v-datefield-calendarpanel-month { .v-datefield-full { min-width: 240px; } -.v-ff2 .v-datefield-month, -.v-ff2 .v-datefield-day, -.v-ff2 .v-datefield-full { - min-width: 254px; -} -.v-datefield-popupcalendar, -.v-ff2 .v-datefield-popupcalendar { +.v-datefield-popupcalendar { min-width: 0; } .v-datefield-year .v-datefield-calendarpanel { @@ -120,10 +114,6 @@ td.v-datefield-calendarpanel-nextyear { .v-ie .v-datefield-calendarpanel-nextmonth button { border: none; } -.v-ie6 .v-datefield-calendarpanel-prevmonth button, -.v-ie6 .v-datefield-calendarpanel-nextmonth button { - width: 24px; -} .v-datefield-calendarpanel-nextmonth button { background-image: url(img/month-next.png); /** sprite-ref: verticals; sprite-alignment: center */ } @@ -231,7 +221,6 @@ td.v-datefield-calendarpanel-nextyear { -moz-border-radius: 3px; } .v-sa .v-datefield-popup, -.v-ff3 .v-datefield-popup, .v-op .v-datefield-popup { background: rgba(255,255,255,.95); } @@ -289,11 +278,6 @@ td.v-datefield-calendarpanel-nextyear { background-image: url(img/popup-btn-black-pressed.png); /** sprite-ref: black-verticals */ } -/* Small adjustment for IE6 */ -.v-ie6 .v-datefield-popupcalendar .v-datefield-button { - margin-top: 1px; -} - /*------------ * on black background diff --git a/WebContent/VAADIN/themes/reindeer/formlayout/formlayout.css b/WebContent/VAADIN/themes/reindeer/formlayout/formlayout.css index a5d465a91f..b28040a0e9 100644 --- a/WebContent/VAADIN/themes/reindeer/formlayout/formlayout.css +++ b/WebContent/VAADIN/themes/reindeer/formlayout/formlayout.css @@ -6,9 +6,6 @@ height: 16px; background: transparent url(../common/icons/error.png) no-repeat 50%; } -.v-ie6 .v-formlayout-cell .v-errorindicator { - background-image: url(../common/icons/error-ie6.png); -} .v-formlayout-captioncell { text-align: right; white-space: nowrap; @@ -42,10 +39,6 @@ margin-top: 5px; min-height: 20px; } -.v-ie6 .v-form-errormessage { - height: 20px; - background-image: url(../common/icons/error-ie6.png); -} .v-form fieldset { border: none; border-top: 1px solid #babfc0; diff --git a/WebContent/VAADIN/themes/reindeer/panel/panel.css b/WebContent/VAADIN/themes/reindeer/panel/panel.css index 22e8ea5995..ac0074a9e0 100644 --- a/WebContent/VAADIN/themes/reindeer/panel/panel.css +++ b/WebContent/VAADIN/themes/reindeer/panel/panel.css @@ -36,9 +36,6 @@ background: #fff; min-height: 100%; } -.v-ie6 .v-panel-content { - background: #fff; -} .blue .v-panel-deco { border-color: #92a3ac; background: #adc2cd; @@ -64,9 +61,6 @@ display: inline-block; vertical-align: middle; } -.v-ie6 .v-panel-caption .v-errorindicator { - background-image: url(../common/icons/error-ie6.png); -} /* Light style */ .v-panel-light .v-panel-caption-light, @@ -79,9 +73,6 @@ .v-panel-content-light > div { background: transparent; } -.v-ie6 .v-panel-content-light { - background: transparent; -} .v-panel-light .v-panel-deco-light { height: 0; border: none; diff --git a/WebContent/VAADIN/themes/reindeer/select/img/black/left-black-focus-ie6.png b/WebContent/VAADIN/themes/reindeer/select/img/black/left-black-focus-ie6.png Binary files differdeleted file mode 100644 index 5cf13fac6a..0000000000 --- a/WebContent/VAADIN/themes/reindeer/select/img/black/left-black-focus-ie6.png +++ /dev/null diff --git a/WebContent/VAADIN/themes/reindeer/select/img/black/left-black-ie6.png b/WebContent/VAADIN/themes/reindeer/select/img/black/left-black-ie6.png Binary files differdeleted file mode 100644 index d06d599e0e..0000000000 --- a/WebContent/VAADIN/themes/reindeer/select/img/black/left-black-ie6.png +++ /dev/null diff --git a/WebContent/VAADIN/themes/reindeer/select/img/left-focus-ie6.png b/WebContent/VAADIN/themes/reindeer/select/img/left-focus-ie6.png Binary files differdeleted file mode 100644 index 643aac1bc9..0000000000 --- a/WebContent/VAADIN/themes/reindeer/select/img/left-focus-ie6.png +++ /dev/null diff --git a/WebContent/VAADIN/themes/reindeer/select/img/left-ie6.png b/WebContent/VAADIN/themes/reindeer/select/img/left-ie6.png Binary files differdeleted file mode 100644 index 226aea1ad1..0000000000 --- a/WebContent/VAADIN/themes/reindeer/select/img/left-ie6.png +++ /dev/null diff --git a/WebContent/VAADIN/themes/reindeer/select/select.css b/WebContent/VAADIN/themes/reindeer/select/select.css index b23e7571e2..a685e3322a 100644 --- a/WebContent/VAADIN/themes/reindeer/select/select.css +++ b/WebContent/VAADIN/themes/reindeer/select/select.css @@ -4,9 +4,6 @@ background-image: url(img/left.png); /** sprite-ref: verticals; sprite-margin-bottom: 1px */ padding-left: 2px; } -.v-ie6 .v-filterselect { - background-image: url(img/left-ie6.png); /** sprite-ref: verticals; sprite-margin-bottom: 1px */ -} .v-app .v-filterselect-input, .v-window .v-filterselect-input, .v-popupview-popup .v-filterselect-input { @@ -30,9 +27,6 @@ .v-filterselect-focus { background-image: url(img/left-focus.png); /** sprite-ref: verticals; sprite-margin-bottom: 1px */ } -.v-ie6 .v-filterselect-focus { - background-image: url(img/left-focus-ie6.png); /** sprite-ref: verticals; sprite-margin-bottom: 1px */ -} .v-filterselect-focus .v-filterselect-input { background-image: url(img/center-focus.png); /** sprite-ref: verticals; sprite-alignment: repeat */ } @@ -209,9 +203,6 @@ .black .v-filterselect { background-image: url(img/black/left-black.png); /** sprite-ref: black-verticals; sprite-margin-bottom: 1px */ } -.v-ie6 .black .v-filterselect { - background-image: url(img/black/left-black-ie6.png); /** sprite-ref: black-verticals; sprite-margin-bottom: 1px */ -} .v-app .black .v-filterselect-input, .v-window .black .v-filterselect-input, .v-window-black .v-filterselect-input, @@ -222,9 +213,6 @@ .black .v-filterselect-focus { background-image: url(img/black/left-black-focus.png); /** sprite-ref: black-verticals; sprite-margin-bottom: 1px */ } -.v-ie6 .black .v-filterselect-focus { - background-image: url(img/black/left-black-focus-ie6.png); /** sprite-ref: black-verticals; sprite-margin-bottom: 1px */ -} .black .v-filterselect-focus .v-filterselect-input { background-image: url(img/black/center-black-focus.png); /** sprite-ref: black-verticals; sprite-alignment: repeat; sprite-margin-bottom: 1px */ } @@ -265,15 +253,3 @@ background: #151717; color: #c9ccce; } - -/* Twincolselect needs a little tweak in IE6 */ -.v-ie6 .v-select-twincol-buttons .v-button { - padding-left: 12px; - padding-right: 12px; -} - -/* IE6 needs some help identifying when the input is readonly */ -.v-ie6 .v-filterselect.v-readonly, -.v-ie6 .v-filterselect .v-filterselect-input-readonly { - background: transparent; -}
\ No newline at end of file diff --git a/WebContent/VAADIN/themes/reindeer/table/table.css b/WebContent/VAADIN/themes/reindeer/table/table.css index 4768f4820d..bfbed67f93 100644 --- a/WebContent/VAADIN/themes/reindeer/table/table.css +++ b/WebContent/VAADIN/themes/reindeer/table/table.css @@ -25,24 +25,6 @@ line-height: normal; } -.v-ie6 .v-table, -.v-ie6 .v-table-header-wrap, -.v-ie6 .v-table-footer-wrap, -.v-ie6 .v-table-column-selector { - /* The header will overflow the Table due to a bug in IE6 after changes in #3003. To fix this (#7314) - * we need to apply position:relative to the wrappers and selector to make them appear on top of the - * header. We also need to apply it to the table root div to get rid of a really weird IE6 rendering bug - * caused by all this relativeness (see attachment in #7314). - */ - position: relative; -} - -.v-ie6 .v-table.v-disabled, -.v-ie7 .v-table.v-disabled { - /* Fixes ie issue #7324 where disabled shim does not cover table body */ - position: relative; -} - .v-table-footer-wrap, .white .v-table-footer-wrap { text-transform: none; diff --git a/WebContent/VAADIN/themes/reindeer/tabsheet/tabsheet-minimal-style.css b/WebContent/VAADIN/themes/reindeer/tabsheet/tabsheet-minimal-style.css index d0041e586a..dfa83d7088 100644 --- a/WebContent/VAADIN/themes/reindeer/tabsheet/tabsheet-minimal-style.css +++ b/WebContent/VAADIN/themes/reindeer/tabsheet/tabsheet-minimal-style.css @@ -105,8 +105,7 @@ .v-tabsheet-tabs-minimal .v-tabsheet-caption-close { margin-top: 1px; } -.v-ff .v-tabsheet-tabs-minimal .v-tabsheet-caption-close, -.v-ie7 .v-tabsheet-tabs-minimal .v-tabsheet-caption-close { +.v-ff .v-tabsheet-tabs-minimal .v-tabsheet-caption-close { margin-top: -15px; } .v-tabsheet-tabs-minimal .v-tabsheet-caption-close:hover, diff --git a/WebContent/VAADIN/themes/reindeer/tabsheet/tabsheet-normal-style.css b/WebContent/VAADIN/themes/reindeer/tabsheet/tabsheet-normal-style.css index 1c22a68a99..47e8b94bc7 100644 --- a/WebContent/VAADIN/themes/reindeer/tabsheet/tabsheet-normal-style.css +++ b/WebContent/VAADIN/themes/reindeer/tabsheet/tabsheet-normal-style.css @@ -52,13 +52,9 @@ font-size: 14px; font-weight: normal; } -.v-ff .v-tabsheet-caption-close, -.v-ie7 .v-tabsheet-caption-close { +.v-ff .v-tabsheet-caption-close { margin-top: -17px; } -.v-ie6 .v-tabsheet-caption-close { - float: none; -} .v-tabsheet-caption-close:hover { background-image: url(img/close-btn-hover.png); /** sprite-ref: verticals */ } @@ -108,8 +104,7 @@ .v-tabsheet-tabsheetpanel { background: #fff; } -.v-sa .v-tabsheet-content, -.v-ff3 .v-tabsheet-content { +.v-sa .v-tabsheet-content { border-color: rgba(0,0,0,.1); } .blue .v-tabsheet-deco { @@ -123,8 +118,7 @@ background: #e2e2e2; overflow: hidden; } -.v-sa .v-tabsheet-deco, -.v-ff3 .v-tabsheet-deco { +.v-sa .v-tabsheet-deco { border-top-color: rgba(0,0,0,.1); background: rgba(0,0,0,.08); } @@ -151,13 +145,6 @@ height: 16px; background: transparent url(../common/icons/error.png) no-repeat 50%; } -.v-ff2 .v-tabsheet-tabs .v-icon, -.v-ff2 .v-tabsheet-tabs .v-errorindicator { - display: -moz-inline-stack; -} -.v-ie6 .v-tabsheet-tabs .v-errorindicator { - background-image: url(../common/icons/error-ie6.png); -} .v-ie .v-tabsheet-tabs .v-errorindicator { zoom: 1; display: inline; diff --git a/WebContent/VAADIN/themes/reindeer/tabsheet/tabsheet-small-style.css b/WebContent/VAADIN/themes/reindeer/tabsheet/tabsheet-small-style.css index e440f7fdd1..c7c79d35ee 100644 --- a/WebContent/VAADIN/themes/reindeer/tabsheet/tabsheet-small-style.css +++ b/WebContent/VAADIN/themes/reindeer/tabsheet/tabsheet-small-style.css @@ -50,8 +50,7 @@ .v-tabsheet-tabs-bar .v-tabsheet-caption-close { margin-top: 1px; } -.v-ff .v-tabsheet-tabs-bar .v-tabsheet-caption-close, -.v-ie7 .v-tabsheet-tabs-bar .v-tabsheet-caption-close { +.v-ff .v-tabsheet-tabs-bar .v-tabsheet-caption-close { margin-top: -14px; } .v-tabsheet-tabs-bar .v-tabsheet-caption-close:hover { diff --git a/WebContent/VAADIN/themes/reindeer/textfield/textfield.css b/WebContent/VAADIN/themes/reindeer/textfield/textfield.css index 4c8ed4251e..eeec6bdfb1 100644 --- a/WebContent/VAADIN/themes/reindeer/textfield/textfield.css +++ b/WebContent/VAADIN/themes/reindeer/textfield/textfield.css @@ -71,14 +71,6 @@ textarea.v-textarea-prompt { margin-top: -2px; margin-bottom: -2px; } -.v-ie6 .v-table-cell-wrapper input.v-textfield { - margin-top: -2px; - margin-bottom: -2px; -} -.v-ie6 .v-table-cell-wrapper div input.v-textfield { - margin-top: 0; - margin-bottom: 0; -} /* Textfield on black background */ .black .v-textfield, .black .v-textarea { diff --git a/WebContent/VAADIN/themes/reindeer/tree/img/arrows-ie6.png b/WebContent/VAADIN/themes/reindeer/tree/img/arrows-ie6.png Binary files differdeleted file mode 100644 index e016e313a7..0000000000 --- a/WebContent/VAADIN/themes/reindeer/tree/img/arrows-ie6.png +++ /dev/null diff --git a/WebContent/VAADIN/themes/reindeer/tree/tree.css b/WebContent/VAADIN/themes/reindeer/tree/tree.css index 63ac914fdf..f72f61c545 100644 --- a/WebContent/VAADIN/themes/reindeer/tree/tree.css +++ b/WebContent/VAADIN/themes/reindeer/tree/tree.css @@ -1,13 +1,6 @@ .v-tree-node { background: transparent url(img/arrows.png) no-repeat 6px -10px; } -.v-ie6 .v-tree-node { - background-image: url(img/arrows-ie6.png); - background-repeat: no-repeat; -} -.v-ie6 div.v-tree-node-leaf { - background: transparent; -} .v-tree-node-expanded { background-position: -7px 5px; } @@ -32,12 +25,6 @@ .v-tree-node-children { padding-left: 16px; } -/* IMPORTANT keep the offsetWidth (width + padding) of this element the same as the margin-left of v-tree-node-caption */ -.v-ie6 .v-tree-node-ie6compatnode { - width: 14px; - height: 10px; - padding: 1px; -} .v-tree-node-caption.v-tree-node-focused span{ padding-left: 1px; padding-top: 0px; @@ -46,9 +33,6 @@ .v-tree-node-focused span{ border: 1px dotted black; } -.v-ie6 .v-tree-node-ie6compatnode.v-tree-node-focused{ - padding-left: 0px; -} /*************************************** * Drag'n'drop styles ***************************************/ diff --git a/WebContent/VAADIN/themes/reindeer/window/img/black/content-bg-ie6.png b/WebContent/VAADIN/themes/reindeer/window/img/black/content-bg-ie6.png Binary files differdeleted file mode 100644 index 8ff06a11ed..0000000000 --- a/WebContent/VAADIN/themes/reindeer/window/img/black/content-bg-ie6.png +++ /dev/null diff --git a/WebContent/VAADIN/themes/reindeer/window/img/black/header-bg-ie6.png b/WebContent/VAADIN/themes/reindeer/window/img/black/header-bg-ie6.png Binary files differdeleted file mode 100644 index ddfc27f6e6..0000000000 --- a/WebContent/VAADIN/themes/reindeer/window/img/black/header-bg-ie6.png +++ /dev/null diff --git a/WebContent/VAADIN/themes/reindeer/window/img/black/resize-ie6.png b/WebContent/VAADIN/themes/reindeer/window/img/black/resize-ie6.png Binary files differdeleted file mode 100644 index 011b64a918..0000000000 --- a/WebContent/VAADIN/themes/reindeer/window/img/black/resize-ie6.png +++ /dev/null diff --git a/WebContent/VAADIN/themes/reindeer/window/window.css b/WebContent/VAADIN/themes/reindeer/window/window.css index 5b3997f444..25829b2f2b 100644 --- a/WebContent/VAADIN/themes/reindeer/window/window.css +++ b/WebContent/VAADIN/themes/reindeer/window/window.css @@ -5,30 +5,9 @@ border: 1px solid #808386; } .v-sa .v-window-wrap, -.v-ff3 .v-window-wrap, .v-op .v-window-wrap { border-color: rgba(0,0,0,.2); } -.v-ff2 .v-window-wrap, -.v-ie6 .v-window-wrap { - border: none; -} -.v-ff2 .v-window-outerheader, -.v-ie6 .v-window-outerheader { - border: 1px solid #808386; - border-bottom: none; -} -.v-ff2 .v-window-contents, -.v-ie6 .v-window-contents { - border: 1px solid #808386; - border-top: none; - border-bottom: none; -} -.v-ff2 .v-window-footer, -.v-ie6 .v-window-footer { - border: 1px solid #808386; - border-top: none; -} .v-window-outerheader { padding: 12px 32px 0 14px; height: 25px; @@ -50,9 +29,6 @@ padding-left: 13px; background: transparent url(../common/icons/error.png) no-repeat 0 50%; } -.v-ie6 .v-window-error .v-window-header { - background-image: url(../common/icons/error-ie6.png); -} .v-window-resizebox { width: 15px; height: 15px; @@ -136,12 +112,6 @@ background: #f7f7f8 repeat-x; background-image: url(img/content-bg-light.png); /** sprite-ref: verticals; sprite-alignment: repeat */ } -.v-ie6 .v-window-light .v-window-wrap2 { - background-image: none; -} - - - /** @@ -156,7 +126,6 @@ overflow: hidden; } .v-sa .v-window-black .v-window-wrap, -.v-ff3 .v-window-black .v-window-wrap, .v-op .v-window-black .v-window-wrap { border-color: rgba(0,0,0,.8); } @@ -166,7 +135,6 @@ -webkit-border-radius: 7px; } .v-sa .v-window-black .v-window-wrap2, -.v-ff3 .v-window-black .v-window-wrap2, .v-op .v-window-black .v-window-wrap2 { background-color: rgba(29,32,33,.9); } @@ -203,12 +171,6 @@ width: 14px; height: 14px; } -.v-ie6 .v-window-black .v-window-resizebox { - background-image: url(img/black/resize-ie6.png); /** sprite-ref: black-verticals; sprite-margin-bottom: 4px */ -} -.v-ie6 .v-window-black .v-window-contents { - background: transparent url(img/black/content-bg-ie6.png) repeat-x; -} /* Must be last to make this image last in the sprites */ .v-window-black .v-window-contents { border: none; diff --git a/WebContent/VAADIN/themes/runo/button/button.css b/WebContent/VAADIN/themes/runo/button/button.css index c196841ad3..530c981436 100644 --- a/WebContent/VAADIN/themes/runo/button/button.css +++ b/WebContent/VAADIN/themes/runo/button/button.css @@ -56,12 +56,6 @@ text-overflow: ellipsis;
}
-.v-ie7 .v-button .v-button-wrap {
- overflow: visible;
-}
-
-
-
/* Small style */
.v-button-small .v-button-wrap,
.v-disabled.v-button-small .v-button-wrap {
@@ -160,13 +154,3 @@ .v-checkbox .v-errorindicator {
padding-left: 10px;
} -.v-ie6 .v-checkbox .v-errorindicator {
- padding-right: 4px;
- } -.v-ie7 .v-checkbox .v-errorindicator {
- padding-right: 7px;
- } -.v-ie6 .v-button .v-errorindicator,
-.v-ie7 .v-button .v-errorindicator {
- padding-right: 5px;
- }
\ No newline at end of file diff --git a/WebContent/VAADIN/themes/runo/caption/caption.css b/WebContent/VAADIN/themes/runo/caption/caption.css index d5be467822..93d7874665 100644 --- a/WebContent/VAADIN/themes/runo/caption/caption.css +++ b/WebContent/VAADIN/themes/runo/caption/caption.css @@ -6,10 +6,3 @@ height: 16px; background: transparent url(../icons/16/error.png) no-repeat top right; } -.v-ie6 .v-errorindicator { - /* gif for transparency */ - background-image: url(../icons/16/error.gif); -} -.v-ie7 .v-errorindicator { - margin-left: -3px; -}
\ No newline at end of file diff --git a/WebContent/VAADIN/themes/runo/datefield/datefield.css b/WebContent/VAADIN/themes/runo/datefield/datefield.css index 0b65fd9054..5b80a0a5db 100644 --- a/WebContent/VAADIN/themes/runo/datefield/datefield.css +++ b/WebContent/VAADIN/themes/runo/datefield/datefield.css @@ -143,9 +143,3 @@ td.v-datefield-calendarpanel-month { color: #999; font-style: normal; } -/* IE specific styles */ -.v-ie7 .v-datefield-button { - background-position: right 1px; - height: 25px; - margin: 0; -}
\ No newline at end of file diff --git a/WebContent/VAADIN/themes/runo/formlayout/formlayout.css b/WebContent/VAADIN/themes/runo/formlayout/formlayout.css index fa4a7bde63..466baafd8c 100644 --- a/WebContent/VAADIN/themes/runo/formlayout/formlayout.css +++ b/WebContent/VAADIN/themes/runo/formlayout/formlayout.css @@ -36,9 +36,6 @@ margin-top: 5px; min-height: 20px; } -.v-ie6 .v-form-errormessage { - height: 20px -} .v-form fieldset { border: none; border-top: 1px solid #babfc0; diff --git a/WebContent/VAADIN/themes/runo/panel/panel.css b/WebContent/VAADIN/themes/runo/panel/panel.css index 8fcfcaf100..138fb07f9c 100644 --- a/WebContent/VAADIN/themes/runo/panel/panel.css +++ b/WebContent/VAADIN/themes/runo/panel/panel.css @@ -67,38 +67,12 @@ overflow: hidden; } /* IE specific rules */ -.v-ie6 .v-panel { - background: transparent; -} -.v-ie6 .v-panel-caption { - border: 1px solid #babfc0; - border-bottom: none; - background: #fff; - margin: 0; - padding-left: 18px -} -.v-ie6 .v-panel-nocaption { - border: none; - background: transparent; - margin: 0; - height: 0; -} -.v-ie6 .v-panel-caption-light { - border: none; - background: transparent; -} -.v-ie6 .v-panel-content, -.v-ie7 .v-panel-content, .v-ie8 .v-panel-content { border-bottom: 1px solid #babfc0; } -.v-ie6 .v-panel-content-light, -.v-ie7 .v-panel-content-light, .v-ie8 .v-panel-content-light { border-bottom: none; } -.v-ie6 .v-panel-deco, -.v-ie7 .v-panel-deco, .v-ie8 .v-panel-deco { height: 0; overflow: hidden; diff --git a/WebContent/VAADIN/themes/runo/select/select.css b/WebContent/VAADIN/themes/runo/select/select.css index ad1744288a..5ea1dad783 100644 --- a/WebContent/VAADIN/themes/runo/select/select.css +++ b/WebContent/VAADIN/themes/runo/select/select.css @@ -127,12 +127,6 @@ border-top: 1px solid #b6bbbc; } -/* IE6 needs some help identifying when the input is readonly */ -.v-ie6 .v-filterselect.v-readonly, -.v-ie6 .v-filterselect .v-filterselect-input-readonly { - background: transparent; -} - /* Error styles (disabled by default) ---------------------------------- diff --git a/WebContent/VAADIN/themes/runo/slider/slider.css b/WebContent/VAADIN/themes/runo/slider/slider.css index 07b10dfa17..698d15de90 100644 --- a/WebContent/VAADIN/themes/runo/slider/slider.css +++ b/WebContent/VAADIN/themes/runo/slider/slider.css @@ -68,16 +68,3 @@ background-color: #FFE0E0; } */ - -/* IE specific styles */ - -.v-ie6 .v-slider, -.v-ie6 .v-slider-vertical { - margin: 0; -} -.v-ie6 .v-slider .v-slider-handle { - margin: -1px 0; -} -.v-ie6 .v-slider-vertical .v-slider-handle { - margin: 0 -1px; -}
\ No newline at end of file diff --git a/WebContent/VAADIN/themes/runo/splitpanel/splitpanel.css b/WebContent/VAADIN/themes/runo/splitpanel/splitpanel.css index c74ab257ba..d7851c27e6 100644 --- a/WebContent/VAADIN/themes/runo/splitpanel/splitpanel.css +++ b/WebContent/VAADIN/themes/runo/splitpanel/splitpanel.css @@ -6,13 +6,11 @@ .v-splitpanel-hsplitter, .v-splitpanel-hsplitter-locked { width: 6px; - font-size: 1px; /* for IE6 */ } .v-splitpanel-hsplitter div, .v-splitpanel-hsplitter-locked div { width: 6px; - font-size: 1px; /* for IE6 */ position: absolute; top: 0; bottom: 0; @@ -24,35 +22,16 @@ .v-splitpanel-vsplitter, .v-splitpanel-vsplitter-locked { height: 6px; - font-size: 1px; /* for IE6 */ } .v-splitpanel-vsplitter div, .v-splitpanel-vsplitter-locked div { height: 6px; - font-size: 1px; /* for IE6 */ background: #ccd2d0 url(img/bg_ver.png); border: 1px solid #b6bbbc; margin: -1px 0; } -/* IE6 specific styles */ - -.v-ie6 .v-splitpanel-hsplitter div, -.v-ie6 .v-splitpanel-hsplitter-locked div { - height: 99%; -} - -.v-ie6 .v-splitpanel-vsplitter, -.v-ie6 .v-splitpanel-vsplitter-locked { - height: 8px; -} - -.v-ie6 .v-splitpanel-vsplitter div, -.v-ie6 .v-splitpanel-vsplitter-locked div { - margin: 0; -} - /* Rounded style */ .v-splitpanel-hsplitter-rounded div, @@ -72,10 +51,6 @@ .v-splitpanel-vsplitter-rounded-locked div { margin: -1px 4px; } -.v-ie6 .v-splitpanel-hsplitter-rounded div, -.v-ie6 .v-splitpanel-hsplitter-rounded-locked div { - height: 97%; -} /* Small style */ diff --git a/WebContent/VAADIN/themes/runo/table/table.css b/WebContent/VAADIN/themes/runo/table/table.css index 8c82a6f3e8..42f93752be 100644 --- a/WebContent/VAADIN/themes/runo/table/table.css +++ b/WebContent/VAADIN/themes/runo/table/table.css @@ -28,10 +28,6 @@ text-shadow: #ffffff 0 1px 0; margin-left: 4px; } -.v-ie7 .v-table-caption-container-align-right { - margin-left: 0px; - padding-left: 0px; -} .v-table-sort-indicator { width: 0; height: 36px; @@ -158,20 +154,6 @@ tr.v-table-row-odd:hover { .v-table .v-link { display: inline; } -/* IE6 hack */ -.v-ie6 .v-table-scrollposition { - background: transparent; - /* - AlphaImageLoader uses src attribute relative to host page, not CSS - We need multiple different filters because we cannot be sure how host page is served compared to theme resources - TODO: This actually does not work as expected, since only the last filter is applied. Can we chain filters together (i.e. contain all versions on one line)? - */ - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../../VAADIN/themes/default/table/img/scroll-position-bg.png", sizingMethod="scale"); - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../VAADIN/themes/default/table/img/scroll-position-bg.png", sizingMethod="scale"); - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="VAADIN/themes/default/table/img/scroll-position-bg.png", sizingMethod="scale"); - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="/VAADIN/themes/default/table/img/scroll-position-bg.png", sizingMethod="scale"); -} - /* Borderless style */ .v-table-borderless .v-table-header-wrap, diff --git a/WebContent/VAADIN/themes/runo/tabsheet/tabsheet.css b/WebContent/VAADIN/themes/runo/tabsheet/tabsheet.css index 9c224cb84f..9c6559b0f3 100644 --- a/WebContent/VAADIN/themes/runo/tabsheet/tabsheet.css +++ b/WebContent/VAADIN/themes/runo/tabsheet/tabsheet.css @@ -132,24 +132,6 @@ padding-top: 12px; }*/ /* IE specific styles */ -.v-ie6 .v-tabsheet-tabs { - height: 46px; -} -.v-ie6 .v-tabsheet-tabitem-selected { - border: 1px solid #babfc0; - border-bottom: none; - background: #fff; - margin-top: 0; - height: 23px; - padding: 18px 14px 6px 15px; - cursor: default; - color: #ee5311; -} -.v-ie6 .v-tabsheet-tabitem-selected .v-caption { - background: transparent; - padding: 0; - margin: 0; -} .v-ie .v-tabsheet-content { border-bottom: none; } @@ -159,7 +141,6 @@ overflow: hidden; margin: 0; } -.v-ie7 .v-tabsheet-deco, .v-ie8 .v-tabsheet-deco, .v-ie9 .v-tabsheet-deco { width: 100%; @@ -267,23 +248,6 @@ margin-left: -3px; padding-left: 3px; }*/ -/* IE specific styles */ -.v-ie6 .v-tabsheet-tabs-light, -.v-ie7 .v-tabsheet-tabs-light { - height: 32px; -} -.v-ie6 .v-tabsheet-tabs-light .v-tabsheet-tabitem-selected, -.v-ie7 .v-tabsheet-tabs-light .v-tabsheet-tabitem-selected { - border: none; - background: #fff url(img/inline-tab-right.png) no-repeat right top; - padding: 0; - height: 32px; -} -.v-ie6 .v-tabsheet-tabs-light .v-tabsheet-tabitem-selected .v-caption, -.v-ie7 .v-tabsheet-tabs-light .v-tabsheet-tabitem-selected .v-caption { - background: transparent url(img/inline-tab-left.png) no-repeat -7px 0; - padding: 9px 11px 0 11px; -} .v-ie .v-tabsheet-deco-light { height: 0; }
\ No newline at end of file diff --git a/WebContent/VAADIN/themes/runo/tree/tree.css b/WebContent/VAADIN/themes/runo/tree/tree.css index 03c8a0d829..14061b8afb 100644 --- a/WebContent/VAADIN/themes/runo/tree/tree.css +++ b/WebContent/VAADIN/themes/runo/tree/tree.css @@ -30,12 +30,6 @@ .v-tree-node-children { padding-left: 16px; } -/* IMPORTANT keep the offsetWidth (width + padding) of this element the same as the margin-left of v-tree-node-caption */ -.v-ie6 .v-tree-node-ie6compatnode { - width: 14px; - height: 10px; - padding: 1px; -} .v-tree{ outline:none; } @@ -47,9 +41,6 @@ .v-tree-node-focused span{ border: 1px dotted black; } -.v-ie6 .v-tree-node-ie6compatnode.v-tree-node-focused{ - padding-left: 0px; -} /*************************************** * Drag'n'drop styles ***************************************/ diff --git a/WebContent/VAADIN/themes/runo/window/window.css b/WebContent/VAADIN/themes/runo/window/window.css index 81509146aa..210bccb9b9 100644 --- a/WebContent/VAADIN/themes/runo/window/window.css +++ b/WebContent/VAADIN/themes/runo/window/window.css @@ -21,7 +21,6 @@ letter-spacing: -0.03em; color: #f14c1a; text-shadow: 0 1px 0 #fff; - /* This element is 100% wide in IE6 */ } .v-window-contents { background: #fff; @@ -35,12 +34,7 @@ background: transparent url(img/bottom-right.png) no-repeat right bottom; overflow: visible; } -.v-ie7 .v-window-footer { - position: relative; - overflow: visible; -} -.v-window-resizebox, -.v-ie7 .v-window-resizebox { +.v-window-resizebox { position: absolute; /* Needed to position the element over ScrollPanel, which is relatively positioned */ right: 5px; width: 10px; diff --git a/build/GWT-VERSION.properties b/build/GWT-VERSION.properties new file mode 100644 index 0000000000..028ad8b4de --- /dev/null +++ b/build/GWT-VERSION.properties @@ -0,0 +1,2 @@ +gwt-version=2.4.0 +gwt-version-dependencies=validation-api-1.0.0.GA.jar, validation-api-1.0.0.GA-sources.jar diff --git a/build/VERSION.properties b/build/VERSION.properties new file mode 100644 index 0000000000..ce706c5d02 --- /dev/null +++ b/build/VERSION.properties @@ -0,0 +1 @@ +version=7.0.0
\ No newline at end of file diff --git a/build/build.properties b/build/build.properties index 82378c6dac..df8e6e77a8 100644 --- a/build/build.properties +++ b/build/build.properties @@ -10,10 +10,8 @@ snapshot.repository.url=http://oss.sonatype.org/content/repositories/vaadin-snap # These are required when compiling WebContent/VAADIN/widgetsets (and also # Java server-side classes). -# Using special -noservlet packages to be able to use a different version of -# the servlet specification than what the GWT JARs include. -lib-gwt-dev=${gwt-dir}/gwt-dev-noservlet.jar -lib-gwt-user=${gwt-dir}/gwt-user-noservlet.jar +lib-gwt-dev=${gwt-dir}/gwt-dev.jar +lib-gwt-user=${gwt-dir}/gwt-user.jar # FIXME: Should use ${gwt-version-dependencies} lib-gwt-validation=${gwt-dir}/validation-api-1.0.0.GA.jar lib-gwt-validation-src=${gwt-dir}/validation-api-1.0.0.GA-sources.jar diff --git a/build/build.xml b/build/build.xml index a94fa143ac..b62db3d57e 100644 --- a/build/build.xml +++ b/build/build.xml @@ -70,23 +70,11 @@ <echo>Java version is ${ant.java.version} as required.</echo> </target> - <!-- Check Servlet API version. --> - <!-- We must use Servlet API 2.3 to catch incompatibilities.. --> - <target name="check-servlet-version"> - <available classpathref="compile.classpath" classname="javax.servlet.Servlet" property="servlet.available"/> - <fail unless="servlet.available" message="Java Servlet API library is not available."/> - <echo>Java Servlet API is available.</echo> - - <available classpathref="compile.classpath" classname="javax.servlet.ServletRequestListener" property="servlet.version.is-2.4"/> - <fail if="servlet.version.is-2.4" message="Java Servlet API 2.4 or later detected. Vaadin must be compiled exactly with Servlet API 2.3."/> - <echo>Java Servlet API specification 2.3 used.</echo> - </target> - <!-- ================================================================== --> <!-- Initialization - - - - - - - - - - - - - - - - - - - - - - - - - - --> <!-- ================================================================== --> - <target name="init" depends="check-java-version"> + <target name="init"> <!-- Current timestamp in different formats. --> <tstamp> <format property="build.date" pattern="yyyy-MM-dd"/> @@ -163,8 +151,6 @@ <!-- Exclude these as they contain Servlet API 2.4. --> <!-- The gwt-*-noservlet.jar are then used instead. --> <exclude name="**/servlet-api*.jar"/> - <exclude name="**/gwt-dev.jar"/> - <exclude name="**/gwt-user.jar"/> </fileset> <fileset dir="lib/tests"> <include name="**/*.jar"/> @@ -429,7 +415,7 @@ </copy> </target> - <target name="compile-java" depends="init, check-servlet-version, webcontent"> + <target name="compile-java" depends="init, webcontent"> <echo>Compiling src (server-side)</echo> <!-- Compile all sources at the same time as they depend on each other --> @@ -800,7 +786,7 @@ <tstamp> <format property="nightly.date" pattern="yyyyMMdd"/> </tstamp> - <property name="version.full" value="${version}.${build.tag}-${nightly.date}-c${build.number}"/> + <property name="version.full" value="${version}.${build.tag}-${nightly.date}-${build.number}"/> <echo>Version will be: ${version.full}</echo> diff --git a/build/buildhelpers/com/vaadin/buildhelpers/CompileDefaultTheme.java b/build/buildhelpers/com/vaadin/buildhelpers/CompileDefaultTheme.java index 15d2acf6e9..0f7ec4a14b 100644 --- a/build/buildhelpers/com/vaadin/buildhelpers/CompileDefaultTheme.java +++ b/build/buildhelpers/com/vaadin/buildhelpers/CompileDefaultTheme.java @@ -224,9 +224,8 @@ public class CompileDefaultTheme { private static void createSprites(String themeName) throws FileNotFoundException, IOException { String[] parameters = new String[] { "--sprite-png-depth", "AUTO", - "--sprite-png-ie6", "--css-file-suffix", "-sprite", - "--css-file-encoding", "UTF-8", "--root-dir-path", - THEME_DIR + themeName, "--log-level", "WARN" }; + "--css-file-suffix", "-sprite", "--css-file-encoding", "UTF-8", + "--root-dir-path", THEME_DIR + themeName, "--log-level", "WARN" }; org.carrot2.labs.smartsprites.SmartSprites.main(parameters); diff --git a/src/com/vaadin/Application.java b/src/com/vaadin/Application.java index 39a70fe27f..f751431e63 100644 --- a/src/com/vaadin/Application.java +++ b/src/com/vaadin/Application.java @@ -1384,7 +1384,7 @@ public abstract class Application implements URIHandler, } /** - * @return + * @return * "Take note of any unsaved data, and <u>click here</u> to continue." */ public String getSessionExpiredMessage() { @@ -1416,7 +1416,7 @@ public abstract class Application implements URIHandler, } /** - * @return + * @return * "Take note of any unsaved data, and <u>click here</u> to continue." */ public String getCommunicationErrorMessage() { @@ -1448,7 +1448,7 @@ public abstract class Application implements URIHandler, } /** - * @return + * @return * "Take note of any unsaved data, and <u>click here</u> to continue." */ public String getAuthenticationErrorMessage() { diff --git a/src/com/vaadin/terminal/gwt/DefaultWidgetSet.gwt.xml b/src/com/vaadin/terminal/gwt/DefaultWidgetSet.gwt.xml index 1c9b459512..c6c6bf531d 100644 --- a/src/com/vaadin/terminal/gwt/DefaultWidgetSet.gwt.xml +++ b/src/com/vaadin/terminal/gwt/DefaultWidgetSet.gwt.xml @@ -18,12 +18,6 @@ <when-type-is class="com.google.gwt.core.client.impl.SchedulerImpl" /> </replace-with> - <!-- Use our own history impl for IE to workaround #2931. --> - <replace-with class="com.vaadin.terminal.gwt.client.HistoryImplIEVaadin"> - <when-type-is class="com.google.gwt.user.client.impl.HistoryImpl" /> - <when-property-is name="user.agent" value="ie6" /> - </replace-with> - <generate-with class="com.vaadin.terminal.gwt.widgetsetutils.EagerWidgetMapGenerator"> <when-type-is class="com.vaadin.terminal.gwt.client.WidgetMap" /> @@ -57,7 +51,6 @@ <when-type-is class="com.vaadin.terminal.gwt.client.ui.VDragAndDropWrapper" /> <any> - <when-property-is name="user.agent" value="ie6" /> <when-property-is name="user.agent" value="ie8" /> </any> </replace-with> diff --git a/src/com/vaadin/terminal/gwt/client/ApplicationConfiguration.java b/src/com/vaadin/terminal/gwt/client/ApplicationConfiguration.java index 6787b36022..15a025937d 100644 --- a/src/com/vaadin/terminal/gwt/client/ApplicationConfiguration.java +++ b/src/com/vaadin/terminal/gwt/client/ApplicationConfiguration.java @@ -361,7 +361,7 @@ public class ApplicationConfiguration implements EntryPoint { cmd.execute(); } callbacks.clear(); - } else if(widgetsLoading == 0 && deferredWidgetLoader != null) { + } else if (widgetsLoading == 0 && deferredWidgetLoader != null) { deferredWidgetLoader.trigger(); } @@ -377,17 +377,17 @@ public class ApplicationConfiguration implements EntryPoint { int communicationFree = 0; int nextWidgetIndex = 0; private boolean pending; - + public DeferredWidgetLoader() { schedule(5000); } public void trigger() { - if(!pending) { + if (!pending) { schedule(FREE_CHECK_TIMEOUT); } } - + @Override public void schedule(int delayMillis) { super.schedule(delayMillis); @@ -438,15 +438,11 @@ public class ApplicationConfiguration implements EntryPoint { return communicationFree < FREE_LIMIT; } } - + private static DeferredWidgetLoader deferredWidgetLoader; - + public void onModuleLoad() { - // Enable IE6 Background image caching - if (BrowserInfo.get().isIE6()) { - enableIE6BackgroundImageCache(); - } // Prepare VConsole for debugging if (isDebugMode()) { VDebugConsole console = GWT.create(VDebugConsole.class); @@ -476,19 +472,6 @@ public class ApplicationConfiguration implements EntryPoint { startNextApplication(); } - // From ImageSrcIE6 - private static native void enableIE6BackgroundImageCache() - /*-{ - // Fix IE background image refresh bug, present through IE6 - // see http://www.mister-pixel.com/#Content__state=is_that_simple - // this only works with IE6 SP1+ - try { - $doc.execCommand("BackgroundImageCache", false, true); - } catch (e) { - // ignore error on other browsers - } - }-*/; - /** * Checks if client side is in debug mode. Practically this is invoked by * adding ?debug parameter to URI. diff --git a/src/com/vaadin/terminal/gwt/client/ApplicationConnection.java b/src/com/vaadin/terminal/gwt/client/ApplicationConnection.java index 18ccd363a8..5e0f420d49 100644 --- a/src/com/vaadin/terminal/gwt/client/ApplicationConnection.java +++ b/src/com/vaadin/terminal/gwt/client/ApplicationConnection.java @@ -2332,19 +2332,6 @@ public class ApplicationConnection { } - /** - * Adds PNG-fix conditionally (only for IE6) to the specified IMG -element. - * - * @param el - * the IMG element to fix - */ - public void addPngFix(Element el) { - BrowserInfo b = BrowserInfo.get(); - if (b.isIE6()) { - Util.addPngFix(el); - } - } - /* * Helper to run layout functions triggered by child components with a * decent interval. diff --git a/src/com/vaadin/terminal/gwt/client/BrowserInfo.java b/src/com/vaadin/terminal/gwt/client/BrowserInfo.java index 3c908556fa..4c9be79787 100644 --- a/src/com/vaadin/terminal/gwt/client/BrowserInfo.java +++ b/src/com/vaadin/terminal/gwt/client/BrowserInfo.java @@ -192,14 +192,6 @@ public class BrowserInfo { return isSafari() && browserDetails.getBrowserMajorVersion() == 4; } - public boolean isIE6() { - return isIE() && browserDetails.getBrowserMajorVersion() == 6; - } - - public boolean isIE7() { - return isIE() && browserDetails.getBrowserMajorVersion() == 7; - } - public boolean isIE8() { return isIE() && browserDetails.getBrowserMajorVersion() == 8; } @@ -220,23 +212,6 @@ public class BrowserInfo { return browserDetails.isWebKit(); } - public boolean isFF2() { - // FIXME: Should use browserVersion - return browserDetails.isFirefox() - && browserDetails.getBrowserEngineVersion() == 1.8; - } - - public boolean isFF3() { - // FIXME: Should use browserVersion - return browserDetails.isFirefox() - && browserDetails.getBrowserEngineVersion() == 1.9; - } - - public boolean isFF4() { - return browserDetails.isFirefox() - && browserDetails.getBrowserMajorVersion() == 4; - } - /** * Returns the Gecko version if the browser is Gecko based. The Gecko * version for Firefox 2 is 1.8 and 1.9 for Firefox 3. diff --git a/src/com/vaadin/terminal/gwt/client/HistoryImplIEVaadin.java b/src/com/vaadin/terminal/gwt/client/HistoryImplIEVaadin.java deleted file mode 100644 index f0ad3d561a..0000000000 --- a/src/com/vaadin/terminal/gwt/client/HistoryImplIEVaadin.java +++ /dev/null @@ -1,192 +0,0 @@ -/* -@ITMillApache2LicenseForJavaFiles@ - */ -/* - * Copyright 2008 Google 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 com.vaadin.terminal.gwt.client; - -import com.google.gwt.user.client.DOM; -import com.google.gwt.user.client.Element; -import com.google.gwt.user.client.impl.HistoryImpl; - -/** - * A slightly modified version of GWT's HistoryImplIE6 to bypass bug #2931. Also - * combined with HistoryImplFrame. - * - * This class should be removed if GWT issue 3890 gets resolved. (Also remember - * to removed deferred binding rule from .gwt.xml file). - */ -public class HistoryImplIEVaadin extends HistoryImpl { - - private static native Element findHistoryFrame() - /*-{ - return $doc.getElementById('__gwt_historyFrame'); - }-*/; - - private static native Element getTokenElement(Element historyFrame) - /*-{ - // Initialize the history iframe. If '__gwt_historyToken' already exists, then - // we're probably backing into the app, so _don't_ set the iframe's location. - if (historyFrame.contentWindow) { - var doc = historyFrame.contentWindow.document; - return doc.getElementById('__gwt_historyToken'); - } - }-*/; - - protected Element historyFrame; - - @Override - protected final void nativeUpdate(String historyToken) { - /* - * Must update the location hash since it isn't already correct. - */ - updateHash(historyToken); - navigateFrame(historyToken); - } - - @Override - protected final void nativeUpdateOnEvent(String historyToken) { - updateHash(historyToken); - } - - /** - * Sanitizes an untrusted string to be used in an HTML context. NOTE: This - * method of escaping strings should only be used on Internet Explorer. - * - * @param maybeHtml - * untrusted string that may contain html - * @return sanitized string - */ - private static String escapeHtml(String maybeHtml) { - final Element div = DOM.createDiv(); - DOM.setInnerText(div, maybeHtml); - return DOM.getInnerHTML(div); - } - - /** - * For IE6, reading from $wnd.location.hash drops part of the fragment if - * the fragment contains a '?'. To avoid this bug, we use location.href - * instead. - */ - private static native String getLocationHash() - /*-{ - var href = $wnd.location.href; - var hashLoc = href.lastIndexOf("#"); - return (hashLoc > 0) ? href.substring(hashLoc) : ""; - }-*/; - - @Override - public boolean init() { - historyFrame = findHistoryFrame(); - if (historyFrame == null) { - return false; - } - - initHistoryToken(); - - // Initialize the history iframe. If a token element already exists, - // then - // we're probably backing into the app, so _don't_ create a new item. - Element tokenElement = getTokenElement(historyFrame); - if (tokenElement != null) { - setToken(getTokenElementContent(tokenElement)); - } else { - navigateFrame(getToken()); - } - - injectGlobalHandler(); - - initUrlCheckTimer(); - return true; - } - - protected native String getTokenElementContent(Element tokenElement) - /*-{ - return tokenElement.innerText; - }-*/; - - protected native void initHistoryToken() - /*-{ - // Assume an empty token. - var token = ''; - // Get the initial token from the url's hash component. - var hash = @com.vaadin.terminal.gwt.client.HistoryImplIEVaadin::getLocationHash()(); - if (hash.length > 0) { - try { - token = this.@com.google.gwt.user.client.impl.HistoryImpl::decodeFragment(Ljava/lang/String;)(hash.substring(1)); - } catch (e) { - // Clear the bad hash (this can't have been a valid token). - $wnd.location.hash = ''; - } - } - @com.google.gwt.user.client.impl.HistoryImpl::setToken(Ljava/lang/String;)(token); - }-*/; - - protected native void injectGlobalHandler() - /*-{ - var historyImplRef = this; - - $wnd.__gwt_onHistoryLoad = function(token) { - historyImplRef.@com.google.gwt.user.client.impl.HistoryImpl::newItemOnEvent(Ljava/lang/String;)(token); - }; - }-*/; - - protected native void navigateFrame(String token) - /*-{ - var escaped = @com.vaadin.terminal.gwt.client.HistoryImplIEVaadin::escapeHtml(Ljava/lang/String;)(token); - var doc = this.@com.vaadin.terminal.gwt.client.HistoryImplIEVaadin::historyFrame.contentWindow.document; - doc.open(); - doc.write('<html><body onload="if(parent.__gwt_onHistoryLoad)parent.__gwt_onHistoryLoad(__gwt_historyToken.innerText)"><div id="__gwt_historyToken">' + escaped + '</div></body></html>'); - doc.close(); - }-*/; - - protected native void updateHash(String token) - /*-{ - $wnd.location.hash = this.@com.google.gwt.user.client.impl.HistoryImpl::encodeFragment(Ljava/lang/String;)(token); - }-*/; - - private native void initUrlCheckTimer() - /*-{ - // This is the URL check timer. It detects when an unexpected change - // occurs in the document's URL (e.g. when the user enters one manually - // or selects a 'favorite', but only the #hash part changes). When this - // occurs, we _must_ reload the page. This is because IE has a really - // nasty bug that totally mangles its history stack and causes the location - // bar in the UI to stop working under these circumstances. - var historyImplRef = this; - var urlChecker = function() { - $wnd.setTimeout(urlChecker, 250); - var hash = @com.vaadin.terminal.gwt.client.HistoryImplIEVaadin::getLocationHash()(); - if (hash.length > 0) { - var token = ''; - try { - token = historyImplRef.@com.google.gwt.user.client.impl.HistoryImpl::decodeFragment(Ljava/lang/String;)(hash.substring(1)); - } catch (e) { - // If there's a bad hash, always reload. This could only happen if - // if someone entered or linked to a bad url. - $wnd.location.reload(); - } - - var historyToken = @com.google.gwt.user.client.impl.HistoryImpl::getToken()(); - if (token != historyToken) { - $wnd.location.reload(); - } - } - }; - urlChecker(); - }-*/; - -} diff --git a/src/com/vaadin/terminal/gwt/client/Util.java b/src/com/vaadin/terminal/gwt/client/Util.java index bd46871902..3601f385b1 100644 --- a/src/com/vaadin/terminal/gwt/client/Util.java +++ b/src/com/vaadin/terminal/gwt/client/Util.java @@ -11,10 +11,8 @@ import java.util.Iterator; import java.util.Map; import java.util.Set; -import com.google.gwt.core.client.GWT; import com.google.gwt.core.client.Scheduler; import com.google.gwt.core.client.Scheduler.ScheduledCommand; -import com.google.gwt.dom.client.DivElement; import com.google.gwt.dom.client.Document; import com.google.gwt.dom.client.NativeEvent; import com.google.gwt.dom.client.Node; @@ -196,48 +194,6 @@ public class Util { return null; } - /** - * Detects if current browser is IE. - * - * @deprecated use BrowserInfo class instead - * - * @return true if IE - */ - @Deprecated - public static boolean isIE() { - return BrowserInfo.get().isIE(); - } - - /** - * Detects if current browser is IE6. - * - * @deprecated use BrowserInfo class instead - * - * @return true if IE6 - */ - @Deprecated - public static boolean isIE6() { - return BrowserInfo.get().isIE6(); - } - - /** - * @deprecated use BrowserInfo class instead - * @return - */ - @Deprecated - public static boolean isIE7() { - return BrowserInfo.get().isIE7(); - } - - /** - * @deprecated use BrowserInfo class instead - * @return - */ - @Deprecated - public static boolean isFF2() { - return BrowserInfo.get().isFF2(); - } - private static final Element escapeHtmlHelper = DOM.createDiv(); /** @@ -249,8 +205,8 @@ public class Util { public static String escapeHTML(String html) { DOM.setInnerText(escapeHtmlHelper, html); String escapedText = DOM.getInnerHTML(escapeHtmlHelper); - if (BrowserInfo.get().isIE() && BrowserInfo.get().getIEVersion() < 9) { - // #7478 IE6-IE8 "incorrectly" returns "<br>" for newlines set using + if (BrowserInfo.get().isIE8()) { + // #7478 IE8 "incorrectly" returns "<br>" for newlines set using // setInnerText. The same for " " which is converted to " " escapedText = escapedText.replaceAll("<(BR|br)>", "\n"); escapedText = escapedText.replaceAll(" ", " "); @@ -275,48 +231,6 @@ public class Util { } /** - * Adds transparent PNG fix to image element; only use for IE6. - * - * @param el - * IMG element - */ - public native static void addPngFix(Element el) - /*-{ - el.attachEvent("onload", function() { - @com.vaadin.terminal.gwt.client.Util::doIE6PngFix(Lcom/google/gwt/user/client/Element;)(el); - },false); - }-*/; - - private native static void doPngFix(Element el, String blankImageUrl) - /*-{ - var src = el.src; - if (src.indexOf(".png") < 1) return; - var w = el.width || 16; - var h = el.height || 16; - if(h==30 || w==28) { - setTimeout(function(){ - el.style.height = el.height + "px"; - el.style.width = el.width + "px"; - el.src = blankImageUrl; - },10); - } else { - el.src = blankImageUrl; - el.style.height = h + "px"; - el.style.width = w + "px"; - } - el.style.padding = "0"; - el.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+src+"', sizingMethod='crop')"; - }-*/; - - public static void doIE6PngFix(Element el) { - String blankImageUrl = GWT.getModuleBaseURL() + "ie6pngfix/blank.gif"; - String src = el.getAttribute("src"); - if (src != null && !src.equals(blankImageUrl)) { - doPngFix(el, blankImageUrl); - } - } - - /** * Clones given element as in JavaScript. * * Deprecate this if there appears similar method into GWT someday. @@ -334,11 +248,7 @@ public class Util { public static int measureHorizontalPaddingAndBorder(Element element, int paddingGuess) { String originalWidth = DOM.getStyleAttribute(element, "width"); - String originalOverflow = ""; - if (BrowserInfo.get().isIE6()) { - originalOverflow = DOM.getStyleAttribute(element, "overflow"); - DOM.setStyleAttribute(element, "overflow", "hidden"); - } + int originalOffsetWidth = element.getOffsetWidth(); int widthGuess = (originalOffsetWidth - paddingGuess); if (widthGuess < 1) { @@ -348,9 +258,7 @@ public class Util { int padding = element.getOffsetWidth() - widthGuess; DOM.setStyleAttribute(element, "width", originalWidth); - if (BrowserInfo.get().isIE6()) { - DOM.setStyleAttribute(element, "overflow", originalOverflow); - } + return padding; } @@ -378,23 +286,19 @@ public class Util { int offsetWidth = element.getOffsetWidth(); int offsetHeight = element.getOffsetHeight(); - if (!BrowserInfo.get().isIE7()) { - if (offsetHeight < 1) { - offsetHeight = 1; - } - if (offsetWidth < 1) { - offsetWidth = 10; - } - element.getStyle().setPropertyPx("height", offsetHeight); + if (offsetHeight < 1) { + offsetHeight = 1; + } + if (offsetWidth < 1) { + offsetWidth = 10; } + element.getStyle().setPropertyPx("height", offsetHeight); element.getStyle().setPropertyPx("width", offsetWidth); borders = element.getOffsetWidth() - element.getClientWidth(); element.getStyle().setProperty("width", width); - if (!BrowserInfo.get().isIE7()) { - element.getStyle().setProperty("height", height); - } + element.getStyle().setProperty("height", height); } else { borders = element.getOffsetWidth() - element.getPropertyInt("clientWidth"); @@ -412,7 +316,6 @@ public class Util { int offsetWidth = element.getOffsetWidth(); int offsetHeight = element.getOffsetHeight(); - // if (BrowserInfo.get().isIE6()) { if (offsetHeight < 1) { offsetHeight = 1; } @@ -420,7 +323,6 @@ public class Util { offsetWidth = 10; } element.getStyle().setPropertyPx("width", offsetWidth); - // } element.getStyle().setPropertyPx("height", offsetHeight); @@ -428,9 +330,7 @@ public class Util { - element.getPropertyInt("clientHeight"); element.getStyle().setProperty("height", height); - // if (BrowserInfo.get().isIE6()) { element.getStyle().setProperty("width", width); - // } } else { borders = element.getOffsetHeight() - element.getPropertyInt("clientHeight"); @@ -823,33 +723,6 @@ public class Util { }-*/; /** - * IE7 sometimes "forgets" to render content. This function runs a hack to - * workaround the bug if needed. This happens easily in framset. See #3295. - */ - public static void runIE7ZeroSizedBodyFix() { - if (BrowserInfo.get().isIE7()) { - int offsetWidth = RootPanel.getBodyElement().getOffsetWidth(); - if (offsetWidth == 0) { - shakeBodyElement(); - } - } - } - - /** - * Does some very small adjustments to body element. We need this just to - * overcome some IE bugs. - */ - public static void shakeBodyElement() { - final DivElement shaker = Document.get().createDivElement(); - RootPanel.getBodyElement().insertBefore(shaker, - RootPanel.getBodyElement().getFirstChildElement()); - shaker.getStyle().setPropertyPx("height", 0); - shaker.setInnerHTML(" "); - RootPanel.getBodyElement().removeChild(shaker); - - } - - /** * Locates the child component of <literal>parent</literal> which contains * the element <literal>element</literal>. The child component is also * returned if "element" is part of its caption. If diff --git a/src/com/vaadin/terminal/gwt/client/VBrowserDetails.java b/src/com/vaadin/terminal/gwt/client/VBrowserDetails.java index 3778579b99..1e1fc5380a 100644 --- a/src/com/vaadin/terminal/gwt/client/VBrowserDetails.java +++ b/src/com/vaadin/terminal/gwt/client/VBrowserDetails.java @@ -302,4 +302,28 @@ public class VBrowserDetails implements Serializable { return isLinux;
}
+ /**
+ * Checks if the browser is so old that it simply won't work with a Vaadin
+ * application.
+ *
+ * @return true if the browser won't work, false if not the browser is
+ * supported or might work
+ */
+ public boolean isTooOldToFunctionProperly() {
+ if (isIE() && getBrowserMajorVersion() < 8) {
+ return true;
+ }
+ if (isSafari() && getBrowserMajorVersion() < 5) {
+ return true;
+ }
+ if (isFirefox() && getBrowserMajorVersion() < 4) {
+ return true;
+ }
+ if (isOpera() && getBrowserMajorVersion() < 11) {
+ return true;
+ }
+
+ return false;
+ }
+
}
diff --git a/src/com/vaadin/terminal/gwt/client/VCaption.java b/src/com/vaadin/terminal/gwt/client/VCaption.java index 5381f20d1b..59f1a5c437 100644 --- a/src/com/vaadin/terminal/gwt/client/VCaption.java +++ b/src/com/vaadin/terminal/gwt/client/VCaption.java @@ -29,7 +29,6 @@ public class VCaption extends HTML { private final ApplicationConnection client; private boolean placedAfterComponent = false; - private boolean iconOnloadHandled = false; private int maxWidth = -1; @@ -112,7 +111,6 @@ public class VCaption extends HTML { // Icon forces the caption to be above the component placedAfterComponent = false; - iconOnloadHandled = false; icon.setUri(uidl.getStringAttribute(ATTRIBUTE_ICON)); } else if (icon != null) { @@ -246,16 +244,10 @@ public class VCaption extends HTML { } if (DOM.eventGetType(event) == Event.ONLOAD - && icon.getElement() == target && !iconOnloadHandled) { + && icon.getElement() == target) { icon.setWidth(""); icon.setHeight(""); - /* - * IE6 pngFix causes two onload events to be fired and we want to - * react only to the first one - */ - iconOnloadHandled = true; - // if max width defined, recalculate if (maxWidth != -1) { setMaxWidth(maxWidth); diff --git a/src/com/vaadin/terminal/gwt/client/WidgetSet.java b/src/com/vaadin/terminal/gwt/client/WidgetSet.java index 38984e75c3..1c09709bfd 100644 --- a/src/com/vaadin/terminal/gwt/client/WidgetSet.java +++ b/src/com/vaadin/terminal/gwt/client/WidgetSet.java @@ -6,8 +6,6 @@ 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.VButton; -import com.vaadin.terminal.gwt.client.ui.VCheckBox; import com.vaadin.terminal.gwt.client.ui.VFilterSelect; import com.vaadin.terminal.gwt.client.ui.VListSelect; import com.vaadin.terminal.gwt.client.ui.VPasswordField; @@ -79,9 +77,7 @@ public class WidgetSet { // add our historical quirks - if (widgetClass == VButton.class && uidl.hasAttribute("type")) { - return VCheckBox.class; - } else if (widgetClass == VView.class && uidl.hasAttribute("sub")) { + if (widgetClass == VView.class && uidl.hasAttribute("sub")) { return VWindow.class; } else if (widgetClass == VFilterSelect.class) { if (uidl.hasAttribute("type")) { @@ -143,9 +139,7 @@ public class WidgetSet { * is in multiselect mode, causing the clientside implementation to * *actually* be VListSelect, when the annotation says VFilterSelect */ - if (fullyqualifiedName.equals("com.vaadin.ui.Button")) { - loadImplementation(VCheckBox.class); - } else if (fullyqualifiedName.equals("com.vaadin.ui.Select")) { + if (fullyqualifiedName.equals("com.vaadin.ui.Select")) { loadImplementation(VListSelect.class); } else if (fullyqualifiedName.equals("com.vaadin.ui.TextField")) { loadImplementation(VTextArea.class); diff --git a/src/com/vaadin/terminal/gwt/client/ui/FocusElementPanel.java b/src/com/vaadin/terminal/gwt/client/ui/FocusElementPanel.java index 5f3e5b18fd..76e6edcc43 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/FocusElementPanel.java +++ b/src/com/vaadin/terminal/gwt/client/ui/FocusElementPanel.java @@ -13,11 +13,9 @@ import com.google.gwt.user.client.Element; import com.google.gwt.user.client.Event; import com.google.gwt.user.client.ui.Widget; import com.google.gwt.user.client.ui.impl.FocusImpl; -import com.vaadin.terminal.gwt.client.BrowserInfo; /** * A panel that contains an always visible 0x0 size element that holds the focus - * for all browsers but IE6. */ public class FocusElementPanel extends SimpleFocusablePanel { @@ -30,22 +28,20 @@ public class FocusElementPanel extends SimpleFocusablePanel { @Override public void setWidget(Widget w) { super.setWidget(w); - if (!BrowserInfo.get().isIE6()) { - if (focusElement.getParentElement() == null) { - Style style = focusElement.getStyle(); - style.setPosition(Position.FIXED); - style.setTop(0, Unit.PX); - style.setLeft(0, Unit.PX); - getElement().appendChild(focusElement); - /* Sink from focusElement too as focus and blur don't bubble */ - DOM.sinkEvents( - (com.google.gwt.user.client.Element) focusElement - .cast(), Event.FOCUSEVENTS); - // revert to original, not focusable - getElement().setPropertyObject("tabIndex", null); - } else { - moveFocusElementAfterWidget(); - } + if (focusElement.getParentElement() == null) { + Style style = focusElement.getStyle(); + style.setPosition(Position.FIXED); + style.setTop(0, Unit.PX); + style.setLeft(0, Unit.PX); + getElement().appendChild(focusElement); + /* Sink from focusElement too as focus and blur don't bubble */ + DOM.sinkEvents( + (com.google.gwt.user.client.Element) focusElement.cast(), + Event.FOCUSEVENTS); + // revert to original, not focusable + getElement().setPropertyObject("tabIndex", null); + } else { + moveFocusElementAfterWidget(); } } @@ -58,28 +54,20 @@ public class FocusElementPanel extends SimpleFocusablePanel { @Override public void setFocus(boolean focus) { - if (BrowserInfo.get().isIE6()) { - super.setFocus(focus); + if (focus) { + FocusImpl.getFocusImplForPanel().focus( + (Element) focusElement.cast()); } else { - if (focus) { - FocusImpl.getFocusImplForPanel().focus( - (Element) focusElement.cast()); - } else { - FocusImpl.getFocusImplForPanel().blur( - (Element) focusElement.cast()); - } + FocusImpl.getFocusImplForPanel() + .blur((Element) focusElement.cast()); } } @Override public void setTabIndex(int tabIndex) { - if (BrowserInfo.get().isIE6()) { - super.setTabIndex(tabIndex); - } else { - getElement().setTabIndex(-1); - if (focusElement != null) { - focusElement.setTabIndex(tabIndex); - } + getElement().setTabIndex(-1); + if (focusElement != null) { + focusElement.setTabIndex(tabIndex); } } diff --git a/src/com/vaadin/terminal/gwt/client/ui/FocusableScrollPanel.java b/src/com/vaadin/terminal/gwt/client/ui/FocusableScrollPanel.java index 74823ce75b..2452190d9d 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/FocusableScrollPanel.java +++ b/src/com/vaadin/terminal/gwt/client/ui/FocusableScrollPanel.java @@ -21,7 +21,6 @@ import com.google.gwt.user.client.Event; import com.google.gwt.user.client.ui.ScrollPanel; import com.google.gwt.user.client.ui.Widget; import com.google.gwt.user.client.ui.impl.FocusImpl; -import com.vaadin.terminal.gwt.client.BrowserInfo; /** * A scrollhandlers similar to {@link ScrollPanel}. @@ -57,18 +56,9 @@ public class FocusableScrollPanel extends SimpleFocusablePanel implements if (useFakeFocusElement()) { if (focusElement.getParentElement() == null) { Style style = focusElement.getStyle(); - if (BrowserInfo.get().isIE6()) { - style.setOverflow(Overflow.HIDDEN); - style.setHeight(0, Unit.PX); - style.setWidth(0, Unit.PX); - style.setPosition(Position.ABSOLUTE); - - addScrollHandler(this); - } else { - style.setPosition(Position.FIXED); - style.setTop(0, Unit.PX); - style.setLeft(0, Unit.PX); - } + style.setPosition(Position.FIXED); + style.setTop(0, Unit.PX); + style.setLeft(0, Unit.PX); getElement().appendChild(focusElement); /* Sink from focusElemet too as focusa and blur don't bubble */ DOM.sinkEvents( diff --git a/src/com/vaadin/terminal/gwt/client/ui/Icon.java b/src/com/vaadin/terminal/gwt/client/ui/Icon.java index eba1a9bd78..bf24f6dac2 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/Icon.java +++ b/src/com/vaadin/terminal/gwt/client/ui/Icon.java @@ -19,7 +19,6 @@ public class Icon extends UIObject { DOM.setElementProperty(getElement(), "alt", ""); setStyleName(CLASSNAME); this.client = client; - client.addPngFix(getElement()); } public Icon(ApplicationConnection client, String uidlUri) { diff --git a/src/com/vaadin/terminal/gwt/client/ui/VAbsoluteLayout.java b/src/com/vaadin/terminal/gwt/client/ui/VAbsoluteLayout.java index b0590ce5a0..cace2105c5 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VAbsoluteLayout.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VAbsoluteLayout.java @@ -22,7 +22,6 @@ import com.google.gwt.user.client.ui.ComplexPanel; import com.google.gwt.user.client.ui.SimplePanel; import com.google.gwt.user.client.ui.Widget; import com.vaadin.terminal.gwt.client.ApplicationConnection; -import com.vaadin.terminal.gwt.client.BrowserInfo; import com.vaadin.terminal.gwt.client.Container; import com.vaadin.terminal.gwt.client.EventId; import com.vaadin.terminal.gwt.client.Paintable; @@ -30,7 +29,6 @@ import com.vaadin.terminal.gwt.client.RenderSpace; import com.vaadin.terminal.gwt.client.UIDL; import com.vaadin.terminal.gwt.client.Util; import com.vaadin.terminal.gwt.client.VCaption; -import com.vaadin.terminal.gwt.client.VConsole; public class VAbsoluteLayout extends ComplexPanel implements Container { @@ -211,9 +209,6 @@ public class VAbsoluteLayout extends ComplexPanel implements Container { canvas.getStyle().setProperty("width", width); if (!rendering) { - if (BrowserInfo.get().isIE6()) { - relayoutWrappersForIe6(); - } relayoutRelativeChildren(); } } @@ -236,21 +231,10 @@ public class VAbsoluteLayout extends ComplexPanel implements Container { canvas.getStyle().setProperty("height", height); if (!rendering) { - if (BrowserInfo.get().isIE6()) { - relayoutWrappersForIe6(); - } relayoutRelativeChildren(); } } - private void relayoutWrappersForIe6() { - for (Widget wrapper : getChildren()) { - if (wrapper instanceof AbsoluteWrapper) { - ((AbsoluteWrapper) wrapper).ie6Layout(); - } - } - } - public class AbsoluteWrapper extends SimplePanel { private String css; private String left; @@ -353,9 +337,6 @@ public class VAbsoluteLayout extends ComplexPanel implements Container { style.setProperty("right", right); style.setProperty("bottom", bottom); - if (BrowserInfo.get().isIE6()) { - ie6Layout(); - } } updateCaptionPosition(); } @@ -369,60 +350,6 @@ public class VAbsoluteLayout extends ComplexPanel implements Container { - caption.getHeight()); } } - - private void ie6Layout() { - // special handling for IE6 is needed, it does not support - // setting both left/right or top/bottom - Style style = getElement().getStyle(); - if (bottom != null && top != null) { - // define height for wrapper to simulate bottom property - int bottompixels = measureForIE6(bottom, true); - VConsole.log("ALB" + bottompixels); - int height = canvas.getOffsetHeight() - bottompixels - - getElement().getOffsetTop(); - VConsole.log("ALB" + height); - if (height < 0) { - height = 0; - } - style.setPropertyPx("height", height); - } else { - // reset possibly existing value - style.setProperty("height", ""); - } - if (left != null && right != null) { - // define width for wrapper to simulate right property - int rightPixels = measureForIE6(right, false); - VConsole.log("ALR" + rightPixels); - int width = canvas.getOffsetWidth() - rightPixels - - getElement().getOffsetLeft(); - VConsole.log("ALR" + width); - if (width < 0) { - width = 0; - } - style.setPropertyPx("width", width); - } else { - // reset possibly existing value - style.setProperty("width", ""); - } - } - - } - - private Element measureElement; - - private int measureForIE6(String cssLength, boolean vertical) { - if (measureElement == null) { - measureElement = DOM.createDiv(); - measureElement.getStyle().setProperty("position", "absolute"); - canvas.appendChild(measureElement); - } - if (vertical) { - measureElement.getStyle().setProperty("height", cssLength); - return measureElement.getOffsetHeight(); - } else { - measureElement.getStyle().setProperty("width", cssLength); - return measureElement.getOffsetWidth(); - } } /** diff --git a/src/com/vaadin/terminal/gwt/client/ui/VAccordion.java b/src/com/vaadin/terminal/gwt/client/ui/VAccordion.java index 66192489a9..6faf82446a 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VAccordion.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VAccordion.java @@ -16,7 +16,6 @@ import com.google.gwt.user.client.Event; import com.google.gwt.user.client.ui.ComplexPanel; import com.google.gwt.user.client.ui.Widget; import com.vaadin.terminal.gwt.client.ApplicationConnection; -import com.vaadin.terminal.gwt.client.BrowserInfo; import com.vaadin.terminal.gwt.client.ContainerResizedListener; import com.vaadin.terminal.gwt.client.Paintable; import com.vaadin.terminal.gwt.client.RenderInformation; @@ -50,10 +49,6 @@ public class VAccordion extends VTabsheetBase implements public VAccordion() { super(CLASSNAME); - // IE6 needs this to calculate offsetHeight correctly - if (BrowserInfo.get().isIE6()) { - DOM.setStyleAttribute(getElement(), "zoom", "1"); - } } @Override @@ -434,10 +429,6 @@ public class VAccordion extends VTabsheetBase implements setElement(DOM.createDiv()); caption = new VCaption(null, client); caption.addClickHandler(this); - if (BrowserInfo.get().isIE6()) { - DOM.setEventListener(captionNode, this); - DOM.sinkEvents(captionNode, Event.BUTTON_LEFT); - } super.add(caption, captionNode); DOM.appendChild(captionNode, caption.getElement()); DOM.appendChild(getElement(), captionNode); @@ -496,10 +487,6 @@ public class VAccordion extends VTabsheetBase implements removeStyleDependentName("open"); setHeight(-1); setWidth(""); - if (BrowserInfo.get().isIE6()) { - // Work around for IE6 layouting problem #3359 - getElement().getStyle().setProperty("zoom", "1"); - } open = false; } diff --git a/src/com/vaadin/terminal/gwt/client/ui/VButton.java b/src/com/vaadin/terminal/gwt/client/ui/VButton.java index 442d0709ef..5c940eab12 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VButton.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VButton.java @@ -143,11 +143,6 @@ public class VButton extends FocusWidget implements Paintable, ClickHandler, } wrapper.insertBefore(errorIndicatorElement, captionElement); - // Fix for IE6, IE7 - if (BrowserInfo.get().isIE6() || BrowserInfo.get().isIE7()) { - errorIndicatorElement.setInnerText(" "); - } - } else if (errorIndicatorElement != null) { wrapper.removeChild(errorIndicatorElement); errorIndicatorElement = null; @@ -451,25 +446,6 @@ public class VButton extends FocusWidget implements Paintable, ClickHandler, } } - @Override - public void setWidth(String width) { - if (BrowserInfo.get().isIE6() || BrowserInfo.get().isIE7()) { - if (width != null && width.length() > 2) { - // Assume pixel values are always sent from - // ApplicationConnection - int w = Integer - .parseInt(width.substring(0, width.length() - 2)); - w -= getHorizontalBorderAndPaddingWidth(getElement()); - if (w < 0) { - // validity check for IE - w = 0; - } - width = w + "px"; - } - } - super.setWidth(width); - } - private static native int getHorizontalBorderAndPaddingWidth(Element elem) /*-{ // THIS METHOD IS ONLY USED FOR INTERNET EXPLORER, IT DOESN'T WORK WITH OTHERS diff --git a/src/com/vaadin/terminal/gwt/client/ui/VCheckBox.java b/src/com/vaadin/terminal/gwt/client/ui/VCheckBox.java index ebdc0e547c..3f5973d804 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VCheckBox.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VCheckBox.java @@ -4,10 +4,6 @@ package com.vaadin.terminal.gwt.client.ui; -import com.google.gwt.dom.client.InputElement; -import com.google.gwt.dom.client.LabelElement; -import com.google.gwt.dom.client.Node; -import com.google.gwt.dom.client.NodeList; import com.google.gwt.event.dom.client.BlurEvent; import com.google.gwt.event.dom.client.BlurHandler; import com.google.gwt.event.dom.client.ClickEvent; @@ -19,7 +15,6 @@ import com.google.gwt.user.client.DOM; import com.google.gwt.user.client.Element; import com.google.gwt.user.client.Event; import com.vaadin.terminal.gwt.client.ApplicationConnection; -import com.vaadin.terminal.gwt.client.BrowserInfo; import com.vaadin.terminal.gwt.client.EventHelper; import com.vaadin.terminal.gwt.client.EventId; import com.vaadin.terminal.gwt.client.MouseEventDetails; @@ -31,6 +26,8 @@ import com.vaadin.terminal.gwt.client.VTooltip; public class VCheckBox extends com.google.gwt.user.client.ui.CheckBox implements Paintable, Field, FocusHandler, BlurHandler { + public static final String VARIABLE_STATE = "state"; + public static final String CLASSNAME = "v-checkbox"; String id; @@ -60,7 +57,7 @@ public class VCheckBox extends com.google.gwt.user.client.ui.CheckBox implements event.getNativeEvent(), getElement()); client.updateVariable(id, "mousedetails", details.serialize(), false); - client.updateVariable(id, "state", getValue(), immediate); + client.updateVariable(id, VARIABLE_STATE, getValue(), immediate); } }); @@ -124,41 +121,11 @@ public class VCheckBox extends com.google.gwt.user.client.ui.CheckBox implements // Set text setText(uidl.getStringAttribute("caption")); - setValue(uidl.getBooleanVariable("state")); + setValue(uidl.getBooleanVariable(VARIABLE_STATE)); immediate = uidl.getBooleanAttribute("immediate"); } @Override - public void setText(String text) { - super.setText(text); - if (BrowserInfo.get().isIE() && BrowserInfo.get().getIEVersion() < 8) { - - boolean breakLink = text == null || "".equals(text); - - // break or create link between label element and checkbox, to - // enable native focus outline around checkbox element itself, if - // caption is not present - NodeList<Node> childNodes = getElement().getChildNodes(); - String id = null; - for (int i = 0; i < childNodes.getLength(); i++) { - Node item = childNodes.getItem(i); - if (item.getNodeName().toLowerCase().equals("input")) { - InputElement input = (InputElement) item; - id = input.getId(); - } - if (item.getNodeName().toLowerCase().equals("label")) { - LabelElement label = (LabelElement) item; - if (breakLink) { - label.setHtmlFor(""); - } else { - label.setHtmlFor(id); - } - } - } - } - } - - @Override public void onBrowserEvent(Event event) { if (icon != null && (event.getTypeInt() == Event.ONCLICK) && (DOM.eventGetTarget(event) == icon.getElement())) { diff --git a/src/com/vaadin/terminal/gwt/client/ui/VContextMenu.java b/src/com/vaadin/terminal/gwt/client/ui/VContextMenu.java index c519990aee..4c1d644756 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VContextMenu.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VContextMenu.java @@ -31,7 +31,6 @@ import com.google.gwt.user.client.ui.MenuBar; import com.google.gwt.user.client.ui.MenuItem; import com.google.gwt.user.client.ui.PopupPanel; import com.google.gwt.user.client.ui.impl.FocusImpl; -import com.vaadin.terminal.gwt.client.BrowserInfo; import com.vaadin.terminal.gwt.client.Focusable; import com.vaadin.terminal.gwt.client.Util; @@ -218,11 +217,6 @@ public class VContextMenu extends VOverlay implements SubPartAware { public void onLoad(LoadEvent event) { // Handle icon onload events to ensure shadow is resized correctly - if (BrowserInfo.get().isIE6()) { - // Ensure PNG transparency works in IE6 - Util.doIE6PngFix((Element) Element.as(event.getNativeEvent() - .getEventTarget())); - } delayedImageLoadExecutioner.trigger(); } diff --git a/src/com/vaadin/terminal/gwt/client/ui/VEmbedded.java b/src/com/vaadin/terminal/gwt/client/ui/VEmbedded.java index 59f0afdd3c..80dc2ef015 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VEmbedded.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VEmbedded.java @@ -87,7 +87,6 @@ public class VEmbedded extends HTML implements Paintable { setHTML(""); el = DOM.createImg(); created = true; - client.addPngFix(el); DOM.sinkEvents(el, Event.ONLOAD); } diff --git a/src/com/vaadin/terminal/gwt/client/ui/VFilterSelect.java b/src/com/vaadin/terminal/gwt/client/ui/VFilterSelect.java index 66200cbe8c..7be01a1195 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VFilterSelect.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VFilterSelect.java @@ -12,9 +12,7 @@ import java.util.Iterator; import java.util.List; import java.util.Set; -import com.google.gwt.core.client.Scheduler; import com.google.gwt.core.client.Scheduler.ScheduledCommand; -import com.google.gwt.dom.client.Style.Overflow; import com.google.gwt.event.dom.client.BlurEvent; import com.google.gwt.event.dom.client.BlurHandler; import com.google.gwt.event.dom.client.ClickEvent; @@ -762,12 +760,6 @@ public class VFilterSelect extends Composite implements Paintable, Field, } public void onLoad(LoadEvent event) { - if (BrowserInfo.get().isIE6()) { - // Ensure PNG transparency works in IE6 - Util.doIE6PngFix((Element) Element.as(event.getNativeEvent() - .getEventTarget())); - } - // Handle icon onload events to ensure shadow is resized // correctly delayedImageLoadExecutioner.trigger(); @@ -1251,22 +1243,13 @@ public class VFilterSelect extends Composite implements Paintable, Field, } /** - * Sets the text in the text box using a deferred command if on Gecko. This - * is required for performance reasons (see #3663). + * Sets the text in the text box. * * @param text * the text to set in the text box */ private void setTextboxText(final String text) { - if (BrowserInfo.get().isFF3()) { - Scheduler.get().scheduleDeferred(new Command() { - public void execute() { - tb.setText(text); - } - }); - } else { - tb.setText(text); - } + tb.setText(text); } /* @@ -1373,13 +1356,7 @@ public class VFilterSelect extends Composite implements Paintable, Field, private void updateSelectedIconPosition() { // Position icon vertically to middle int availableHeight = 0; - if (BrowserInfo.get().isIE6()) { - getElement().getStyle().setOverflow(Overflow.HIDDEN); - availableHeight = getOffsetHeight(); - getElement().getStyle().setProperty("overflow", ""); - } else { - availableHeight = getOffsetHeight(); - } + availableHeight = getOffsetHeight(); int iconHeight = Util.getRequiredHeight(selectedItemIcon); int marginTop = (availableHeight - iconHeight) / 2; @@ -1783,16 +1760,8 @@ public class VFilterSelect extends Composite implements Paintable, Field, this.width = width; } - if (BrowserInfo.get().isIE6()) { - // Required in IE when textfield is wider than this.width - getElement().getStyle().setOverflow(Overflow.HIDDEN); - horizPaddingAndBorder = Util.setWidthExcludingPaddingAndBorder( - this, width, horizPaddingAndBorder); - getElement().getStyle().setProperty("overflow", ""); - } else { - horizPaddingAndBorder = Util.setWidthExcludingPaddingAndBorder( - this, width, horizPaddingAndBorder); - } + horizPaddingAndBorder = Util.setWidthExcludingPaddingAndBorder(this, + width, horizPaddingAndBorder); if (initDone) { updateRootWidth(); @@ -1882,16 +1851,7 @@ public class VFilterSelect extends Composite implements Paintable, Field, * @return The width in pixels */ private int getMainWidth() { - int componentWidth; - if (BrowserInfo.get().isIE6()) { - // Required in IE when textfield is wider than this.width - getElement().getStyle().setOverflow(Overflow.HIDDEN); - componentWidth = getOffsetWidth(); - getElement().getStyle().setProperty("overflow", ""); - } else { - componentWidth = getOffsetWidth(); - } - return componentWidth; + return getOffsetWidth(); } /** diff --git a/src/com/vaadin/terminal/gwt/client/ui/VForm.java b/src/com/vaadin/terminal/gwt/client/ui/VForm.java index cabe691a3e..67be713e1a 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VForm.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VForm.java @@ -16,7 +16,6 @@ import com.google.gwt.user.client.Event; import com.google.gwt.user.client.ui.ComplexPanel;
import com.google.gwt.user.client.ui.Widget;
import com.vaadin.terminal.gwt.client.ApplicationConnection;
-import com.vaadin.terminal.gwt.client.BrowserInfo;
import com.vaadin.terminal.gwt.client.Container;
import com.vaadin.terminal.gwt.client.Paintable;
import com.vaadin.terminal.gwt.client.RenderInformation;
@@ -214,9 +213,6 @@ public class VForm extends ComplexPanel implements Container, KeyDownHandler { renderInformation.setContentAreaHeight(renderInformation
.getRenderedSize().getHeight() - getSpaceConsumedVertically());
- if (BrowserInfo.get().isIE6()) {
- getElement().getStyle().setProperty("overflow", "hidden");
- }
renderInformation.setContentAreaWidth(renderInformation
.getRenderedSize().getWidth() - borderPaddingHorizontal);
}
diff --git a/src/com/vaadin/terminal/gwt/client/ui/VFormLayout.java b/src/com/vaadin/terminal/gwt/client/ui/VFormLayout.java index f4691a3f27..378286381f 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VFormLayout.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VFormLayout.java @@ -404,6 +404,7 @@ public class VFormLayout extends SimplePanel implements Container { // Workaround for IE weirdness, sometimes returns bad height in some // circumstances when Caption is empty. See #1444 // IE7 bugs more often. I wonder what happens when IE8 arrives... + // FIXME: This could be unnecessary for IE8+ if (BrowserInfo.get().isIE()) { if (isEmpty) { setHeight("0px"); diff --git a/src/com/vaadin/terminal/gwt/client/ui/VLabel.java b/src/com/vaadin/terminal/gwt/client/ui/VLabel.java index 28d16b4a39..05017f22e8 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VLabel.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VLabel.java @@ -124,8 +124,8 @@ public class VLabel extends HTML implements Paintable { @Override public void setText(String text) { - if (BrowserInfo.get().isIE() && BrowserInfo.get().getIEVersion() < 9) { - // #3983 - IE6-IE8 incorrectly replaces \n with <br> so we do the + if (BrowserInfo.get().isIE8()) { + // #3983 - IE8 incorrectly replaces \n with <br> so we do the // escaping manually and set as HTML super.setHTML(Util.escapeHTML(text)); } else { diff --git a/src/com/vaadin/terminal/gwt/client/ui/VMenuBar.java b/src/com/vaadin/terminal/gwt/client/ui/VMenuBar.java index a2b49bae05..5081734c7e 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VMenuBar.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VMenuBar.java @@ -11,7 +11,6 @@ import java.util.Stack; import com.google.gwt.core.client.GWT; import com.google.gwt.core.client.Scheduler; import com.google.gwt.core.client.Scheduler.ScheduledCommand; -import com.google.gwt.dom.client.NodeList; import com.google.gwt.dom.client.Style; import com.google.gwt.dom.client.Style.Overflow; import com.google.gwt.dom.client.Style.Unit; @@ -157,24 +156,9 @@ public class VMenuBar extends SimpleFocusablePanel implements Paintable, } this.width = width; - if (BrowserInfo.get().isIE6() && width.endsWith("px")) { - // IE6 sometimes measures wrong using - // Util.setWidthExcludingPaddingAndBorder so this is extracted to a - // special case that uses another method. Really should fix the - // Util.setWidthExcludingPaddingAndBorder method but that will - // probably break additional cases - int requestedPixelWidth = Integer.parseInt(width.substring(0, - width.length() - 2)); - int paddingBorder = Util.measureHorizontalPaddingAndBorder( - getElement(), 0); - int w = requestedPixelWidth - paddingBorder; - if (w < 0) { - w = 0; - } - getElement().getStyle().setWidth(w, Unit.PX); - } else { - Util.setWidthExcludingPaddingAndBorder(this, width, 0); - } + + Util.setWidthExcludingPaddingAndBorder(this, width, 0); + if (!subMenu) { // Only needed for root level menu hideChildren(); @@ -478,9 +462,6 @@ public class VMenuBar extends SimpleFocusablePanel implements Paintable, // Handle onload events (icon loaded, size changes) if (DOM.eventGetType(e) == Event.ONLOAD) { - if (BrowserInfo.get().isIE6()) { - Util.doIE6PngFix((Element) Element.as(e.getEventTarget())); - } VMenuBar parent = getParentMenu(); if (parent != null) { // The onload event for an image in a popup should be sent to @@ -733,27 +714,6 @@ public class VMenuBar extends SimpleFocusablePanel implements Paintable, popup.setPopupPosition(left, top); - // IE7 really tests one's patience sometimes - // Part of a fix to correct #3850 - if (BrowserInfo.get().isIE7()) { - popup.getElement().getStyle().setProperty("zoom", ""); - Scheduler.get().scheduleDeferred(new Command() { - public void execute() { - if (popup == null) { - // The child menu can be hidden before this command is - // run. - return; - } - - if (popup.getElement().getStyle().getProperty("width") == null - || popup.getElement().getStyle() - .getProperty("width") == "") { - popup.setWidth(popup.getOffsetWidth() + "px"); - } - popup.getElement().getStyle().setProperty("zoom", "1"); - } - }); - } } private int adjustPopupHeight(int top, final int shadowSpace) { @@ -780,19 +740,10 @@ public class VMenuBar extends SimpleFocusablePanel implements Paintable, style.setHeight(availableHeight, Unit.PX); style.setOverflowY(Overflow.SCROLL); - // Make room for the scroll bar - if (BrowserInfo.get().isIE6()) { - // IE6 renders the sub menu arrow icons on the scroll bar - // unless we add some padding - style.setPaddingRight(Util.getNativeScrollbarSize(), - Unit.PX); - } else { - // For other browsers, adjusting the width of the popup is - // enough - style.setWidth( - contentWidth + Util.getNativeScrollbarSize(), - Unit.PX); - } + // Make room for the scroll bar by adjusting the width of the + // popup + style.setWidth(contentWidth + Util.getNativeScrollbarSize(), + Unit.PX); popup.updateShadowSizeAndPosition(); } } @@ -962,6 +913,7 @@ public class VMenuBar extends SimpleFocusablePanel implements Paintable, addStyleDependentName("selected"); // needed for IE6 to have a single style name to match for an // element + // TODO Can be optimized now that IE6 is not supported any more if (checkable) { if (checked) { removeStyleDependentName("selected-unchecked"); @@ -1170,22 +1122,9 @@ public class VMenuBar extends SimpleFocusablePanel implements Paintable, paddingWidth = widthBefore - getElement().getClientWidth(); getElement().getStyle().setProperty("padding", ""); } - String overflow = ""; - if (BrowserInfo.get().isIE6()) { - // IE6 cannot measure available width correctly without - // overflow:hidden - overflow = getElement().getStyle().getProperty("overflow"); - getElement().getStyle().setProperty("overflow", "hidden"); - } int availableWidth = getElement().getClientWidth() - paddingWidth; - if (BrowserInfo.get().isIE6()) { - // IE6 cannot measure available width correctly without - // overflow:hidden - getElement().getStyle().setProperty("overflow", overflow); - } - // Used width includes the "more" item if present int usedWidth = getConsumedWidth(); int diff = availableWidth - usedWidth; @@ -1230,16 +1169,6 @@ public class VMenuBar extends SimpleFocusablePanel implements Paintable, } else { widthAvailable = diff; } - - if (BrowserInfo.get().isIE6()) { - /* - * Handle transparency for IE6 here as we cannot - * implement it in CustomMenuItem.onAttach because - * onAttach is never called for CustomMenuItem due to an - * invalid component hierarchy (#6203)... - */ - reloadImages(expand.getElement()); - } } } if (collapsedRootItems.getItems().size() > 0) { @@ -1636,31 +1565,4 @@ public class VMenuBar extends SimpleFocusablePanel implements Paintable, return null; } - @Override - protected void onLoad() { - super.onLoad(); - if (BrowserInfo.get().isIE6()) { - reloadImages(getElement()); - } - } - - /** - * Force a new onload event for all images. Used only for IE6 to deal with - * PNG transparency. - */ - private void reloadImages(Element root) { - - NodeList<com.google.gwt.dom.client.Element> imgElements = root - .getElementsByTagName("img"); - for (int i = 0; i < imgElements.getLength(); i++) { - Element e = (Element) imgElements.getItem(i); - - // IE6 fires onload events for the icons before the listener - // is attached (or never). Updating the src force another - // onload event - String src = e.getAttribute("src"); - e.setAttribute("src", src); - } - } - } diff --git a/src/com/vaadin/terminal/gwt/client/ui/VNativeButton.java b/src/com/vaadin/terminal/gwt/client/ui/VNativeButton.java index 3034259353..d295ec86ee 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VNativeButton.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VNativeButton.java @@ -4,7 +4,6 @@ package com.vaadin.terminal.gwt.client.ui; -import com.google.gwt.core.client.Scheduler; import com.google.gwt.dom.client.Element; import com.google.gwt.event.dom.client.BlurEvent; import com.google.gwt.event.dom.client.BlurHandler; @@ -13,7 +12,6 @@ import com.google.gwt.event.dom.client.ClickHandler; import com.google.gwt.event.dom.client.FocusEvent; import com.google.gwt.event.dom.client.FocusHandler; import com.google.gwt.event.shared.HandlerRegistration; -import com.google.gwt.user.client.Command; import com.google.gwt.user.client.DOM; import com.google.gwt.user.client.Event; import com.google.gwt.user.client.ui.Button; @@ -99,11 +97,6 @@ public class VNativeButton extends Button implements Paintable, ClickHandler, } getElement().insertBefore(errorIndicatorElement, captionElement); - // Fix for IE6, IE7 - if (BrowserInfo.get().isIE()) { - errorIndicatorElement.setInnerText(" "); - } - } else if (errorIndicatorElement != null) { getElement().removeChild(errorIndicatorElement); errorIndicatorElement = null; @@ -122,21 +115,6 @@ public class VNativeButton extends Button implements Paintable, ClickHandler, } } - if (BrowserInfo.get().isIE7()) { - /* - * Workaround for IE7 size calculation issues. Deferred because of - * issues with a button with an icon using the reindeer theme - */ - if (width.equals("")) { - Scheduler.get().scheduleDeferred(new Command() { - - public void execute() { - setWidth(""); - setWidth(getOffsetWidth() + "px"); - } - }); - } - } } @Override @@ -170,24 +148,8 @@ public class VNativeButton extends Button implements Paintable, ClickHandler, @Override public void setWidth(String width) { - /* Workaround for IE7 button size part 1 (#2014) */ - if (BrowserInfo.get().isIE7() && this.width != null) { - if (this.width.equals(width)) { - return; - } - - if (width == null) { - width = ""; - } - } - this.width = width; super.setWidth(width); - - /* Workaround for IE7 button size part 2 (#2014) */ - if (BrowserInfo.get().isIE7()) { - super.setWidth(width); - } } /* diff --git a/src/com/vaadin/terminal/gwt/client/ui/VNativeSelect.java b/src/com/vaadin/terminal/gwt/client/ui/VNativeSelect.java index 6261a3988a..a441fb24bd 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VNativeSelect.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VNativeSelect.java @@ -8,9 +8,7 @@ import java.util.ArrayList; import java.util.Iterator; import com.google.gwt.event.dom.client.ChangeEvent; -import com.vaadin.terminal.gwt.client.BrowserInfo; import com.vaadin.terminal.gwt.client.UIDL; -import com.vaadin.terminal.gwt.client.Util; public class VNativeSelect extends VOptionGroupBase implements Field { @@ -58,11 +56,6 @@ public class VNativeSelect extends VOptionGroupBase implements Field { select.setItemSelected(0, true); firstValueIsTemporaryNullItem = true; } - if (BrowserInfo.get().isIE6()) { - // lazy size change - IE6 uses naive dropdown that does not have a - // proper size yet - Util.notifyParentOfSizeChange(this, true); - } } @Override diff --git a/src/com/vaadin/terminal/gwt/client/ui/VOptionGroup.java b/src/com/vaadin/terminal/gwt/client/ui/VOptionGroup.java index e524d4ed9a..f33b905dea 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VOptionGroup.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VOptionGroup.java @@ -20,7 +20,6 @@ import com.google.gwt.event.dom.client.LoadEvent; import com.google.gwt.event.dom.client.LoadHandler;
import com.google.gwt.event.shared.HandlerRegistration;
import com.google.gwt.user.client.Command;
-import com.google.gwt.user.client.Element;
import com.google.gwt.user.client.ui.CheckBox;
import com.google.gwt.user.client.ui.FocusWidget;
import com.google.gwt.user.client.ui.Focusable;
@@ -28,7 +27,6 @@ import com.google.gwt.user.client.ui.Panel; import com.google.gwt.user.client.ui.RadioButton;
import com.google.gwt.user.client.ui.Widget;
import com.vaadin.terminal.gwt.client.ApplicationConnection;
-import com.vaadin.terminal.gwt.client.BrowserInfo;
import com.vaadin.terminal.gwt.client.EventId;
import com.vaadin.terminal.gwt.client.UIDL;
import com.vaadin.terminal.gwt.client.Util;
@@ -51,10 +49,6 @@ public class VOptionGroup extends VOptionGroupBase implements FocusHandler, private final LoadHandler iconLoadHandler = new LoadHandler() {
public void onLoad(LoadEvent event) {
- if (BrowserInfo.get().isIE6()) {
- Util.doIE6PngFix((Element) Element.as(event.getNativeEvent()
- .getEventTarget()));
- }
Util.notifyParentOfSizeChange(VOptionGroup.this, true);
}
};
diff --git a/src/com/vaadin/terminal/gwt/client/ui/VOverlay.java b/src/com/vaadin/terminal/gwt/client/ui/VOverlay.java index 27b8840823..260aa1123e 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VOverlay.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VOverlay.java @@ -15,7 +15,6 @@ import com.google.gwt.user.client.Element; import com.google.gwt.user.client.ui.PopupPanel; import com.google.gwt.user.client.ui.RootPanel; import com.vaadin.terminal.gwt.client.BrowserInfo; -import com.vaadin.terminal.gwt.client.Util; /** * In Vaadin UI this Overlay should always be used for all elements that @@ -162,32 +161,18 @@ public class VOverlay extends PopupPanel implements CloseHandler<PopupPanel> { private static int adjustByRelativeTopBodyMargin() { if (topFix == -1) { - boolean ie6OrIe7 = BrowserInfo.get().isIE() - && BrowserInfo.get().getIEVersion() <= 7; - topFix = detectRelativeBodyFixes("top", ie6OrIe7); + topFix = detectRelativeBodyFixes("top"); } return topFix; } - private native static int detectRelativeBodyFixes(String axis, - boolean removeClientLeftOrTop) + private native static int detectRelativeBodyFixes(String axis) /*-{ try { var b = $wnd.document.body; var cstyle = b.currentStyle ? b.currentStyle : getComputedStyle(b); if(cstyle && cstyle.position == 'relative') { - var offset = b.getBoundingClientRect()[axis]; - if (removeClientLeftOrTop) { - // IE6 and IE7 include the top left border of the client area into the boundingClientRect - var clientTopOrLeft = 0; - if (axis == "top") - clientTopOrLeft = $wnd.document.documentElement.clientTop; - else - clientTopOrLeft = $wnd.document.documentElement.clientLeft; - - offset -= clientTopOrLeft; - } - return offset; + return b.getBoundingClientRect()[axis]; } } catch(e){} return 0; @@ -195,9 +180,7 @@ public class VOverlay extends PopupPanel implements CloseHandler<PopupPanel> { private static int adjustByRelativeLeftBodyMargin() { if (leftFix == -1) { - boolean ie6OrIe7 = BrowserInfo.get().isIE() - && BrowserInfo.get().getIEVersion() <= 7; - leftFix = detectRelativeBodyFixes("left", ie6OrIe7); + leftFix = detectRelativeBodyFixes("left"); } return leftFix; @@ -214,13 +197,6 @@ public class VOverlay extends PopupPanel implements CloseHandler<PopupPanel> { updateShadowSizeAndPosition(1.0); } } - Util.runIE7ZeroSizedBodyFix(); - } - - @Override - public void hide(boolean autoClosed) { - super.hide(autoClosed); - Util.runIE7ZeroSizedBodyFix(); } @Override diff --git a/src/com/vaadin/terminal/gwt/client/ui/VPanel.java b/src/com/vaadin/terminal/gwt/client/ui/VPanel.java index 692b8a4858..20cfdd7ad4 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VPanel.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VPanel.java @@ -322,45 +322,10 @@ public class VPanel extends SimplePanel implements Container, } public void runHacks(boolean runGeckoFix) { - if (BrowserInfo.get().isIE6() && width != null && !width.equals("")) { + if ((BrowserInfo.get().isIE()) && (width == null || width.equals(""))) { /* - * IE6 requires overflow-hidden elements to have a width specified - * so we calculate the width of the content and caption nodes when - * no width has been specified. - */ - /* - * Fixes #1923 VPanel: Horizontal scrollbar does not appear in IE6 - * with wide content - */ - - /* - * Caption must be shrunk for parent measurements to return correct - * result in IE6 - */ - DOM.setStyleAttribute(captionNode, "width", "1px"); - - int parentPadding = Util.measureHorizontalPaddingAndBorder( - getElement(), 0); - - int parentWidthExcludingPadding = getElement().getOffsetWidth() - - parentPadding; - - Util.setWidthExcludingPaddingAndBorder(captionNode, - parentWidthExcludingPadding - getCaptionMarginLeft(), 26, - false); - - int contentMarginLeft = getContentMarginLeft(); - - Util.setWidthExcludingPaddingAndBorder(contentNode, - parentWidthExcludingPadding - contentMarginLeft, 2, false); - - } - - if ((BrowserInfo.get().isIE() || BrowserInfo.get().isFF2()) - && (width == null || width.equals(""))) { - /* - * IE and FF2 needs width to be specified for the root DIV so we - * calculate that from the sizes of the caption and layout + * IE (what version??) needs width to be specified for the root DIV + * so we calculate that from the sizes of the caption and layout */ int captionWidth = captionText.getOffsetWidth() + getCaptionMarginLeft() + getCaptionPaddingHorizontal(); @@ -371,11 +336,6 @@ public class VPanel extends SimplePanel implements Container, width = captionWidth; } - if (BrowserInfo.get().isIE7()) { - Util.setWidthExcludingPaddingAndBorder(captionNode, width - - getCaptionMarginLeft(), 26, false); - } - super.setWidth(width + "px"); } diff --git a/src/com/vaadin/terminal/gwt/client/ui/VPopupCalendar.java b/src/com/vaadin/terminal/gwt/client/ui/VPopupCalendar.java index 2cbae57175..06d58fe733 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VPopupCalendar.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VPopupCalendar.java @@ -264,7 +264,7 @@ public class VPopupCalendar extends VTextualDate implements Paintable, Field, int l = calendarToggle.getAbsoluteLeft();
// Add a little extra space to the right to avoid
- // problems with IE6/IE7 scrollbars and to make it look
+ // problems with IE7 scrollbars and to make it look
// nicer.
int extraSpace = 30;
diff --git a/src/com/vaadin/terminal/gwt/client/ui/VScrollTable.java b/src/com/vaadin/terminal/gwt/client/ui/VScrollTable.java index c919d82923..7575a84fee 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VScrollTable.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VScrollTable.java @@ -2287,7 +2287,7 @@ public class VScrollTable extends FlowPanel implements Table, ScrollHandler, * of the caption container element by the correct amount */ public void resizeCaptionContainer(int rightSpacing) { - if (BrowserInfo.get().isIE6() || td.getClassName().contains("-asc") + if (td.getClassName().contains("-asc") || td.getClassName().contains("-desc")) { /* * Room for the sort indicator is made by subtracting the styled @@ -2749,8 +2749,7 @@ public class VScrollTable extends FlowPanel implements Table, ScrollHandler, int hw = captionContainer.getOffsetWidth() + scrollBody.getCellExtraWidth(); - if (BrowserInfo.get().isGecko() - || BrowserInfo.get().isIE7()) { + if (BrowserInfo.get().isGecko()) { hw += sortIndicator.getOffsetWidth(); } if (columnIndex < 0) { @@ -3017,12 +3016,7 @@ public class VScrollTable extends FlowPanel implements Table, ScrollHandler, } public void setHorizontalScrollPosition(int scrollLeft) { - if (BrowserInfo.get().isIE6()) { - hTableWrapper.getStyle().setPosition(Position.RELATIVE); - hTableWrapper.getStyle().setLeft(-scrollLeft, Unit.PX); - } else { - hTableWrapper.setScrollLeft(scrollLeft); - } + hTableWrapper.setScrollLeft(scrollLeft); } public void setColumnCollapsingAllowed(boolean cc) { @@ -3873,12 +3867,7 @@ public class VScrollTable extends FlowPanel implements Table, ScrollHandler, * The value of the leftScroll */ public void setHorizontalScrollPosition(int scrollLeft) { - if (BrowserInfo.get().isIE6()) { - hTableWrapper.getStyle().setProperty("position", "relative"); - hTableWrapper.getStyle().setPropertyPx("left", -scrollLeft); - } else { - hTableWrapper.setScrollLeft(scrollLeft); - } + hTableWrapper.setScrollLeft(scrollLeft); } /** @@ -5942,19 +5931,15 @@ public class VScrollTable extends FlowPanel implements Table, ScrollHandler, */ private int getContentAreaBorderHeight() { if (contentAreaBorderHeight < 0) { - if (BrowserInfo.get().isIE7() || BrowserInfo.get().isIE6()) { - contentAreaBorderHeight = Util - .measureVerticalBorder(scrollBodyPanel.getElement()); - } else { - DOM.setStyleAttribute(scrollBodyPanel.getElement(), "overflow", - "hidden"); - int oh = scrollBodyPanel.getOffsetHeight(); - int ch = scrollBodyPanel.getElement().getPropertyInt( - "clientHeight"); - contentAreaBorderHeight = oh - ch; - DOM.setStyleAttribute(scrollBodyPanel.getElement(), "overflow", - "auto"); - } + + DOM.setStyleAttribute(scrollBodyPanel.getElement(), "overflow", + "hidden"); + int oh = scrollBodyPanel.getOffsetHeight(); + int ch = scrollBodyPanel.getElement() + .getPropertyInt("clientHeight"); + contentAreaBorderHeight = oh - ch; + DOM.setStyleAttribute(scrollBodyPanel.getElement(), "overflow", + "auto"); } return contentAreaBorderHeight; } diff --git a/src/com/vaadin/terminal/gwt/client/ui/VSlider.java b/src/com/vaadin/terminal/gwt/client/ui/VSlider.java index f6c9b3ab0d..3fc9d5f2bb 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VSlider.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VSlider.java @@ -300,9 +300,7 @@ public class VSlider extends SimpleFocusablePanel implements Paintable, Field, p = 0;
}
if (vertical) {
- // IE6 rounding behaves a little unstable, reduce one pixel so the
- // containing element (base) won't expand without limits
- p = range - p - (BrowserInfo.get().isIE6() ? 1 : 0);
+ p = range - p;
}
final double pos = p;
@@ -356,7 +354,7 @@ public class VSlider extends SimpleFocusablePanel implements Paintable, Field, } else if (DOM.eventGetType(event) == Event.ONMOUSEDOWN) {
feedbackPopup.show();
}
- if(Util.isTouchEvent(event)) {
+ if (Util.isTouchEvent(event)) {
event.preventDefault(); // avoid simulated events
event.stopPropagation();
}
diff --git a/src/com/vaadin/terminal/gwt/client/ui/VSplitPanel.java b/src/com/vaadin/terminal/gwt/client/ui/VSplitPanel.java index 6157079711..2841099198 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VSplitPanel.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VSplitPanel.java @@ -6,7 +6,6 @@ package com.vaadin.terminal.gwt.client.ui; import java.util.Set; -import com.google.gwt.core.client.Scheduler; import com.google.gwt.dom.client.NativeEvent; import com.google.gwt.dom.client.Node; import com.google.gwt.event.dom.client.DomEvent.Type; @@ -20,7 +19,6 @@ import com.google.gwt.event.dom.client.TouchStartEvent; import com.google.gwt.event.dom.client.TouchStartHandler; import com.google.gwt.event.shared.EventHandler; import com.google.gwt.event.shared.HandlerRegistration; -import com.google.gwt.user.client.Command; import com.google.gwt.user.client.DOM; import com.google.gwt.user.client.Element; import com.google.gwt.user.client.Event; @@ -306,15 +304,6 @@ public class VSplitPanel extends ComplexPanel implements Container, renderInformation.updateSize(getElement()); - if (BrowserInfo.get().isIE7()) { - // Part III of IE7 hack - Scheduler.get().scheduleDeferred(new Command() { - public void execute() { - iLayout(); - } - }); - } - // This is needed at least for cases like #3458 to take // appearing/disappearing scrollbars into account. client.runDescendentsLayout(this); diff --git a/src/com/vaadin/terminal/gwt/client/ui/VTabsheet.java b/src/com/vaadin/terminal/gwt/client/ui/VTabsheet.java index 016a411447..049e81e59a 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VTabsheet.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VTabsheet.java @@ -238,33 +238,6 @@ public class VTabsheet extends VTabsheetBase { return tab; } - @Override - public void setWidth(String width) { - super.setWidth(width); - if (BrowserInfo.get().isIE7()) { - /* - * IE7 apparently has problems with calculating width for - * floated elements inside a DIV with padding. Set the width - * explicitly for the caption. - */ - fixTextWidth(); - } - } - - private void fixTextWidth() { - Element captionText = getTextElement(); - if (captionText == null) { - return; - } - - int captionWidth = Util.getRequiredWidth(captionText); - int scrollWidth = captionText.getScrollWidth(); - if (scrollWidth > captionWidth) { - captionWidth = scrollWidth; - } - captionText.getStyle().setPropertyPx("width", captionWidth); - } - public void setClosable(boolean closable) { this.closable = closable; if (closable && closeButton == null) { diff --git a/src/com/vaadin/terminal/gwt/client/ui/VTextField.java b/src/com/vaadin/terminal/gwt/client/ui/VTextField.java index 41d48041fc..d0aebaf1de 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VTextField.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VTextField.java @@ -249,15 +249,15 @@ public class VTextField extends TextBoxBase implements Paintable, Field, final String text = uidl.getStringVariable("text"); /* - * We skip the text content update if field has been repainted, but text has - * not been changed. Additional sanity check verifies there is no change - * in the que (in which case we count more on the server side value). + * We skip the text content update if field has been repainted, but text + * has not been changed. Additional sanity check verifies there is no + * change in the que (in which case we count more on the server side + * value). */ - if (!(uidl.getBooleanAttribute(ATTR_NO_VALUE_CHANGE_BETWEEN_PAINTS) && valueBeforeEdit != null && text - .equals(valueBeforeEdit))) { + if (!(uidl.getBooleanAttribute(ATTR_NO_VALUE_CHANGE_BETWEEN_PAINTS) + && valueBeforeEdit != null && text.equals(valueBeforeEdit))) { updateFieldContent(text); } - if (uidl.hasAttribute("selpos")) { final int pos = uidl.getIntAttribute("selpos"); @@ -287,44 +287,15 @@ public class VTextField extends TextBoxBase implements Paintable, Field, setPrompting(inputPrompt != null && focusedTextField != this && (text.equals(""))); - if (BrowserInfo.get().isFF3()) { - /* - * Firefox 3 is really sluggish when updating input attached to dom. - * Some optimizations seems to work much better in Firefox3 if we - * update the actual content lazily when the rest of the DOM has - * stabilized. In tests, about ten times better performance is - * achieved with this optimization. See for eg. #2898 - */ - Scheduler.get().scheduleDeferred(new Command() { - public void execute() { - String fieldValue; - if (prompting) { - fieldValue = isReadOnly() ? "" : inputPrompt; - addStyleDependentName(CLASSNAME_PROMPT); - } else { - fieldValue = text; - removeStyleDependentName(CLASSNAME_PROMPT); - } - /* - * Avoid resetting the old value. Prevents cursor flickering - * which then again happens due to this Gecko hack. - */ - if (!getText().equals(fieldValue)) { - setText(fieldValue); - } - } - }); + String fieldValue; + if (prompting) { + fieldValue = isReadOnly() ? "" : inputPrompt; + addStyleDependentName(CLASSNAME_PROMPT); } else { - String fieldValue; - if (prompting) { - fieldValue = isReadOnly() ? "" : inputPrompt; - addStyleDependentName(CLASSNAME_PROMPT); - } else { - fieldValue = text; - removeStyleDependentName(CLASSNAME_PROMPT); - } - setText(fieldValue); + fieldValue = text; + removeStyleDependentName(CLASSNAME_PROMPT); } + setText(fieldValue); lastTextChangeString = valueBeforeEdit = text; } @@ -468,10 +439,6 @@ public class VTextField extends TextBoxBase implements Paintable, Field, setText(""); removeStyleDependentName(CLASSNAME_PROMPT); setPrompting(false); - if (BrowserInfo.get().isIE6()) { - // IE6 does not show the cursor when tabbing into the field - setCursorPos(0); - } } focusedTextField = this; if (client.hasEventListeners(this, EventId.FOCUS)) { diff --git a/src/com/vaadin/terminal/gwt/client/ui/VTextualDate.java b/src/com/vaadin/terminal/gwt/client/ui/VTextualDate.java index 4a0d6ff0f5..caa9c67dd1 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VTextualDate.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VTextualDate.java @@ -12,11 +12,9 @@ import com.google.gwt.event.dom.client.ChangeEvent; import com.google.gwt.event.dom.client.ChangeHandler; import com.google.gwt.event.dom.client.FocusEvent; import com.google.gwt.event.dom.client.FocusHandler; -import com.google.gwt.user.client.DOM; import com.google.gwt.user.client.Element; import com.google.gwt.user.client.ui.TextBox; import com.vaadin.terminal.gwt.client.ApplicationConnection; -import com.vaadin.terminal.gwt.client.BrowserInfo; import com.vaadin.terminal.gwt.client.ContainerResizedListener; import com.vaadin.terminal.gwt.client.EventId; import com.vaadin.terminal.gwt.client.Focusable; @@ -341,10 +339,6 @@ public class VTextualDate extends VDateField implements Paintable, Field, @Override public void setWidth(String newWidth) { if (!"".equals(newWidth) && (width == null || !newWidth.equals(width))) { - if (BrowserInfo.get().isIE6()) { - // in IE6 cols ~ min-width - DOM.setElementProperty(text.getElement(), "size", "1"); - } needLayout = true; width = newWidth; super.setWidth(width); @@ -354,10 +348,6 @@ public class VTextualDate extends VDateField implements Paintable, Field, } } else { if ("".equals(newWidth) && width != null && !"".equals(width)) { - if (BrowserInfo.get().isIE6()) { - // revert IE6 hack - DOM.setElementProperty(text.getElement(), "size", ""); - } super.setWidth(""); needLayout = true; iLayout(); @@ -376,10 +366,6 @@ public class VTextualDate extends VDateField implements Paintable, Field, if (fieldExtraWidth < 0) { text.setWidth("0"); fieldExtraWidth = text.getOffsetWidth(); - if (BrowserInfo.get().isFF3()) { - // Firefox somehow always leaves the INPUT element 2px wide - fieldExtraWidth -= 2; - } } return fieldExtraWidth; } diff --git a/src/com/vaadin/terminal/gwt/client/ui/VTree.java b/src/com/vaadin/terminal/gwt/client/ui/VTree.java index f50b722d0c..e959038374 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VTree.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VTree.java @@ -279,13 +279,8 @@ public class VTree extends FocusElementPanel implements Paintable, continue; } childTree = new TreeNode(); - if (childTree.ie6compatnode != null) { - body.add(childTree); - } childTree.updateFromUIDL(childUidl, client); - if (childTree.ie6compatnode == null) { - body.add(childTree); - } + body.add(childTree); childTree.addStyleDependentName("root"); childTree.childNodeContainer.addStyleDependentName("root"); } @@ -582,19 +577,12 @@ public class VTree extends FocusElementPanel implements Paintable, private Icon icon; - private Element ie6compatnode; - private Event mouseDownEvent; private int cachedHeight = -1; private boolean focused = false; - /** - * Track onload events as IE6 sends two - */ - private boolean onloadHandled = false; - public TreeNode() { constructDom(); sinkEvents(Event.ONCLICK | Event.ONDBLCLICK | Event.MOUSEEVENTS @@ -692,11 +680,11 @@ public class VTree extends FocusElementPanel implements Paintable, // always when clicking an item, focus it setFocusedNode(this, false); - if (!isIE6OrOpera()) { + if (!BrowserInfo.get().isOpera()) { /* * Ensure that the tree's focus element also gains focus * (TreeNodes focus is faked using FocusElementPanel in browsers - * other than IE6 and Opera). + * other than Opera). */ focus(); } @@ -764,14 +752,7 @@ public class VTree extends FocusElementPanel implements Paintable, final Element target = DOM.eventGetTarget(event); if (type == Event.ONLOAD && target == icon.getElement()) { - if (onloadHandled) { - return; - } - if (BrowserInfo.get().isIE6()) { - fixWidth(); - } iconLoaded.trigger(); - onloadHandled = true; } if (disabled) { @@ -792,7 +773,7 @@ public class VTree extends FocusElementPanel implements Paintable, fireClick(event); } if (type == Event.ONCLICK) { - if (getElement() == target || ie6compatnode == target) { + if (getElement() == target) { // state change toggleState(); } else if (!readonly && inCaption) { @@ -878,7 +859,7 @@ public class VTree extends FocusElementPanel implements Paintable, * previously modified field may contain dirty variables. */ if (!treeHasFocus) { - if (isIE6OrOpera()) { + if (BrowserInfo.get().isOpera()) { if (focusedNode == null) { getNodeByKey(key).setFocused(true); } else { @@ -939,15 +920,6 @@ public class VTree extends FocusElementPanel implements Paintable, protected void constructDom() { addStyleName(CLASSNAME); - // workaround for a very weird IE6 issue #1245 - if (BrowserInfo.get().isIE6()) { - ie6compatnode = DOM.createDiv(); - setStyleName(ie6compatnode, CLASSNAME + "-ie6compatnode"); - DOM.setInnerText(ie6compatnode, " "); - DOM.appendChild(getElement(), ie6compatnode); - - DOM.sinkEvents(ie6compatnode, Event.ONCLICK); - } nodeCaptionDiv = DOM.createDiv(); DOM.setElementProperty(nodeCaptionDiv, "className", CLASSNAME @@ -959,7 +931,7 @@ public class VTree extends FocusElementPanel implements Paintable, DOM.appendChild(nodeCaptionDiv, wrapper); DOM.appendChild(wrapper, nodeCaptionSpan); - if (isIE6OrOpera()) { + if (BrowserInfo.get().isOpera()) { /* * Focus the caption div of the node to get keyboard navigation * to work without scrolling up or down when focusing a node. @@ -1023,7 +995,6 @@ public class VTree extends FocusElementPanel implements Paintable, if (uidl.hasAttribute("icon")) { if (icon == null) { - onloadHandled = false; icon = new Icon(client); DOM.insertBefore(DOM.getFirstChild(nodeCaptionDiv), icon.getElement(), nodeCaptionSpan); @@ -1036,10 +1007,6 @@ public class VTree extends FocusElementPanel implements Paintable, icon = null; } } - - if (BrowserInfo.get().isIE6() && isAttached()) { - fixWidth(); - } } public boolean isLeaf() { @@ -1103,13 +1070,8 @@ public class VTree extends FocusElementPanel implements Paintable, continue; } final TreeNode childTree = new TreeNode(); - if (ie6compatnode != null) { - childNodeContainer.add(childTree); - } childTree.updateFromUIDL(childUidl, client); - if (ie6compatnode == null) { - childNodeContainer.add(childTree); - } + childNodeContainer.add(childTree); if (!i.hasNext()) { childTree .addStyleDependentName(childTree.isLeaf() ? "leaf-last" @@ -1220,32 +1182,6 @@ public class VTree extends FocusElementPanel implements Paintable, } /* - * We need to fix the width of TreeNodes so that the float in - * ie6compatNode does not wrap (see ticket #1245) - */ - private void fixWidth() { - nodeCaptionDiv.getStyle().setProperty("styleFloat", "left"); - nodeCaptionDiv.getStyle().setProperty("display", "inline"); - nodeCaptionDiv.getStyle().setProperty("marginLeft", "0"); - final int captionWidth = ie6compatnode.getOffsetWidth() - + nodeCaptionDiv.getOffsetWidth(); - setWidth(captionWidth + "px"); - } - - /* - * (non-Javadoc) - * - * @see com.google.gwt.user.client.ui.Widget#onAttach() - */ - @Override - public void onAttach() { - super.onAttach(); - if (ie6compatnode != null) { - fixWidth(); - } - } - - /* * (non-Javadoc) * * @see com.google.gwt.user.client.ui.Widget#onDetach() @@ -1275,19 +1211,14 @@ public class VTree extends FocusElementPanel implements Paintable, public void setFocused(boolean focused) { if (!this.focused && focused) { nodeCaptionDiv.addClassName(CLASSNAME_FOCUSED); - if (BrowserInfo.get().isIE6()) { - ie6compatnode.addClassName(CLASSNAME_FOCUSED); - } + this.focused = focused; - if (isIE6OrOpera()) { + if (BrowserInfo.get().isOpera()) { nodeCaptionDiv.focus(); } treeHasFocus = true; } else if (this.focused && !focused) { nodeCaptionDiv.removeClassName(CLASSNAME_FOCUSED); - if (BrowserInfo.get().isIE6()) { - ie6compatnode.removeClassName(CLASSNAME_FOCUSED); - } this.focused = focused; treeHasFocus = false; } @@ -2174,7 +2105,7 @@ public class VTree extends FocusElementPanel implements Paintable, */ public Element getSubPartElement(String subPart) { if ("fe".equals(subPart)) { - if (isIE6OrOpera() && focusedNode != null) { + if (BrowserInfo.get().isOpera() && focusedNode != null) { return focusedNode.getElement(); } return getFocusElement(); @@ -2206,11 +2137,7 @@ public class VTree extends FocusElementPanel implements Paintable, } if (expandCollapse) { - if (treeNode.ie6compatnode != null) { - return treeNode.ie6compatnode; - } else { - return treeNode.getElement(); - } + return treeNode.getElement(); } else { return treeNode.nodeCaptionSpan; } @@ -2254,8 +2181,7 @@ public class VTree extends FocusElementPanel implements Paintable, return null; } - if (subElement == treeNode.getElement() - || subElement == treeNode.ie6compatnode) { + if (subElement == treeNode.getElement()) { // Targets expand/collapse arrow isExpandCollapse = true; } @@ -2316,8 +2242,4 @@ public class VTree extends FocusElementPanel implements Paintable, event.preventDefault(); } } - - private boolean isIE6OrOpera() { - return BrowserInfo.get().isIE6() || BrowserInfo.get().isOpera(); - } } diff --git a/src/com/vaadin/terminal/gwt/client/ui/VTreeTable.java b/src/com/vaadin/terminal/gwt/client/ui/VTreeTable.java index c10e3e11a4..fc6ec46d64 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VTreeTable.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VTreeTable.java @@ -169,7 +169,7 @@ public class VTreeTable extends VScrollTable { private boolean browserSupportsAnimation() { BrowserInfo bi = BrowserInfo.get(); - return !(bi.isIE6() || bi.isIE7() || bi.isSafari4()); + return !(bi.isSafari4()); } class VTreeTableScrollBody extends VScrollTable.VScrollTableBody { diff --git a/src/com/vaadin/terminal/gwt/client/ui/VTwinColSelect.java b/src/com/vaadin/terminal/gwt/client/ui/VTwinColSelect.java index 1d02e50032..de2a903187 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VTwinColSelect.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VTwinColSelect.java @@ -27,7 +27,6 @@ import com.google.gwt.user.client.ui.HTML; import com.google.gwt.user.client.ui.ListBox;
import com.google.gwt.user.client.ui.Panel;
import com.vaadin.terminal.gwt.client.ApplicationConnection;
-import com.vaadin.terminal.gwt.client.BrowserInfo;
import com.vaadin.terminal.gwt.client.UIDL;
import com.vaadin.terminal.gwt.client.Util;
@@ -385,16 +384,7 @@ public class VTwinColSelect extends VOptionGroupBase implements KeyDownHandler, private void setInternalHeights() {
int captionHeight = 0;
- int totalHeight;
- if (BrowserInfo.get().isIE6()) {
- String o = getElement().getStyle().getOverflow();
-
- getElement().getStyle().setOverflow(Overflow.HIDDEN);
- totalHeight = getOffsetHeight();
- getElement().getStyle().setProperty("overflow", o);
- } else {
- totalHeight = getOffsetHeight();
- }
+ int totalHeight = getOffsetHeight();
if (optionsCaption != null) {
captionHeight = Util.getRequiredHeight(optionsCaption);
@@ -424,11 +414,6 @@ public class VTwinColSelect extends VOptionGroupBase implements KeyDownHandler, int bordersAndPaddings = Util.measureHorizontalPaddingAndBorder(
buttons.getElement(), 0);
- if (BrowserInfo.get().isIE6()) {
- // IE6 sets a border on selects by default..
- bordersAndPaddings += 4;
- }
-
int buttonWidth = Util.getRequiredWidth(buttons);
int totalWidth = getOffsetWidth();
diff --git a/src/com/vaadin/terminal/gwt/client/ui/VUpload.java b/src/com/vaadin/terminal/gwt/client/ui/VUpload.java index 25fd1d7604..77d7a7f762 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VUpload.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VUpload.java @@ -144,8 +144,6 @@ public class VUpload extends SimplePanel implements Paintable { private static native void setEncoding(Element form, String encoding) /*-{ form.enctype = encoding; - // For IE6 - form.encoding = encoding; }-*/; public void updateFromUIDL(UIDL uidl, ApplicationConnection client) { diff --git a/src/com/vaadin/terminal/gwt/client/ui/VUriFragmentUtility.java b/src/com/vaadin/terminal/gwt/client/ui/VUriFragmentUtility.java index 535ec16030..3da85e1b2b 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VUriFragmentUtility.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VUriFragmentUtility.java @@ -10,7 +10,6 @@ import com.google.gwt.event.shared.HandlerRegistration; import com.google.gwt.user.client.History; import com.google.gwt.user.client.ui.Widget; import com.vaadin.terminal.gwt.client.ApplicationConnection; -import com.vaadin.terminal.gwt.client.BrowserInfo; import com.vaadin.terminal.gwt.client.Paintable; import com.vaadin.terminal.gwt.client.UIDL; @@ -30,10 +29,6 @@ public class VUriFragmentUtility extends Widget implements Paintable, public VUriFragmentUtility() { setElement(Document.get().createDivElement()); - if (BrowserInfo.get().isIE6()) { - getElement().getStyle().setProperty("overflow", "hidden"); - getElement().getStyle().setProperty("height", "0"); - } } @Override diff --git a/src/com/vaadin/terminal/gwt/client/ui/VView.java b/src/com/vaadin/terminal/gwt/client/ui/VView.java index cd9f0c903c..9fd93bc89d 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VView.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VView.java @@ -476,9 +476,7 @@ public class VView extends SimplePanel implements Container, ResizeHandler, * browser window. Constantly recalculating the layout causes the resize * operation to be really slow with complex layouts. */ - boolean lazy = resizeLazy - || (BrowserInfo.get().isIE() && BrowserInfo.get() - .getIEVersion() <= 8) || BrowserInfo.get().isFF3(); + boolean lazy = resizeLazy || BrowserInfo.get().isIE8(); if (lazy) { delayedResizeExecutor.trigger(); @@ -563,16 +561,6 @@ public class VView extends SimplePanel implements Container, ResizeHandler, @Override public int getWidth() { - int w = getRealWidth(); - if (w < 10 && BrowserInfo.get().isIE7()) { - // Overcome an IE7 bug #3295 - Util.shakeBodyElement(); - w = getRealWidth(); - } - return w; - } - - private int getRealWidth() { if (connection.getConfiguration().isStandalone()) { return getElement().getOffsetWidth() - getExcessWidth(); } diff --git a/src/com/vaadin/terminal/gwt/client/ui/VWindow.java b/src/com/vaadin/terminal/gwt/client/ui/VWindow.java index 8c9fff889d..8d0bb14d9f 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VWindow.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VWindow.java @@ -593,19 +593,6 @@ public class VWindow extends VOverlay implements Container, DOM.setStyleAttribute(getElement(), "width", ""); - String oldHeaderWidth = ""; // Only for IE6 - if (BrowserInfo.get().isIE6()) { - /* - * For some reason IE6 has title DIV set to width 100% which - * interferes with the header measuring. Also IE6 has width set to - * the contentPanel. - */ - oldHeaderWidth = headerText.getStyle().getProperty("width"); - DOM.setStyleAttribute(contentPanel.getElement(), "width", "auto"); - DOM.setStyleAttribute(contentPanel.getElement(), "zoom", "1"); - headerText.getStyle().setProperty("width", "auto"); - } - // Content int contentWidth = contentPanel.getElement().getScrollWidth(); contentWidth += getContentAreaToRootDifference(); @@ -616,10 +603,6 @@ public class VWindow extends VOverlay implements Container, int naturalWidth = (contentWidth > windowCaptionWidth ? contentWidth : windowCaptionWidth); - if (BrowserInfo.get().isIE6()) { - headerText.getStyle().setProperty("width", oldHeaderWidth); - } - setWidth(naturalWidth + "px"); } @@ -684,42 +667,6 @@ public class VWindow extends VOverlay implements Container, showModalityCurtain(); } super.show(); - - setFF2CaretFixEnabled(true); - fixFF3OverflowBug(); - } - - /** Disable overflow auto with FF3 to fix #1837. */ - private void fixFF3OverflowBug() { - if (BrowserInfo.get().isFF3()) { - Scheduler.get().scheduleDeferred(new Command() { - public void execute() { - DOM.setStyleAttribute(getElement(), "overflow", ""); - } - }); - } - } - - /** - * Fix "missing cursor" browser bug workaround for FF2 in Windows and Linux. - * - * Calling this method has no effect on other browsers than the ones based - * on Gecko 1.8 - * - * @param enable - */ - private void setFF2CaretFixEnabled(boolean enable) { - if (BrowserInfo.get().isFF2()) { - if (enable) { - Scheduler.get().scheduleDeferred(new Command() { - public void execute() { - DOM.setStyleAttribute(getElement(), "overflow", "auto"); - } - }); - } else { - DOM.setStyleAttribute(getElement(), "overflow", ""); - } - } } @Override @@ -748,14 +695,6 @@ public class VWindow extends VOverlay implements Container, } private void showModalityCurtain() { - if (BrowserInfo.get().isFF2()) { - DOM.setStyleAttribute( - getModalityCurtain(), - "height", - DOM.getElementPropertyInt(RootPanel.getBodyElement(), - "offsetHeight") + "px"); - DOM.setStyleAttribute(getModalityCurtain(), "position", "absolute"); - } DOM.setStyleAttribute(getModalityCurtain(), "zIndex", "" + (windowOrder.indexOf(this) + Z_INDEX)); if (isShowing()) { @@ -777,8 +716,6 @@ public class VWindow extends VOverlay implements Container, private void showDraggingCurtain(boolean show) { if (show && draggingCurtain == null) { - setFF2CaretFixEnabled(false); // makes FF2 slow - draggingCurtain = DOM.createDiv(); DOM.setStyleAttribute(draggingCurtain, "position", "absolute"); DOM.setStyleAttribute(draggingCurtain, "top", "0px"); @@ -791,8 +728,6 @@ public class VWindow extends VOverlay implements Container, DOM.appendChild(RootPanel.getBodyElement(), draggingCurtain); } else if (!show && draggingCurtain != null) { - setFF2CaretFixEnabled(true); // makes FF2 slow - DOM.removeChild(RootPanel.getBodyElement(), draggingCurtain); draggingCurtain = null; } @@ -1056,10 +991,6 @@ public class VWindow extends VOverlay implements Container, // "width" now contains the new width in pixels - if (BrowserInfo.get().isIE6()) { - getElement().getStyle().setProperty("overflow", "hidden"); - } - // Apply the new pixel width getElement().getStyle().setProperty("width", width); @@ -1073,14 +1004,6 @@ public class VWindow extends VOverlay implements Container, DOM.setStyleAttribute(getElement(), "width", rootWidth + "px"); } - // IE6 needs the actual inner content width on the content element, - // otherwise it won't wrap the content properly (no scrollbars - // appear, content flows out of window) - if (BrowserInfo.get().isIE6()) { - DOM.setStyleAttribute(contentPanel.getElement(), "width", - contentAreaInnerWidth + "px"); - } - renderSpace.setWidth(contentAreaInnerWidth); updateShadowSizeAndPosition(); diff --git a/src/com/vaadin/terminal/gwt/client/ui/layout/ChildComponentContainer.java b/src/com/vaadin/terminal/gwt/client/ui/layout/ChildComponentContainer.java index bcb972ca6a..ebb8bd41ea 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/layout/ChildComponentContainer.java +++ b/src/com/vaadin/terminal/gwt/client/ui/layout/ChildComponentContainer.java @@ -9,7 +9,6 @@ import java.util.NoSuchElementException; import com.google.gwt.dom.client.DivElement; import com.google.gwt.dom.client.Document; import com.google.gwt.dom.client.Element; -import com.google.gwt.dom.client.TableElement; import com.google.gwt.user.client.ui.Panel; import com.google.gwt.user.client.ui.Widget; import com.vaadin.terminal.gwt.client.ApplicationConnection; @@ -78,29 +77,12 @@ public class ChildComponentContainer extends Panel { containerDIV = Document.get().createDivElement(); widgetDIV = Document.get().createDivElement(); - if (BrowserInfo.get().isFF2()) { - // Style style = widgetDIV.getStyle(); - // FF2 chokes on some floats very easily. Measuring size escpecially - // becomes terribly slow - TableElement tableEl = Document.get().createTableElement(); - tableEl.setInnerHTML("<tbody><tr><td><div></div></td></tr></tbody>"); - DivElement div = (DivElement) tableEl.getFirstChildElement() - .getFirstChildElement().getFirstChildElement() - .getFirstChildElement(); - tableEl.setCellPadding(0); - tableEl.setCellSpacing(0); - tableEl.setBorder(0); - div.getStyle().setProperty("padding", "0"); - - setElement(tableEl); - containerDIV = div; - } else { - setFloat(widgetDIV, "left"); - setElement(containerDIV); - containerDIV.getStyle().setProperty("height", "0"); - containerDIV.getStyle().setProperty("width", "0px"); - containerDIV.getStyle().setProperty("overflow", "hidden"); - } + + setFloat(widgetDIV, "left"); + setElement(containerDIV); + containerDIV.getStyle().setProperty("height", "0"); + containerDIV.getStyle().setProperty("width", "0px"); + containerDIV.getStyle().setProperty("overflow", "hidden"); if (BrowserInfo.get().isIE()) { /* diff --git a/src/com/vaadin/terminal/gwt/server/WebBrowser.java b/src/com/vaadin/terminal/gwt/server/WebBrowser.java index 4835b3c55b..4ac9cb77b2 100644 --- a/src/com/vaadin/terminal/gwt/server/WebBrowser.java +++ b/src/com/vaadin/terminal/gwt/server/WebBrowser.java @@ -400,4 +400,25 @@ public class WebBrowser implements Terminal { } + /** + * Checks if the browser is so old that it simply won't work with a Vaadin + * application. Can be used to redirect to an alternative page, show + * alternative content or similar. + * + * When this method returns true chances are very high that the browser + * won't work and it does not make sense to direct the user to the Vaadin + * application. + * + * @return true if the browser won't work, false if not the browser is + * supported or might work + */ + public boolean isTooOldToFunctionProperly() { + if (browserDetails == null) { + // Don't know, so assume it will work + return false; + } + + return browserDetails.isTooOldToFunctionProperly(); + } + } diff --git a/src/com/vaadin/ui/AbstractComponent.java b/src/com/vaadin/ui/AbstractComponent.java index eda2fd64ad..b9fffac35f 100644 --- a/src/com/vaadin/ui/AbstractComponent.java +++ b/src/com/vaadin/ui/AbstractComponent.java @@ -19,8 +19,10 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; import com.vaadin.Application; +import com.vaadin.event.ActionManager; import com.vaadin.event.EventRouter; import com.vaadin.event.MethodEventSource; +import com.vaadin.event.ShortcutListener; import com.vaadin.terminal.ErrorMessage; import com.vaadin.terminal.PaintException; import com.vaadin.terminal.PaintTarget; @@ -145,6 +147,12 @@ public abstract class AbstractComponent implements Component, MethodEventSource private ComponentErrorHandler errorHandler = null; + /** + * Keeps track of the Actions added to this component; the actual + * handling/notifying is delegated, usually to the containing window. + */ + private ActionManager actionManager; + /* Constructor */ /** @@ -635,6 +643,9 @@ public abstract class AbstractComponent implements Component, MethodEventSource if (delayedFocus) { focus(); } + if (actionManager != null) { + actionManager.setViewer(getWindow()); + } } /* @@ -642,6 +653,9 @@ public abstract class AbstractComponent implements Component, MethodEventSource * we use the default documentation from implemented interface. */ public void detach() { + if (actionManager != null) { + actionManager.setViewer((Window) null); + } } /** @@ -1517,4 +1531,34 @@ public abstract class AbstractComponent implements Component, MethodEventSource } + /* + * Actions + */ + + /** + * Gets the {@link ActionManager} used to manage the + * {@link ShortcutListener}s added to this {@link Field}. + * + * @return the ActionManager in use + */ + protected ActionManager getActionManager() { + if (actionManager == null) { + actionManager = new ActionManager(); + if (getWindow() != null) { + actionManager.setViewer(getWindow()); + } + } + return actionManager; + } + + public void addShortcutListener(ShortcutListener shortcut) { + getActionManager().addAction(shortcut); + } + + public void removeShortcutListener(ShortcutListener shortcut) { + if (actionManager != null) { + actionManager.removeAction(shortcut); + } + } + }
\ No newline at end of file diff --git a/src/com/vaadin/ui/AbstractField.java b/src/com/vaadin/ui/AbstractField.java index 7899569ea8..fe61d2a86c 100644 --- a/src/com/vaadin/ui/AbstractField.java +++ b/src/com/vaadin/ui/AbstractField.java @@ -18,7 +18,6 @@ import com.vaadin.data.Validatable; import com.vaadin.data.Validator; import com.vaadin.data.Validator.InvalidValueException; import com.vaadin.event.Action; -import com.vaadin.event.ActionManager; import com.vaadin.event.ShortcutAction; import com.vaadin.event.ShortcutListener; import com.vaadin.terminal.CompositeErrorMessage; @@ -131,12 +130,6 @@ public abstract class AbstractField extends AbstractComponent implements Field, */ private boolean validationVisible = true; - /** - * Keeps track of the Actions added to this component; the actual - * handling/notifying is delegated, usually to the containing window. - */ - private ActionManager actionManager; - private boolean valueWasModifiedByDataSourceDuringCommit; /* Component basics */ @@ -1111,27 +1104,6 @@ public abstract class AbstractField extends AbstractComponent implements Field, } /** - * Notifies the component that it is connected to an application. - * - * @see com.vaadin.ui.Component#attach() - */ - @Override - public void attach() { - super.attach(); - if (actionManager != null) { - actionManager.setViewer(getWindow()); - } - } - - @Override - public void detach() { - super.detach(); - if (actionManager != null) { - actionManager.setViewer((Window) null); - } - } - - /** * Is this field required. Required fields must filled by the user. * * If the field is required, it is visually indicated in the user interface. @@ -1244,36 +1216,6 @@ public abstract class AbstractField extends AbstractComponent implements Field, requestRepaint(); } - /* - * Actions - */ - - /** - * Gets the {@link ActionManager} used to manage the - * {@link ShortcutListener}s added to this {@link Field}. - * - * @return the ActionManager in use - */ - protected ActionManager getActionManager() { - if (actionManager == null) { - actionManager = new ActionManager(); - if (getWindow() != null) { - actionManager.setViewer(getWindow()); - } - } - return actionManager; - } - - public void addShortcutListener(ShortcutListener shortcut) { - getActionManager().addAction(shortcut); - } - - public void removeShortcutListener(ShortcutListener shortcut) { - if (actionManager != null) { - actionManager.removeAction(shortcut); - } - } - /** * A ready-made {@link ShortcutListener} that focuses the given * {@link Focusable} (usually a {@link Field}) when the keyboard shortcut is diff --git a/src/com/vaadin/ui/Button.java b/src/com/vaadin/ui/Button.java index 16314f94c3..eb580efe31 100644 --- a/src/com/vaadin/ui/Button.java +++ b/src/com/vaadin/ui/Button.java @@ -9,7 +9,7 @@ import java.io.Serializable; import java.lang.reflect.Method; import java.util.Map; -import com.vaadin.data.Property; +import com.vaadin.event.Action; import com.vaadin.event.FieldEvents; import com.vaadin.event.FieldEvents.BlurEvent; import com.vaadin.event.FieldEvents.BlurListener; @@ -23,8 +23,9 @@ import com.vaadin.terminal.PaintException; import com.vaadin.terminal.PaintTarget; import com.vaadin.terminal.gwt.client.MouseEventDetails; import com.vaadin.terminal.gwt.client.ui.VButton; +import com.vaadin.tools.ReflectTools; import com.vaadin.ui.ClientWidget.LoadStyle; -import com.vaadin.ui.themes.BaseTheme; +import com.vaadin.ui.Component.Focusable; /** * A generic button component. @@ -36,28 +37,22 @@ import com.vaadin.ui.themes.BaseTheme; */ @SuppressWarnings("serial") @ClientWidget(value = VButton.class, loadStyle = LoadStyle.EAGER) -public class Button extends AbstractField implements FieldEvents.BlurNotifier, - FieldEvents.FocusNotifier { +public class Button extends AbstractComponent implements + FieldEvents.BlurNotifier, FieldEvents.FocusNotifier, Focusable, + Action.ShortcutNotifier { /* Private members */ - boolean switchMode = false; - boolean disableOnClick = false; /** - * Creates a new push button. The value of the push button is false and it - * is immediate by default. - * + * Creates a new push button. */ public Button() { - setValue(Boolean.FALSE); } /** - * Creates a new push button. - * - * The value of the push button is false and it is immediate by default. + * Creates a new push button with the given caption. * * @param caption * the Button caption. @@ -68,7 +63,7 @@ public class Button extends AbstractField implements FieldEvents.BlurNotifier, } /** - * Creates a new push button with click listener. + * Creates a new push button with a click listener. * * @param caption * the Button caption. @@ -102,36 +97,6 @@ public class Button extends AbstractField implements FieldEvents.BlurNotifier, } /** - * Creates a new switch button with initial value. - * - * @param state - * the Initial state of the switch-button. - * @param initialState - * @deprecated use {@link CheckBox} instead of Button in "switchmode" - */ - @Deprecated - public Button(String caption, boolean initialState) { - setCaption(caption); - setValue(Boolean.valueOf(initialState)); - setSwitchMode(true); - } - - /** - * Creates a new switch button that is connected to a boolean property. - * - * @param state - * the Initial state of the switch-button. - * @param dataSource - * @deprecated use {@link CheckBox} instead of Button in "switchmode" - */ - @Deprecated - public Button(String caption, Property dataSource) { - setCaption(caption); - setSwitchMode(true); - setPropertyDataSource(dataSource); - } - - /** * Paints the content of this component. * * @param event @@ -145,11 +110,6 @@ public class Button extends AbstractField implements FieldEvents.BlurNotifier, public void paintContent(PaintTarget target) throws PaintException { super.paintContent(target); - if (isSwitchMode()) { - target.addAttribute("type", "switch"); - } - target.addVariable(this, "state", booleanValue()); - if (isDisableOnClick()) { target.addAttribute(VButton.ATTR_DISABLE_ON_CLICK, true); } @@ -176,46 +136,14 @@ public class Button extends AbstractField implements FieldEvents.BlurNotifier, } if (!isReadOnly() && variables.containsKey("state")) { - // Gets the new and old button states - final Boolean newValue = (Boolean) variables.get("state"); - final Boolean oldValue = (Boolean) getValue(); - - if (isSwitchMode()) { - - // For switch button, the event is only sent if the - // switch state is changed - if (newValue != null && !newValue.equals(oldValue) - && !isReadOnly()) { - setValue(newValue); - if (variables.containsKey("mousedetails")) { - fireClick(MouseEventDetails - .deSerialize((String) variables - .get("mousedetails"))); - } else { - // for compatibility with custom implementations which - // don't send mouse details - fireClick(); - } - } + // Send click events when the button is pushed + if (variables.containsKey("mousedetails")) { + fireClick(MouseEventDetails.deSerialize((String) variables + .get("mousedetails"))); } else { - - // Only send click event if the button is pushed - if (newValue.booleanValue()) { - if (variables.containsKey("mousedetails")) { - fireClick(MouseEventDetails - .deSerialize((String) variables - .get("mousedetails"))); - } else { - // for compatibility with custom implementations which - // don't send mouse details - fireClick(); - } - } - - // If the button is true for some reason, release it - if (null == oldValue || oldValue.booleanValue()) { - setValue(Boolean.FALSE); - } + // for compatibility with custom implementations which + // don't send mouse details + fireClick(); } } @@ -228,92 +156,6 @@ public class Button extends AbstractField implements FieldEvents.BlurNotifier, } /** - * Checks if it is switchMode. - * - * @return <code>true</code> if it is in Switch Mode, otherwise - * <code>false</code>. - * @deprecated the {@link CheckBox} component should be used instead of - * Button in switch mode - */ - @Deprecated - public boolean isSwitchMode() { - return switchMode; - } - - /** - * Sets the switchMode. - * - * @param switchMode - * The switchMode to set. - * @deprecated the {@link CheckBox} component should be used instead of - * Button in switch mode - */ - @Deprecated - public void setSwitchMode(boolean switchMode) { - this.switchMode = switchMode; - if (!switchMode) { - setImmediate(true); - if (booleanValue()) { - setValue(Boolean.FALSE); - } - } - } - - /** - * Get the boolean value of the button state. - * - * @return True iff the button is pressed down or checked. - */ - public boolean booleanValue() { - Boolean value = (Boolean) getValue(); - return (null == value) ? false : value.booleanValue(); - } - - /** - * Sets immediate mode. Push buttons can not be set in non-immediate mode. - * - * @see com.vaadin.ui.AbstractComponent#setImmediate(boolean) - */ - @Override - public void setImmediate(boolean immediate) { - // Push buttons are always immediate - super.setImmediate(!isSwitchMode() || immediate); - } - - /** - * The type of the button as a property. - * - * @see com.vaadin.data.Property#getType() - */ - @Override - public Class getType() { - return Boolean.class; - } - - /* Click event */ - - private static final Method BUTTON_CLICK_METHOD; - - /** - * Button style with no decorations. Looks like a link, acts like a button - * - * @deprecated use {@link BaseTheme#BUTTON_LINK} instead. - */ - @Deprecated - public static final String STYLE_LINK = "link"; - - static { - try { - BUTTON_CLICK_METHOD = ClickListener.class.getDeclaredMethod( - "buttonClick", new Class[] { ClickEvent.class }); - } catch (final java.lang.NoSuchMethodException e) { - // This should never happen - throw new java.lang.RuntimeException( - "Internal error finding methods in Button"); - } - } - - /** * Click event. This event is thrown, when the button is clicked. * * @author IT Mill Ltd. @@ -484,6 +326,10 @@ public class Button extends AbstractField implements FieldEvents.BlurNotifier, */ public interface ClickListener extends Serializable { + public static final Method BUTTON_CLICK_METHOD = ReflectTools + .findMethod(ClickListener.class, "buttonClick", + ClickEvent.class); + /** * Called when a {@link Button} has been clicked. A reference to the * button is given by {@link ClickEvent#getButton()}. @@ -502,7 +348,8 @@ public class Button extends AbstractField implements FieldEvents.BlurNotifier, * the Listener to be added. */ public void addListener(ClickListener listener) { - addListener(ClickEvent.class, listener, BUTTON_CLICK_METHOD); + addListener(ClickEvent.class, listener, + ClickListener.BUTTON_CLICK_METHOD); } /** @@ -512,7 +359,8 @@ public class Button extends AbstractField implements FieldEvents.BlurNotifier, * the Listener to be removed. */ public void removeListener(ClickListener listener) { - removeListener(ClickEvent.class, listener, BUTTON_CLICK_METHOD); + removeListener(ClickEvent.class, listener, + ClickListener.BUTTON_CLICK_METHOD); } /** @@ -538,16 +386,6 @@ public class Button extends AbstractField implements FieldEvents.BlurNotifier, fireEvent(new Button.ClickEvent(this, details)); } - @Override - protected void setInternalValue(Object newValue) { - // Make sure only booleans get through - if (null != newValue && !(newValue instanceof Boolean)) { - throw new IllegalArgumentException(getClass().getSimpleName() - + " only accepts Boolean values"); - } - super.setInternalValue(newValue); - } - public void addListener(BlurListener listener) { addListener(BlurEvent.EVENT_ID, BlurEvent.class, listener, BlurListener.blurMethod); @@ -573,6 +411,8 @@ public class Button extends AbstractField implements FieldEvents.BlurNotifier, protected ClickShortcut clickShortcut; + private int tabIndex = 0; + /** * Makes it possible to invoke a click on this button by pressing the given * {@link KeyCode} and (optional) {@link ModifierKey}s.<br/> @@ -685,4 +525,18 @@ public class Button extends AbstractField implements FieldEvents.BlurNotifier, requestRepaint(); } + public int getTabIndex() { + return tabIndex; + } + + public void setTabIndex(int tabIndex) { + this.tabIndex = tabIndex; + + } + + @Override + public void focus() { + // Overridden only to make public + super.focus(); + } } diff --git a/src/com/vaadin/ui/CheckBox.java b/src/com/vaadin/ui/CheckBox.java index b9ae236cb0..11d9619c8c 100644 --- a/src/com/vaadin/ui/CheckBox.java +++ b/src/com/vaadin/ui/CheckBox.java @@ -4,110 +4,129 @@ package com.vaadin.ui; -import java.lang.reflect.Method; +import java.util.Map; import com.vaadin.data.Property; +import com.vaadin.event.FieldEvents.BlurEvent; +import com.vaadin.event.FieldEvents.BlurListener; +import com.vaadin.event.FieldEvents.FocusEvent; +import com.vaadin.event.FieldEvents.FocusListener; +import com.vaadin.terminal.PaintException; +import com.vaadin.terminal.PaintTarget; +import com.vaadin.terminal.gwt.client.ui.VCheckBox; @ClientWidget(com.vaadin.terminal.gwt.client.ui.VCheckBox.class) -public class CheckBox extends Button { +public class CheckBox extends AbstractField { /** - * Creates a new switch button. + * Creates a new checkbox. */ public CheckBox() { - setSwitchMode(true); } /** - * Creates a new switch button with a caption and a set initial state. + * Creates a new checkbox with a set caption. * * @param caption - * the caption of the switch button - * @param initialState - * the initial state of the switch button + * the Checkbox caption. */ - @SuppressWarnings("deprecation") - public CheckBox(String caption, boolean initialState) { - super(caption, initialState); - } - - /** - * Creates a new switch button with a caption and a click listener. - * - * @param caption - * the caption of the switch button - * @param listener - * the click listener - */ - public CheckBox(String caption, ClickListener listener) { - super(caption, listener); - setSwitchMode(true); + public CheckBox(String caption) { + this(); + setCaption(caption); } /** - * Convenience method for creating a new switch button with a method - * listening button clicks. Using this method is discouraged because it - * cannot be checked during compilation. Use - * {@link #addListener(Class, Object, Method)} or - * {@link #addListener(com.vaadin.ui.Component.Listener)} instead. The - * method must have either no parameters, or only one parameter of - * Button.ClickEvent type. + * Creates a new checkbox with a caption and a set initial state. * * @param caption - * the Button caption. - * @param target - * the Object having the method for listening button clicks. - * @param methodName - * the name of the method in target object, that receives button - * click events. + * the caption of the checkbox + * @param initialState + * the initial state of the checkbox */ - public CheckBox(String caption, Object target, String methodName) { - super(caption, target, methodName); - setSwitchMode(true); + public CheckBox(String caption, boolean initialState) { + this(caption); + setValue(initialState); } /** - * Creates a new switch button that is connected to a boolean property. + * Creates a new checkbox that is connected to a boolean property. * * @param state * the Initial state of the switch-button. * @param dataSource */ - @SuppressWarnings("deprecation") public CheckBox(String caption, Property dataSource) { - super(caption, dataSource); - setSwitchMode(true); + this(caption); + setPropertyDataSource(dataSource); } - /** - * Creates a new push button with a set caption. - * - * The value of the push button is always false and they are immediate by - * default. - * - * @param caption - * the Button caption. - */ + @Override + public Class<?> getType() { + return Boolean.class; + } - @SuppressWarnings("deprecation") - public CheckBox(String caption) { - super(caption, false); + @Override + public void paintContent(PaintTarget target) throws PaintException { + super.paintContent(target); + + target.addVariable(this, VCheckBox.VARIABLE_STATE, booleanValue()); } - @Deprecated @Override - public void setSwitchMode(boolean switchMode) - throws UnsupportedOperationException { - if (this.switchMode && !switchMode) { - throw new UnsupportedOperationException( - "CheckBox is always in switch mode (consider using a Button)"); + public void changeVariables(Object source, Map<String, Object> variables) { + super.changeVariables(source, variables); + + if (!isReadOnly() && variables.containsKey(VCheckBox.VARIABLE_STATE)) { + // Gets the new and old states + final Boolean newValue = (Boolean) variables + .get(VCheckBox.VARIABLE_STATE); + final Boolean oldValue = (Boolean) getValue(); + + // The event is only sent if the switch state is changed + if (newValue != null && !newValue.equals(oldValue)) { + setValue(newValue); + } + } + + if (variables.containsKey(FocusEvent.EVENT_ID)) { + fireEvent(new FocusEvent(this)); + } + if (variables.containsKey(BlurEvent.EVENT_ID)) { + fireEvent(new BlurEvent(this)); } - super.setSwitchMode(true); } - @Override - public void setDisableOnClick(boolean disableOnClick) { - throw new UnsupportedOperationException( - "CheckBox does not support disable on click"); + public void addListener(BlurListener listener) { + addListener(BlurEvent.EVENT_ID, BlurEvent.class, listener, + BlurListener.blurMethod); + } + + public void removeListener(BlurListener listener) { + removeListener(BlurEvent.EVENT_ID, BlurEvent.class, listener); + } + + public void addListener(FocusListener listener) { + addListener(FocusEvent.EVENT_ID, FocusEvent.class, listener, + FocusListener.focusMethod); + } + + public void removeListener(FocusListener listener) { + removeListener(FocusEvent.EVENT_ID, FocusEvent.class, listener); + + } + + /** + * Get the boolean value of the checkbox state. + * + * @return True iff the checkbox is checked. + * @deprecated in Vaadin 7.0.0. Retained to ease migration from Vaadin 6 + */ + @Deprecated + public boolean booleanValue() { + // FIXME: How should null really be handled? A default converter that + // converts it to false? The only UI values supported are true and + // false. + Boolean value = (Boolean) getValue(); + return (null == value) ? false : value.booleanValue(); } } diff --git a/src/com/vaadin/ui/NativeButton.java b/src/com/vaadin/ui/NativeButton.java index 6d128b4bb4..40b88951b3 100644 --- a/src/com/vaadin/ui/NativeButton.java +++ b/src/com/vaadin/ui/NativeButton.java @@ -3,7 +3,6 @@ */ package com.vaadin.ui; -import com.vaadin.data.Property; import com.vaadin.terminal.gwt.client.ui.VNativeButton; @SuppressWarnings("serial") @@ -26,30 +25,4 @@ public class NativeButton extends Button { super(caption, target, methodName); } - /** - * Creates a new switch button with initial value. - * - * @param state - * the Initial state of the switch-button. - * @param initialState - * @deprecated use the {@link CheckBox} component instead - */ - @Deprecated - public NativeButton(String caption, boolean initialState) { - super(caption, initialState); - } - - /** - * Creates a new switch button that is connected to a boolean property. - * - * @param state - * the Initial state of the switch-button. - * @param dataSource - * @deprecated use the {@link CheckBox} component instead - */ - @Deprecated - public NativeButton(String caption, Property dataSource) { - super(caption, dataSource); - } - }
\ No newline at end of file diff --git a/src/com/vaadin/ui/RichTextArea.java b/src/com/vaadin/ui/RichTextArea.java index d371e3c181..848e778755 100644 --- a/src/com/vaadin/ui/RichTextArea.java +++ b/src/com/vaadin/ui/RichTextArea.java @@ -129,6 +129,7 @@ public class RichTextArea extends AbstractField { public void setReadOnly(boolean readOnly) { super.setReadOnly(readOnly); // IE6 cannot support multi-classname selectors properly + // TODO Can be optimized now that support for I6 is dropped if (readOnly) { addStyleName("v-richtextarea-readonly"); } else { diff --git a/tests/dummy.txt b/tests/dummy.txt new file mode 100644 index 0000000000..efc8433211 --- /dev/null +++ b/tests/dummy.txt @@ -0,0 +1 @@ +dummy file
diff --git a/tests/integration-testscripts/common/integration_test.tpl b/tests/integration-testscripts/common/integration_test.tpl index 4275d3fab0..ed97710282 100644 --- a/tests/integration-testscripts/common/integration_test.tpl +++ b/tests/integration-testscripts/common/integration_test.tpl @@ -18,7 +18,7 @@ </tr> <tr> <td>pause</td> - <td>500</td> + <td>1000</td> <td></td> </tr> <tr> diff --git a/tests/integration_tests.xml b/tests/integration_tests.xml index 46b6653a23..2f10394ee0 100644 --- a/tests/integration_tests.xml +++ b/tests/integration_tests.xml @@ -101,13 +101,6 @@ </antcall>
</target>
- <target name="integration-test-tomcat4">
- <antcall target="run-generic-integration-test">
- <param name="startDelay" value="300" />
- <param name="target-server" value="tomcat4" />
- </antcall>
- </target>
-
<target name="integration-test-tomcat5">
<antcall target="run-generic-integration-test">
<param name="startDelay" value="300" />
@@ -143,13 +136,6 @@ </antcall>
</target>
- <target name="integration-test-jboss3">
- <antcall target="run-generic-integration-test">
- <param name="startDelay" value="300" />
- <param name="target-server" value="jboss3" />
- </antcall>
- </target>
-
<target name="integration-test-jboss4">
<antcall target="run-generic-integration-test">
<param name="startDelay" value="300" />
@@ -311,7 +297,6 @@ <antcall target="integration-test-gatein3" />
<antcall target="integration-test-glassfish2" />
<antcall target="integration-test-glassfish3" />
- <antcall target="integration-test-jboss3" />
<antcall target="integration-test-jboss4" />
<antcall target="integration-test-jboss5" />
<antcall target="integration-test-jboss6" />
@@ -319,7 +304,6 @@ <antcall target="integration-test-jetty5" />
<antcall target="integration-test-jetty6" />
<antcall target="integration-test-jetty7" />
- <antcall target="integration-test-tomcat4" />
<antcall target="integration-test-tomcat5" />
<antcall target="integration-test-tomcat6" />
<antcall target="integration-test-tomcat7" />
@@ -474,4 +458,4 @@ <target name="integration-test-clean">
<sshexec host="${test.integration.server}" username="${user}" keyfile="${sshkey.file}" command="ant -f ${ant.hub} clean" />
</target>
-</project>
\ No newline at end of file +</project> diff --git a/tests/server-side/com/vaadin/tests/server/component/abstractfield/TestAbstractFieldListeners.java b/tests/server-side/com/vaadin/tests/server/component/abstractfield/TestAbstractFieldListeners.java index 63536baf68..2a5b50f4bb 100644 --- a/tests/server-side/com/vaadin/tests/server/component/abstractfield/TestAbstractFieldListeners.java +++ b/tests/server-side/com/vaadin/tests/server/component/abstractfield/TestAbstractFieldListeners.java @@ -5,16 +5,17 @@ import com.vaadin.data.Property.ReadOnlyStatusChangeListener; import com.vaadin.data.Property.ValueChangeEvent;
import com.vaadin.data.Property.ValueChangeListener;
import com.vaadin.tests.server.component.AbstractListenerMethodsTest;
-import com.vaadin.ui.Button;
+import com.vaadin.ui.CheckBox;
public class TestAbstractFieldListeners extends AbstractListenerMethodsTest {
public void testReadOnlyStatusChangeListenerAddGetRemove() throws Exception {
- testListenerAddGetRemove(Button.class, ReadOnlyStatusChangeEvent.class,
+ testListenerAddGetRemove(CheckBox.class,
+ ReadOnlyStatusChangeEvent.class,
ReadOnlyStatusChangeListener.class);
}
public void testValueChangeListenerAddGetRemove() throws Exception {
- testListenerAddGetRemove(Button.class, ValueChangeEvent.class,
+ testListenerAddGetRemove(CheckBox.class, ValueChangeEvent.class,
ValueChangeListener.class);
}
}
diff --git a/tests/test.xml b/tests/test.xml index 46819970f8..e0f9f3af39 100644 --- a/tests/test.xml +++ b/tests/test.xml @@ -5,7 +5,7 @@ <!-- Configuration --> <!-- ================================================================== --> <!-- Browsers to use for testing --> - <property name="browsers-windows" value="winxp-ie6,winxp-ie7,winxp-ie8,win7-ie9,winxp-firefox36,winxp-firefox4,winxp-firefox5,winxp-firefox6,winxp-firefox7,winxp-firefox8,winxp-safari4,winxp-safari5,winxp-googlechrome13,winxp-googlechrome-stable,winxp-opera1060,winxp-opera11" /> + <property name="browsers-windows" value="winxp-ie8,win7-ie9,winxp-firefox8,winxp-safari5,winxp-googlechrome-stable,winxp-opera11" /> <property name="browsers-linux" value="linux-firefox3,linux-opera10,linux-googlechrome8" /> <property name="browsers-mac" value="osx-firefox3,osx-opera10,osx-googlechrome8,osx-safari4,osx-safari5" /> @@ -205,4 +205,4 @@ <target name="test-package" depends="server-start, run-and-clean-up, server-stop"> </target> -</project>
\ No newline at end of file +</project> diff --git a/tests/testbench/com/vaadin/tests/ListenerOrder.java b/tests/testbench/com/vaadin/tests/ListenerOrder.java index c1d6245222..dcacc407f1 100644 --- a/tests/testbench/com/vaadin/tests/ListenerOrder.java +++ b/tests/testbench/com/vaadin/tests/ListenerOrder.java @@ -49,12 +49,12 @@ public class ListenerOrder extends com.vaadin.Application implements addListeners(b1, 1); b1.addListener(mutualListener); b1.addListener(mutualListener); - b1.addListener((Button.ClickListener) this); + b1.addListener(this); b1.addListener(mutualListener); Button.ClickListener b1Listener = addListeners(b1, 3); b1.addListener(mutualListener); - b1.addListener((Button.ClickListener) this); - b1.addListener((ValueChangeListener) this); + b1.addListener(this); + // b1.addListener((ValueChangeListener) this); b1.addListener(mutualListener); b1.removeListener(b1Listener); // remove non-existing listener diff --git a/tests/testbench/com/vaadin/tests/TestForRichTextEditor.java b/tests/testbench/com/vaadin/tests/TestForRichTextEditor.java index 50b7be91ef..a838d2bf8e 100644 --- a/tests/testbench/com/vaadin/tests/TestForRichTextEditor.java +++ b/tests/testbench/com/vaadin/tests/TestForRichTextEditor.java @@ -4,10 +4,10 @@ package com.vaadin.tests; +import com.vaadin.data.Property; import com.vaadin.data.Property.ValueChangeEvent; import com.vaadin.data.Property.ValueChangeListener; import com.vaadin.ui.Button; -import com.vaadin.ui.Button.ClickEvent; import com.vaadin.ui.CheckBox; import com.vaadin.ui.CustomComponent; import com.vaadin.ui.Label; @@ -50,8 +50,9 @@ public class TestForRichTextEditor extends CustomComponent implements CheckBox b = new CheckBox("enabled"); b.setImmediate(true); - b.addListener(new Button.ClickListener() { - public void buttonClick(ClickEvent event) { + b.addListener(new Property.ValueChangeListener() { + + public void valueChange(ValueChangeEvent event) { rte.setEnabled(!rte.isEnabled()); } }); diff --git a/tests/testbench/com/vaadin/tests/TestForUpload.java b/tests/testbench/com/vaadin/tests/TestForUpload.java index 3fed6b233e..ad916e0cc4 100644 --- a/tests/testbench/com/vaadin/tests/TestForUpload.java +++ b/tests/testbench/com/vaadin/tests/TestForUpload.java @@ -413,7 +413,7 @@ public class TestForUpload extends CustomComponent implements } private void beSluggish() { - if (beSluggish.booleanValue()) { + if ((Boolean) beSluggish.getValue()) { try { Thread.sleep(1000); } catch (InterruptedException e) { @@ -424,7 +424,7 @@ public class TestForUpload extends CustomComponent implements } private void throwExecption() { - if (throwExecption.booleanValue()) { + if ((Boolean) throwExecption.getValue()) { throwExecption.setValue(false); throw new RuntimeException("Test execption in receiver."); } diff --git a/tests/testbench/com/vaadin/tests/components/AbstractComponentTest.java b/tests/testbench/com/vaadin/tests/components/AbstractComponentTest.java index 8344ed216a..14a7a85adb 100644 --- a/tests/testbench/com/vaadin/tests/components/AbstractComponentTest.java +++ b/tests/testbench/com/vaadin/tests/components/AbstractComponentTest.java @@ -8,6 +8,12 @@ import java.util.Locale; import java.util.Map;
import java.util.Set;
+import com.vaadin.event.FieldEvents.BlurEvent;
+import com.vaadin.event.FieldEvents.BlurListener;
+import com.vaadin.event.FieldEvents.BlurNotifier;
+import com.vaadin.event.FieldEvents.FocusEvent;
+import com.vaadin.event.FieldEvents.FocusListener;
+import com.vaadin.event.FieldEvents.FocusNotifier;
import com.vaadin.terminal.Resource;
import com.vaadin.terminal.ThemeResource;
import com.vaadin.tests.util.Log;
@@ -17,7 +23,8 @@ import com.vaadin.ui.MenuBar; import com.vaadin.ui.MenuBar.MenuItem;
public abstract class AbstractComponentTest<T extends AbstractComponent>
- extends AbstractComponentTestCase<T> {
+ extends AbstractComponentTestCase<T> implements FocusListener,
+ BlurListener {
protected static final String TEXT_SHORT = "Short";
protected static final String TEXT_MEDIUM = "This is a semi-long text that might wrap.";
@@ -221,6 +228,39 @@ public abstract class AbstractComponentTest<T extends AbstractComponent> }
+ protected Command<T, Boolean> focusListenerCommand = new Command<T, Boolean>() {
+
+ public void execute(T c, Boolean value, Object data) {
+ if (value) {
+ ((FocusNotifier) c).addListener(AbstractComponentTest.this);
+ } else {
+ ((FocusNotifier) c).removeListener(AbstractComponentTest.this);
+ }
+ }
+ };
+ protected Command<T, Boolean> blurListenerCommand = new Command<T, Boolean>() {
+
+ public void execute(T c, Boolean value, Object data) {
+ if (value) {
+ ((BlurNotifier) c).addListener(AbstractComponentTest.this);
+ } else {
+ ((BlurNotifier) c).removeListener(AbstractComponentTest.this);
+ }
+ }
+ };
+
+ protected void createFocusListener(String category) {
+ createBooleanAction("Focus listener", category, false,
+ focusListenerCommand);
+
+ }
+
+ protected void createBlurListener(String category) {
+ createBooleanAction("Blur listener", category, false,
+ blurListenerCommand);
+
+ }
+
private void createStyleNameSelect(String category) {
LinkedHashMap<String, String> options = new LinkedHashMap<String, String>();
options.put("-", null);
@@ -668,4 +708,13 @@ public abstract class AbstractComponentTest<T extends AbstractComponent> }
}
+
+ public void focus(FocusEvent event) {
+ log(event.getClass().getSimpleName());
+ }
+
+ public void blur(BlurEvent event) {
+ log(event.getClass().getSimpleName());
+ }
+
}
diff --git a/tests/testbench/com/vaadin/tests/components/ComponentTestCase.java b/tests/testbench/com/vaadin/tests/components/ComponentTestCase.java index 1e15f7a47b..a2c186df7e 100644 --- a/tests/testbench/com/vaadin/tests/components/ComponentTestCase.java +++ b/tests/testbench/com/vaadin/tests/components/ComponentTestCase.java @@ -7,6 +7,7 @@ import java.util.List; import com.vaadin.data.Item; import com.vaadin.data.Property; import com.vaadin.data.Property.ValueChangeEvent; +import com.vaadin.data.Property.ValueChangeListener; import com.vaadin.ui.AbstractComponent; import com.vaadin.ui.Alignment; import com.vaadin.ui.Button; @@ -111,9 +112,10 @@ public abstract class ComponentTestCase<T extends AbstractComponent> extends boolean initialState, final Command<T, Boolean> command) { CheckBox checkBox = new CheckBox(caption); - checkBox.addListener(new Button.ClickListener() { - public void buttonClick(ClickEvent event) { - boolean enabled = (Boolean) event.getButton().getValue(); + checkBox.addListener(new ValueChangeListener() { + + public void valueChange(ValueChangeEvent event) { + boolean enabled = (Boolean) event.getProperty().getValue(); doCommand(command, enabled); } }); @@ -132,10 +134,13 @@ public abstract class ComponentTestCase<T extends AbstractComponent> extends final Command<T, Boolean> command) { Button button = new Button(caption); + button.setData(Boolean.FALSE); button.addListener(new Button.ClickListener() { public void buttonClick(ClickEvent event) { - boolean enabled = (Boolean) event.getButton().getValue(); - doCommand(command, enabled); + Button b = event.getButton(); + boolean state = (Boolean) b.getData(); + b.setData(!state); + doCommand(command, state); } }); diff --git a/tests/testbench/com/vaadin/tests/components/abstractcomponent/EnableState.java b/tests/testbench/com/vaadin/tests/components/abstractcomponent/EnableState.java index 5d4f0f2acf..3d77b09c70 100644 --- a/tests/testbench/com/vaadin/tests/components/abstractcomponent/EnableState.java +++ b/tests/testbench/com/vaadin/tests/components/abstractcomponent/EnableState.java @@ -1,8 +1,9 @@ package com.vaadin.tests.components.abstractcomponent;
+import com.vaadin.data.Property;
+import com.vaadin.data.Property.ValueChangeEvent;
import com.vaadin.tests.components.AbstractTestCase;
import com.vaadin.ui.Button;
-import com.vaadin.ui.Button.ClickEvent;
import com.vaadin.ui.CheckBox;
import com.vaadin.ui.Panel;
import com.vaadin.ui.Window;
@@ -17,9 +18,10 @@ public class EnableState extends AbstractTestCase { panel.addComponent(button);
CheckBox enable = new CheckBox("Toggle button enabled", true);
- enable.addListener(new Button.ClickListener() {
- public void buttonClick(ClickEvent event) {
- boolean enabled = (Boolean) event.getButton().getValue();
+ enable.addListener(new Property.ValueChangeListener() {
+
+ public void valueChange(ValueChangeEvent event) {
+ boolean enabled = (Boolean) event.getProperty().getValue();
button.setEnabled(enabled);
// button.requestRepaint();
}
@@ -27,17 +29,19 @@ public class EnableState extends AbstractTestCase { enable.setImmediate(true);
CheckBox caption = new CheckBox("Toggle button caption", true);
- caption.addListener(new Button.ClickListener() {
- public void buttonClick(ClickEvent event) {
+ caption.addListener(new Property.ValueChangeListener() {
+
+ public void valueChange(ValueChangeEvent event) {
button.setCaption(button.getCaption() + "+");
}
});
caption.setImmediate(true);
CheckBox visible = new CheckBox("Toggle panel visibility", true);
- visible.addListener(new Button.ClickListener() {
- public void buttonClick(ClickEvent event) {
- boolean visible = (Boolean) event.getButton().getValue();
+ visible.addListener(new Property.ValueChangeListener() {
+
+ public void valueChange(ValueChangeEvent event) {
+ boolean visible = (Boolean) event.getProperty().getValue();
panel.setVisible(visible);
}
@@ -45,9 +49,10 @@ public class EnableState extends AbstractTestCase { visible.setImmediate(true);
CheckBox panelEnable = new CheckBox("Toggle panel enabled", true);
- panelEnable.addListener(new Button.ClickListener() {
- public void buttonClick(ClickEvent event) {
- boolean enabled = (Boolean) event.getButton().getValue();
+ panelEnable.addListener(new Property.ValueChangeListener() {
+
+ public void valueChange(ValueChangeEvent event) {
+ boolean enabled = (Boolean) event.getProperty().getValue();
panel.setEnabled(enabled);
}
});
diff --git a/tests/testbench/com/vaadin/tests/components/abstractfield/AbstractFieldTest.java b/tests/testbench/com/vaadin/tests/components/abstractfield/AbstractFieldTest.java index 1c8e728908..064d81edc8 100644 --- a/tests/testbench/com/vaadin/tests/components/abstractfield/AbstractFieldTest.java +++ b/tests/testbench/com/vaadin/tests/components/abstractfield/AbstractFieldTest.java @@ -13,11 +13,7 @@ import com.vaadin.data.Property; import com.vaadin.data.Property.ReadOnlyStatusChangeEvent;
import com.vaadin.data.Property.ReadOnlyStatusChangeListener;
import com.vaadin.data.Property.ValueChangeListener;
-import com.vaadin.event.FieldEvents.BlurEvent;
-import com.vaadin.event.FieldEvents.BlurListener;
import com.vaadin.event.FieldEvents.BlurNotifier;
-import com.vaadin.event.FieldEvents.FocusEvent;
-import com.vaadin.event.FieldEvents.FocusListener;
import com.vaadin.event.FieldEvents.FocusNotifier;
import com.vaadin.tests.components.AbstractComponentTest;
import com.vaadin.ui.AbstractField;
@@ -26,13 +22,20 @@ import com.vaadin.ui.MenuBar.MenuItem; public abstract class AbstractFieldTest<T extends AbstractField> extends
AbstractComponentTest<T> implements ValueChangeListener,
- ReadOnlyStatusChangeListener, FocusListener, BlurListener {
+ ReadOnlyStatusChangeListener {
@Override
protected void createActions() {
super.createActions();
createBooleanAction("Required", CATEGORY_STATE, false, requiredCommand);
createRequiredErrorSelect(CATEGORY_DECORATIONS);
+ if (FocusNotifier.class.isAssignableFrom(getTestClass())) {
+ createFocusListener(CATEGORY_LISTENERS);
+ }
+
+ if (BlurNotifier.class.isAssignableFrom(getTestClass())) {
+ createBlurListener(CATEGORY_LISTENERS);
+ }
createValueChangeListener(CATEGORY_LISTENERS);
createReadOnlyStatusChangeListener(CATEGORY_LISTENERS);
@@ -82,14 +85,6 @@ public abstract class AbstractFieldTest<T extends AbstractField> extends createSelectAction("Required error message", category, options, "-",
requiredErrorMessageCommand);
- if (FocusNotifier.class.isAssignableFrom(getTestClass())) {
- createFocusListener(CATEGORY_LISTENERS);
- }
-
- if (BlurNotifier.class.isAssignableFrom(getTestClass())) {
- createBlurListener(CATEGORY_LISTENERS);
- }
-
}
private void createValueChangeListener(String category) {
@@ -104,18 +99,6 @@ public abstract class AbstractFieldTest<T extends AbstractField> extends false, readonlyStatusChangeListenerCommand);
}
- private void createFocusListener(String category) {
- createBooleanAction("Focus listener", category, false,
- focusListenerCommand);
-
- }
-
- private void createBlurListener(String category) {
- createBooleanAction("Blur listener", category, false,
- blurListenerCommand);
-
- }
-
protected Command<T, Boolean> valueChangeListenerCommand = new Command<T, Boolean>() {
public void execute(T c, Boolean value, Object data) {
@@ -136,26 +119,7 @@ public abstract class AbstractFieldTest<T extends AbstractField> extends }
}
};
- protected Command<T, Boolean> focusListenerCommand = new Command<T, Boolean>() {
-
- public void execute(T c, Boolean value, Object data) {
- if (value) {
- ((FocusNotifier) c).addListener(AbstractFieldTest.this);
- } else {
- ((FocusNotifier) c).removeListener(AbstractFieldTest.this);
- }
- }
- };
- protected Command<T, Boolean> blurListenerCommand = new Command<T, Boolean>() {
- public void execute(T c, Boolean value, Object data) {
- if (value) {
- ((BlurNotifier) c).addListener(AbstractFieldTest.this);
- } else {
- ((BlurNotifier) c).removeListener(AbstractFieldTest.this);
- }
- }
- };
protected Command<T, Object> setValueCommand = new Command<T, Object>() {
public void execute(T c, Object value, Object data) {
@@ -208,14 +172,6 @@ public abstract class AbstractFieldTest<T extends AbstractField> extends log(event.getClass().getSimpleName());
}
- public void focus(FocusEvent event) {
- log(event.getClass().getSimpleName());
- }
-
- public void blur(BlurEvent event) {
- log(event.getClass().getSimpleName());
- }
-
protected void createSetTextValueAction(String category) {
String subCategory = "Set text value";
createCategory(subCategory, category);
diff --git a/tests/testbench/com/vaadin/tests/components/button/ButtonDisableOnClick.html b/tests/testbench/com/vaadin/tests/components/button/ButtonDisableOnClick.html index 850d553b5b..d39f72ef1f 100644 --- a/tests/testbench/com/vaadin/tests/components/button/ButtonDisableOnClick.html +++ b/tests/testbench/com/vaadin/tests/components/button/ButtonDisableOnClick.html @@ -16,7 +16,7 @@ <td>/run/com.vaadin.tests.components.button.Buttons2?restartApplication</td> <td></td> </tr> -<!--value change listener--> +<!--click listener--> <tr> <td>mouseClick</td> <td>vaadin=runcomvaadintestscomponentsbuttonButtons2::PID_Smenu#item0</td> @@ -29,7 +29,7 @@ </tr> <tr> <td>mouseClick</td> - <td>vaadin=runcomvaadintestscomponentsbuttonButtons2::Root/VOverlay[1]/VMenuBar[0]#item4</td> + <td>vaadin=runcomvaadintestscomponentsbuttonButtons2::Root/VOverlay[1]/VMenuBar[0]#item2</td> <td>35,8</td> </tr> <!--disable on click--> @@ -45,7 +45,7 @@ </tr> <tr> <td>mouseClick</td> - <td>vaadin=runcomvaadintestscomponentsbuttonButtons2::Root/VOverlay[1]/VMenuBar[0]#item1</td> + <td>vaadin=runcomvaadintestscomponentsbuttonButtons2::Root/VOverlay[1]/VMenuBar[0]#item0</td> <td>22,4</td> </tr> <tr> @@ -133,7 +133,7 @@ </tr> <tr> <td>mouseClick</td> - <td>vaadin=runcomvaadintestscomponentsbuttonButtons2::Root/VOverlay[1]/VMenuBar[0]#item1</td> + <td>vaadin=runcomvaadintestscomponentsbuttonButtons2::Root/VOverlay[1]/VMenuBar[0]#item0</td> <td>36,3</td> </tr> <tr> @@ -151,7 +151,6 @@ <td>vaadin=runcomvaadintestscomponentsbuttonButtons2::PID_StestComponent</td> <td>v-disabled</td> </tr> - </tbody></table> </body> </html> diff --git a/tests/testbench/com/vaadin/tests/components/button/ButtonMouseDetails.java b/tests/testbench/com/vaadin/tests/components/button/ButtonMouseDetails.java index 40caf620a8..4dc3fcd0fb 100644 --- a/tests/testbench/com/vaadin/tests/components/button/ButtonMouseDetails.java +++ b/tests/testbench/com/vaadin/tests/components/button/ButtonMouseDetails.java @@ -3,7 +3,6 @@ package com.vaadin.tests.components.button; import com.vaadin.tests.components.TestBase; import com.vaadin.ui.Button; import com.vaadin.ui.Button.ClickEvent; -import com.vaadin.ui.CheckBox; import com.vaadin.ui.Label; public class ButtonMouseDetails extends TestBase { @@ -46,10 +45,6 @@ public class ButtonMouseDetails extends TestBase { button.setImmediate(true); addComponent(button); - CheckBox cb = new CheckBox("CHECK ME!", clickListener); - cb.setImmediate(true); - addComponent(cb); - addComponent(out); } diff --git a/tests/testbench/com/vaadin/tests/components/button/Buttons.java b/tests/testbench/com/vaadin/tests/components/button/Buttons.java index afbc90d197..573c95c2b8 100644 --- a/tests/testbench/com/vaadin/tests/components/button/Buttons.java +++ b/tests/testbench/com/vaadin/tests/components/button/Buttons.java @@ -46,13 +46,7 @@ public class Buttons extends ComponentTestCase<Button> { l.setWidth("100%"); l.setHeight("65px"); - boolean ie6 = (getBrowser().isIE() && getBrowser() - .getBrowserMajorVersion() == 6); - if (!ie6 || !nat) { - // Skip this NativeButton for IE6 as it can't decide how to - // render it - addTestComponent(l); - } + addTestComponent(l); } } diff --git a/tests/testbench/com/vaadin/tests/components/button/Buttons2.java b/tests/testbench/com/vaadin/tests/components/button/Buttons2.java index c18e736082..0a1bd96ead 100644 --- a/tests/testbench/com/vaadin/tests/components/button/Buttons2.java +++ b/tests/testbench/com/vaadin/tests/components/button/Buttons2.java @@ -2,22 +2,14 @@ package com.vaadin.tests.components.button; import java.util.LinkedHashMap;
-import com.vaadin.tests.components.abstractfield.AbstractFieldTest;
+import com.vaadin.tests.components.AbstractComponentTest;
import com.vaadin.ui.Button;
import com.vaadin.ui.Button.ClickEvent;
import com.vaadin.ui.Button.ClickListener;
import com.vaadin.ui.themes.Reindeer;
-public class Buttons2<T extends Button> extends AbstractFieldTest<T> implements
- ClickListener {
-
- private Command<T, Boolean> switchModeCommand = new Command<T, Boolean>() {
-
- @SuppressWarnings("deprecation")
- public void execute(T c, Boolean value, Object data) {
- c.setSwitchMode(value);
- }
- };
+public class Buttons2<T extends Button> extends AbstractComponentTest<T>
+ implements ClickListener {
private Command<T, Boolean> disableOnClickCommand = new Command<T, Boolean>() {
@@ -47,8 +39,9 @@ public class Buttons2<T extends Button> extends AbstractFieldTest<T> implements protected void createActions() {
super.createActions();
- createBooleanAction("Switch mode", CATEGORY_FEATURES, false,
- switchModeCommand);
+ createFocusListener(CATEGORY_LISTENERS);
+ createBlurListener(CATEGORY_LISTENERS);
+
createBooleanAction("Disable on click", CATEGORY_FEATURES, false,
disableOnClickCommand);
addClickListener(CATEGORY_LISTENERS);
diff --git a/tests/testbench/com/vaadin/tests/components/checkbox/CheckBoxes2.java b/tests/testbench/com/vaadin/tests/components/checkbox/CheckBoxes2.java index 20f1ece65e..4a98f09808 100644 --- a/tests/testbench/com/vaadin/tests/components/checkbox/CheckBoxes2.java +++ b/tests/testbench/com/vaadin/tests/components/checkbox/CheckBoxes2.java @@ -8,46 +8,15 @@ import com.vaadin.ui.CheckBox; public class CheckBoxes2 extends AbstractFieldTest<CheckBox> implements
ClickListener {
- // cannot extend Buttons2 because of Switch mode problems
-
@Override
protected Class<CheckBox> getTestClass() {
return CheckBox.class;
}
- private Command<CheckBox, Boolean> switchModeCommand = new Command<CheckBox, Boolean>() {
-
- @SuppressWarnings("deprecation")
- public void execute(CheckBox c, Boolean value, Object data) {
- c.setSwitchMode(value);
- }
- };
-
- private Command<CheckBox, Boolean> clickListenerCommand = new Command<CheckBox, Boolean>() {
-
- public void execute(CheckBox c, Boolean value, Object data) {
- if (value) {
- c.addListener((ClickListener) CheckBoxes2.this);
- } else {
- c.removeListener((ClickListener) CheckBoxes2.this);
- }
-
- }
- };
-
@Override
protected void createActions() {
super.createActions();
- createBooleanAction("Switch mode", CATEGORY_FEATURES, true,
- switchModeCommand);
- addClickListener(CATEGORY_LISTENERS);
- }
-
- private void addClickListener(String category) {
- createBooleanAction("Click listener", category, false,
- clickListenerCommand);
-
}
public void buttonClick(ClickEvent event) {
diff --git a/tests/testbench/com/vaadin/tests/components/datefield/CustomDateFormat.html b/tests/testbench/com/vaadin/tests/components/datefield/CustomDateFormat.html index 5561fd37cb..ed92afe378 100644 --- a/tests/testbench/com/vaadin/tests/components/datefield/CustomDateFormat.html +++ b/tests/testbench/com/vaadin/tests/components/datefield/CustomDateFormat.html @@ -19,7 +19,7 @@ <tr> <td>assertValue</td> <td>vaadin=runcomvaadintestscomponentsdatefieldCustomDateFormat::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VPopupCalendar[0]/domChild[0]</td> - <td>1. tammikuuta 2010 0:00:00 UTC+2</td> + <td>1. tammikuuta 2010 klo 0.00.00</td> </tr> </tbody></table> diff --git a/tests/testbench/com/vaadin/tests/components/formlayout/FormLayoutReplaceComponent.java b/tests/testbench/com/vaadin/tests/components/formlayout/FormLayoutReplaceComponent.java index e42d64201e..0ba50f2277 100644 --- a/tests/testbench/com/vaadin/tests/components/formlayout/FormLayoutReplaceComponent.java +++ b/tests/testbench/com/vaadin/tests/components/formlayout/FormLayoutReplaceComponent.java @@ -1,7 +1,8 @@ package com.vaadin.tests.components.formlayout;
+
+import com.vaadin.data.Property.ValueChangeEvent;
+import com.vaadin.data.Property.ValueChangeListener;
import com.vaadin.tests.components.TestBase;
-import com.vaadin.ui.Button;
-import com.vaadin.ui.Button.ClickListener;
import com.vaadin.ui.CheckBox;
import com.vaadin.ui.FormLayout;
import com.vaadin.ui.TextField;
@@ -14,7 +15,7 @@ public class FormLayoutReplaceComponent extends TestBase { }
- public class FL extends FormLayout implements ClickListener {
+ public class FL extends FormLayout implements ValueChangeListener {
private TextField messages;
private CheckBox control;
@@ -37,10 +38,11 @@ public class FormLayoutReplaceComponent extends TestBase { addComponent(messages);
}
- public final void buttonClick(Button.ClickEvent e) {
- if (e.getButton() == control) {
- messages.setVisible(control.booleanValue());
+ public void valueChange(ValueChangeEvent event) {
+ if (event.getProperty() == control) {
+ messages.setVisible((Boolean) control.getValue());
}
+
}
}
diff --git a/tests/testbench/com/vaadin/tests/components/nativebutton/NativeButtonDisableOnClick.html b/tests/testbench/com/vaadin/tests/components/nativebutton/NativeButtonDisableOnClick.html index 75eab71892..5f80004c7c 100644 --- a/tests/testbench/com/vaadin/tests/components/nativebutton/NativeButtonDisableOnClick.html +++ b/tests/testbench/com/vaadin/tests/components/nativebutton/NativeButtonDisableOnClick.html @@ -16,7 +16,7 @@ <td>/run/com.vaadin.tests.components.nativebutton.NativeButtonTest?restartApplication</td> <td></td> </tr> -<!--value change listener--> +<!-- click listener--> <tr> <td>mouseClick</td> <td>vaadin=runcomvaadintestscomponentsnativebuttonNativeButtonTest::PID_Smenu#item0</td> @@ -29,7 +29,7 @@ </tr> <tr> <td>mouseClick</td> - <td>vaadin=runcomvaadintestscomponentsnativebuttonNativeButtonTest::Root/VOverlay[1]/VMenuBar[0]#item4</td> + <td>vaadin=runcomvaadintestscomponentsnativebuttonNativeButtonTest::Root/VOverlay[1]/VMenuBar[0]#item2</td> <td>35,8</td> </tr> <!--disable on click--> @@ -45,7 +45,7 @@ </tr> <tr> <td>mouseClick</td> - <td>vaadin=runcomvaadintestscomponentsnativebuttonNativeButtonTest::Root/VOverlay[1]/VMenuBar[0]#item1</td> + <td>vaadin=runcomvaadintestscomponentsnativebuttonNativeButtonTest::Root/VOverlay[1]/VMenuBar[0]#item0</td> <td>22,4</td> </tr> <tr> @@ -133,7 +133,7 @@ </tr> <tr> <td>mouseClick</td> - <td>vaadin=runcomvaadintestscomponentsnativebuttonNativeButtonTest::Root/VOverlay[1]/VMenuBar[0]#item1</td> + <td>vaadin=runcomvaadintestscomponentsnativebuttonNativeButtonTest::Root/VOverlay[1]/VMenuBar[0]#item0</td> <td>36,3</td> </tr> <tr> diff --git a/tests/testbench/com/vaadin/tests/components/notification/NotificationsHtmlAllowed.java b/tests/testbench/com/vaadin/tests/components/notification/NotificationsHtmlAllowed.java index 9157c30174..470e4d5836 100644 --- a/tests/testbench/com/vaadin/tests/components/notification/NotificationsHtmlAllowed.java +++ b/tests/testbench/com/vaadin/tests/components/notification/NotificationsHtmlAllowed.java @@ -57,7 +57,7 @@ public class NotificationsHtmlAllowed extends TestBase implements ClickListener public void buttonClick(ClickEvent event) {
Notification n = makeNotification();
Window window;
- if (showInSubwindow.booleanValue()) {
+ if ((Boolean) showInSubwindow.getValue()) {
window = subwindow;
} else {
window = event.getButton().getWindow();
@@ -70,7 +70,7 @@ public class NotificationsHtmlAllowed extends TestBase implements ClickListener Notification n = new Notification((String) captionField.getValue(),
(String) messageField.getValue(),
Notification.TYPE_HUMANIZED_MESSAGE,
- htmlAllowedBox.booleanValue());
+ (Boolean) htmlAllowedBox.getValue());
return n;
}
}
diff --git a/tests/testbench/com/vaadin/tests/components/table/ColumnHeaderAlignments.java b/tests/testbench/com/vaadin/tests/components/table/ColumnHeaderAlignments.java index 0c625f1c5d..fdcb458a6a 100644 --- a/tests/testbench/com/vaadin/tests/components/table/ColumnHeaderAlignments.java +++ b/tests/testbench/com/vaadin/tests/components/table/ColumnHeaderAlignments.java @@ -4,8 +4,6 @@ import com.vaadin.data.Item; import com.vaadin.data.Property.ValueChangeEvent; import com.vaadin.data.Property.ValueChangeListener; import com.vaadin.tests.components.TestBase; -import com.vaadin.ui.Button.ClickEvent; -import com.vaadin.ui.Button.ClickListener; import com.vaadin.ui.CheckBox; import com.vaadin.ui.HorizontalLayout; import com.vaadin.ui.Select; @@ -37,14 +35,14 @@ public class ColumnHeaderAlignments extends TestBase { } }); addComponent(theme); - CheckBox footers = new CheckBox("Show footers", new ClickListener() { - public void buttonClick(ClickEvent event) { - fooTable.setFooterVisible((Boolean) event.getButton() - .getValue()); - barTable.setFooterVisible((Boolean) event.getButton() - .getValue()); - bazTable.setFooterVisible((Boolean) event.getButton() - .getValue()); + CheckBox footers = new CheckBox("Show footers"); + footers.addListener(new ValueChangeListener() { + + public void valueChange(ValueChangeEvent event) { + boolean visible = (Boolean) event.getProperty().getValue(); + fooTable.setFooterVisible(visible); + barTable.setFooterVisible(visible); + bazTable.setFooterVisible(visible); } }); footers.setImmediate(true); diff --git a/tests/testbench/com/vaadin/tests/components/table/EditableTableLeak.java b/tests/testbench/com/vaadin/tests/components/table/EditableTableLeak.java index 6561ff0076..a6f25f4569 100644 --- a/tests/testbench/com/vaadin/tests/components/table/EditableTableLeak.java +++ b/tests/testbench/com/vaadin/tests/components/table/EditableTableLeak.java @@ -7,6 +7,8 @@ import java.io.Serializable; import java.util.HashMap; import com.vaadin.data.Container; +import com.vaadin.data.Property.ValueChangeEvent; +import com.vaadin.data.Property.ValueChangeListener; import com.vaadin.tests.components.TestBase; import com.vaadin.tests.util.TestUtils; import com.vaadin.ui.Button; @@ -83,9 +85,9 @@ public class EditableTableLeak extends TestBase { protected void setup() { addComponent(useFieldFactory); useFieldFactory.setImmediate(true); - useFieldFactory.addListener(new Button.ClickListener() { + useFieldFactory.addListener(new ValueChangeListener() { - public void buttonClick(ClickEvent event) { + public void valueChange(ValueChangeEvent event) { if ((Boolean) useFieldFactory.getValue()) { table.setTableFieldFactory(new CachingFieldFactory()); } else { diff --git a/tests/testbench/com/vaadin/tests/components/table/Footer.java b/tests/testbench/com/vaadin/tests/components/table/Footer.java index d6a9853fff..c962ce8468 100644 --- a/tests/testbench/com/vaadin/tests/components/table/Footer.java +++ b/tests/testbench/com/vaadin/tests/components/table/Footer.java @@ -51,7 +51,7 @@ public class Footer extends TestBase { visible.setImmediate(true); visible.addListener(new Property.ValueChangeListener() { public void valueChange(ValueChangeEvent event) { - table.setFooterVisible(visible.booleanValue()); + table.setFooterVisible((Boolean) visible.getValue()); } }); diff --git a/tests/testbench/com/vaadin/tests/components/table/FooterClick.java b/tests/testbench/com/vaadin/tests/components/table/FooterClick.java index b92d6ef362..f0075c2364 100644 --- a/tests/testbench/com/vaadin/tests/components/table/FooterClick.java +++ b/tests/testbench/com/vaadin/tests/components/table/FooterClick.java @@ -2,11 +2,11 @@ package com.vaadin.tests.components.table; import com.vaadin.data.Container; import com.vaadin.data.Item; +import com.vaadin.data.Property; +import com.vaadin.data.Property.ValueChangeEvent; import com.vaadin.data.util.IndexedContainer; import com.vaadin.tests.components.TestBase; import com.vaadin.tests.util.Log; -import com.vaadin.ui.Button.ClickEvent; -import com.vaadin.ui.Button.ClickListener; import com.vaadin.ui.CheckBox; import com.vaadin.ui.Table; import com.vaadin.ui.Table.FooterClickEvent; @@ -51,10 +51,10 @@ public class FooterClick extends TestBase { CheckBox immediateCheckbox = new CheckBox("Immediate"); immediateCheckbox.setImmediate(true); immediateCheckbox.setValue(table.isImmediate()); - immediateCheckbox.addListener(new ClickListener() { + immediateCheckbox.addListener(new Property.ValueChangeListener() { - public void buttonClick(ClickEvent event) { - table.setImmediate(event.getButton().booleanValue()); + public void valueChange(ValueChangeEvent event) { + table.setImmediate((Boolean) event.getProperty().getValue()); } }); @@ -62,13 +62,14 @@ public class FooterClick extends TestBase { "Column reordering allowed"); columnReorderingCheckbox.setImmediate(true); columnReorderingCheckbox.setValue(table.isColumnReorderingAllowed()); - columnReorderingCheckbox.addListener(new ClickListener() { - - public void buttonClick(ClickEvent event) { - table.setColumnReorderingAllowed(event.getButton() - .booleanValue()); - } - }); + columnReorderingCheckbox + .addListener(new Property.ValueChangeListener() { + + public void valueChange(ValueChangeEvent event) { + table.setColumnReorderingAllowed((Boolean) event + .getProperty().getValue()); + } + }); addComponent(immediateCheckbox); addComponent(columnReorderingCheckbox); diff --git a/tests/testbench/com/vaadin/tests/components/table/HeaderClick.java b/tests/testbench/com/vaadin/tests/components/table/HeaderClick.java index 3cb11781b1..c29fde927c 100644 --- a/tests/testbench/com/vaadin/tests/components/table/HeaderClick.java +++ b/tests/testbench/com/vaadin/tests/components/table/HeaderClick.java @@ -2,10 +2,10 @@ package com.vaadin.tests.components.table; import com.vaadin.data.Container; import com.vaadin.data.Item; +import com.vaadin.data.Property; +import com.vaadin.data.Property.ValueChangeEvent; import com.vaadin.data.util.IndexedContainer; import com.vaadin.tests.components.TestBase; -import com.vaadin.ui.Button.ClickEvent; -import com.vaadin.ui.Button.ClickListener; import com.vaadin.ui.CheckBox; import com.vaadin.ui.Table; import com.vaadin.ui.Table.HeaderClickEvent; @@ -36,20 +36,20 @@ public class HeaderClick extends TestBase { CheckBox immediateCheckbox = new CheckBox("Immediate"); immediateCheckbox.setImmediate(true); immediateCheckbox.setValue(table.isImmediate()); - immediateCheckbox.addListener(new ClickListener() { + immediateCheckbox.addListener(new Property.ValueChangeListener() { - public void buttonClick(ClickEvent event) { - table.setImmediate(event.getButton().booleanValue()); + public void valueChange(ValueChangeEvent event) { + table.setImmediate((Boolean) event.getProperty().getValue()); } }); CheckBox sortEnabledCheckbox = new CheckBox("Sortable"); sortEnabledCheckbox.setImmediate(true); sortEnabledCheckbox.setValue(!table.isSortDisabled()); - sortEnabledCheckbox.addListener(new ClickListener() { + sortEnabledCheckbox.addListener(new Property.ValueChangeListener() { - public void buttonClick(ClickEvent event) { - table.setSortDisabled(!event.getButton().booleanValue()); + public void valueChange(ValueChangeEvent event) { + table.setSortDisabled(!(Boolean) event.getProperty().getValue()); } }); @@ -57,13 +57,14 @@ public class HeaderClick extends TestBase { "Column reordering allowed"); columnReorderingCheckbox.setImmediate(true); columnReorderingCheckbox.setValue(table.isColumnReorderingAllowed()); - columnReorderingCheckbox.addListener(new ClickListener() { - - public void buttonClick(ClickEvent event) { - table.setColumnReorderingAllowed(event.getButton() - .booleanValue()); - } - }); + columnReorderingCheckbox + .addListener(new Property.ValueChangeListener() { + + public void valueChange(ValueChangeEvent event) { + table.setColumnReorderingAllowed((Boolean) event + .getProperty().getValue()); + } + }); addComponent(immediateCheckbox); addComponent(sortEnabledCheckbox); diff --git a/tests/testbench/com/vaadin/tests/components/table/HeaderUpdateWhenNoRows.java b/tests/testbench/com/vaadin/tests/components/table/HeaderUpdateWhenNoRows.java index bf1f9ca883..9c79b65fa5 100644 --- a/tests/testbench/com/vaadin/tests/components/table/HeaderUpdateWhenNoRows.java +++ b/tests/testbench/com/vaadin/tests/components/table/HeaderUpdateWhenNoRows.java @@ -1,7 +1,8 @@ package com.vaadin.tests.components.table; +import com.vaadin.data.Property.ValueChangeEvent; +import com.vaadin.data.Property.ValueChangeListener; import com.vaadin.tests.components.TestBase; -import com.vaadin.ui.Button.ClickEvent; import com.vaadin.ui.CheckBox; import com.vaadin.ui.Table; @@ -16,16 +17,17 @@ public class HeaderUpdateWhenNoRows extends TestBase { table.setHeight("100px"); table.setImmediate(true); - CheckBox showHeaders = new CheckBox("Show headers", - new CheckBox.ClickListener() { - public void buttonClick(ClickEvent event) { - if (event.getButton().booleanValue()) { - table.setColumnHeaderMode(Table.COLUMN_HEADER_MODE_EXPLICIT_DEFAULTS_ID); - } else { - table.setColumnHeaderMode(Table.COLUMN_HEADER_MODE_HIDDEN); - } - } - }); + CheckBox showHeaders = new CheckBox("Show headers"); + showHeaders.addListener(new ValueChangeListener() { + public void valueChange(ValueChangeEvent event) { + if ((Boolean) event.getProperty().getValue()) { + table.setColumnHeaderMode(Table.COLUMN_HEADER_MODE_EXPLICIT_DEFAULTS_ID); + } else { + table.setColumnHeaderMode(Table.COLUMN_HEADER_MODE_HIDDEN); + } + } + + }); showHeaders.setImmediate(true); showHeaders.setValue(true); diff --git a/tests/testbench/com/vaadin/tests/components/table/TableHeightWhenHidingHeaders.java b/tests/testbench/com/vaadin/tests/components/table/TableHeightWhenHidingHeaders.java index d0b7631f10..5398474a3c 100644 --- a/tests/testbench/com/vaadin/tests/components/table/TableHeightWhenHidingHeaders.java +++ b/tests/testbench/com/vaadin/tests/components/table/TableHeightWhenHidingHeaders.java @@ -1,7 +1,8 @@ package com.vaadin.tests.components.table; +import com.vaadin.data.Property.ValueChangeEvent; +import com.vaadin.data.Property.ValueChangeListener; import com.vaadin.tests.components.AbstractTestCase; -import com.vaadin.ui.Button.ClickEvent; import com.vaadin.ui.CheckBox; import com.vaadin.ui.Table; import com.vaadin.ui.Window; @@ -30,24 +31,25 @@ public class TableHeightWhenHidingHeaders extends AbstractTestCase { table.addItem("1").getItemProperty("Name").setValue("Item 1"); table.addItem("2").getItemProperty("Name").setValue("Item 2"); - CheckBox showHeaders = new CheckBox("Show headers", - new CheckBox.ClickListener() { - public void buttonClick(ClickEvent event) { - if (event.getButton().booleanValue()) { - // table body height is now 77px, which together - // with header makes 100px - table.setColumnHeaderMode(Table.COLUMN_HEADER_MODE_EXPLICIT_DEFAULTS_ID); - } else { - table.setColumnHeaderMode(Table.COLUMN_HEADER_MODE_HIDDEN); - // header disappears, but table body height stays at - // 77px - // and below the body is an empty area (same height - // as header would - // have) + CheckBox showHeaders = new CheckBox("Show headers"); + showHeaders.addListener(new ValueChangeListener() { - } - } - }); + public void valueChange(ValueChangeEvent event) { + if ((Boolean) event.getProperty().getValue()) { + // table body height is now 77px, which together + // with header makes 100px + table.setColumnHeaderMode(Table.COLUMN_HEADER_MODE_EXPLICIT_DEFAULTS_ID); + } else { + table.setColumnHeaderMode(Table.COLUMN_HEADER_MODE_HIDDEN); + // header disappears, but table body height stays at + // 77px + // and below the body is an empty area (same height + // as header would + // have) + + } + } + }); showHeaders.setValue(true); showHeaders.setImmediate(true); diff --git a/tests/testbench/com/vaadin/tests/components/table/TableScrollOnFocus.java b/tests/testbench/com/vaadin/tests/components/table/TableScrollOnFocus.java index 05e101a5f9..e6e121cba0 100644 --- a/tests/testbench/com/vaadin/tests/components/table/TableScrollOnFocus.java +++ b/tests/testbench/com/vaadin/tests/components/table/TableScrollOnFocus.java @@ -15,7 +15,7 @@ public class TableScrollOnFocus extends TestBase { chkSelectable.setImmediate(true);
chkSelectable.addListener(new ValueChangeListener() {
public void valueChange(ValueChangeEvent event) {
- table.setSelectable(chkSelectable.booleanValue());
+ table.setSelectable((Boolean) chkSelectable.getValue());
}
});
diff --git a/tests/testbench/com/vaadin/tests/components/table/TableUndefinedSize.html b/tests/testbench/com/vaadin/tests/components/table/TableUndefinedSize.html index fbb6f4c7f9..bfdf180e8b 100644 --- a/tests/testbench/com/vaadin/tests/components/table/TableUndefinedSize.html +++ b/tests/testbench/com/vaadin/tests/components/table/TableUndefinedSize.html @@ -27,9 +27,9 @@ <td></td> </tr> <tr> - <td>verifyTextPresent</td> - <td>exact:1: Size 200x200 pixels</td> - <td></td> + <td>assertText</td> + <td>vaadin=runcomvaadintestscomponentstableTableUndefinedSize::PID_SLog_row_0</td> + <td>4. Size 200x200 pixels</td> </tr> <tr> <td>screenCapture</td> @@ -42,9 +42,9 @@ <td></td> </tr> <tr> - <td>verifyTextPresent</td> - <td>exact:2: Size 600x200 pixels<br />1: Size 200x200 pixels</td> - <td></td> + <td>assertText</td> + <td>vaadin=runcomvaadintestscomponentstableTableUndefinedSize::PID_SLog_row_0</td> + <td>5. Size 600x200 pixels</td> </tr> <tr> <td>screenCapture</td> @@ -57,9 +57,9 @@ <td></td> </tr> <tr> - <td>verifyTextPresent</td> - <td>exact:3: Size undefined<br />2: Size 600x200 pixels<br />1: Size 200x200 pixels</td> - <td></td> + <td>assertText</td> + <td>vaadin=runcomvaadintestscomponentstableTableUndefinedSize::PID_SLog_row_0</td> + <td>6. Size undefined</td> </tr> <tr> <td>select</td> @@ -67,9 +67,9 @@ <td>label=4</td> </tr> <tr> - <td>verifyTextPresent</td> - <td>exact:4: Page length: 4<br />3: Size undefined<br />2: Size 600x200 pixels<br />1: Size 200x200 pixels</td> - <td></td> + <td>assertText</td> + <td>vaadin=runcomvaadintestscomponentstableTableUndefinedSize::PID_SLog_row_0</td> + <td>7. Page length: 4</td> </tr> <tr> <td>screenCapture</td> @@ -97,14 +97,14 @@ <td>3,6</td> </tr> <tr> - <td>verifyTextPresent</td> + <td>assertText</td> + <td>vaadin=runcomvaadintestscomponentstableTableUndefinedSize::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[3]/VScrollTable[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[2]</td> <td>Column 2</td> - <td></td> </tr> <tr> - <td>verifyTextPresent</td> + <td>assertText</td> + <td>vaadin=runcomvaadintestscomponentstableTableUndefinedSize::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[3]/VScrollTable[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[1]/domChild[2]</td> <td>Column 3</td> - <td></td> </tr> <tr> <td>screenCapture</td> @@ -121,7 +121,6 @@ <td></td> <td>AllColumnsShown</td> </tr> - </tbody></table> </body> </html> diff --git a/tests/testbench/com/vaadin/tests/components/table/TableUndefinedSize.java b/tests/testbench/com/vaadin/tests/components/table/TableUndefinedSize.java index 2b3204953b..c8e813e23d 100644 --- a/tests/testbench/com/vaadin/tests/components/table/TableUndefinedSize.java +++ b/tests/testbench/com/vaadin/tests/components/table/TableUndefinedSize.java @@ -5,22 +5,20 @@ import java.util.Arrays; import com.vaadin.data.Container; import com.vaadin.data.Property; import com.vaadin.data.Property.ValueChangeEvent; +import com.vaadin.data.Property.ValueChangeListener; import com.vaadin.data.util.IndexedContainer; -import com.vaadin.data.util.ObjectProperty; import com.vaadin.tests.components.TestBase; +import com.vaadin.tests.util.Log; import com.vaadin.ui.Button; import com.vaadin.ui.Button.ClickEvent; import com.vaadin.ui.CheckBox; import com.vaadin.ui.HorizontalLayout; -import com.vaadin.ui.Label; import com.vaadin.ui.NativeSelect; import com.vaadin.ui.Table; public class TableUndefinedSize extends TestBase { - private ObjectProperty<String> output = new ObjectProperty<String>(""); - - private int counter = 1; + private Log log; @Override protected void setup() { @@ -37,17 +35,14 @@ public class TableUndefinedSize extends TestBase { tbl.setImmediate(true); tbl.setColumnCollapsingAllowed(true); - Label output = new Label(this.output); - output.setWidth("400px"); - output.setHeight("100px"); - output.setContentMode(Label.CONTENT_XHTML); + log = new Log(5); controls.addComponent(new Button("Fixed size (200x200)", new Button.ClickListener() { public void buttonClick(ClickEvent event) { tbl.setWidth("200px"); tbl.setHeight("200px"); - print("Size 200x200 pixels"); + log.log("Size 200x200 pixels"); } })); @@ -56,7 +51,7 @@ public class TableUndefinedSize extends TestBase { public void buttonClick(ClickEvent event) { tbl.setWidth("600px"); tbl.setHeight("200px"); - print("Size 600x200 pixels"); + log.log("Size 600x200 pixels"); } })); @@ -64,7 +59,7 @@ public class TableUndefinedSize extends TestBase { new Button.ClickListener() { public void buttonClick(ClickEvent event) { tbl.setSizeUndefined(); - print("Size undefined"); + log.log("Size undefined"); } })); @@ -77,35 +72,39 @@ public class TableUndefinedSize extends TestBase { int pageLength = Integer.valueOf(event.getProperty().getValue() .toString()); tbl.setPageLength(pageLength); - print("Page length: " + pageLength); + log.log("Page length: " + pageLength); } }); controls.addComponent(pageLength); - CheckBox cb = new CheckBox("Column 1", new Button.ClickListener() { - public void buttonClick(ClickEvent event) { - tbl.setColumnCollapsed("Column 1", !event.getButton() - .booleanValue()); - if (event.getButton().booleanValue()) { - print("Column 1 visible"); + CheckBox cb = new CheckBox("Column 1"); + cb.addListener(new ValueChangeListener() { + + public void valueChange(ValueChangeEvent event) { + Boolean value = (Boolean) event.getProperty().getValue(); + tbl.setColumnCollapsed("Column 1", !value); + if (value) { + log.log("Column 1 visible"); } else { - print("Column 1 hidden"); + log.log("Column 1 hidden"); } - } + } }); cb.setImmediate(true); cb.setValue(true); visibilities.addComponent(cb); - cb = new CheckBox("Column 2", new Button.ClickListener() { - public void buttonClick(ClickEvent event) { - tbl.setColumnCollapsed("Column 2", !event.getButton() - .booleanValue()); + cb = new CheckBox("Column 2"); + cb.addListener(new ValueChangeListener() { + + public void valueChange(ValueChangeEvent event) { + Boolean value = (Boolean) event.getProperty().getValue(); + tbl.setColumnCollapsed("Column 2", !value); - if (event.getButton().booleanValue()) { - print("Column 2 visible"); + if (value) { + log.log("Column 2 visible"); } else { - print("Column 2 hidden"); + log.log("Column 2 hidden"); } } }); @@ -113,15 +112,19 @@ public class TableUndefinedSize extends TestBase { cb.setValue(true); visibilities.addComponent(cb); - cb = new CheckBox("Column 3", new Button.ClickListener() { - public void buttonClick(ClickEvent event) { - tbl.setColumnCollapsed("Column 3", !event.getButton() - .booleanValue()); + cb = new CheckBox("Column 3"); - if (event.getButton().booleanValue()) { - print("Column 3 visible"); + cb.addListener(new ValueChangeListener() { + + public void valueChange(ValueChangeEvent event) { + Boolean value = (Boolean) event.getProperty().getValue(); + + tbl.setColumnCollapsed("Column 3", !value); + + if (value) { + log.log("Column 3 visible"); } else { - print("Column 3 hidden"); + log.log("Column 3 hidden"); } } }); @@ -129,16 +132,11 @@ public class TableUndefinedSize extends TestBase { cb.setValue(true); visibilities.addComponent(cb); - addComponent(output); + addComponent(log); addComponent(tbl); } - protected void print(String message) { - output.setValue(counter + ": " + message + "<br/>" + output.getValue()); - counter++; - } - protected Container createDataSource() { IndexedContainer c = new IndexedContainer(); c.addContainerProperty("Column 1", String.class, "Column 1"); diff --git a/tests/testbench/com/vaadin/tests/components/tree/TreeFiltering.java b/tests/testbench/com/vaadin/tests/components/tree/TreeFiltering.java index ff1ac96e26..f81df5f06b 100644 --- a/tests/testbench/com/vaadin/tests/components/tree/TreeFiltering.java +++ b/tests/testbench/com/vaadin/tests/components/tree/TreeFiltering.java @@ -48,8 +48,8 @@ public class TreeFiltering extends TestBase { filterType.addListener(new ValueChangeListener() {
public void valueChange(ValueChangeEvent event) {
- cont.setIncludeParentsWhenFiltering(((CheckBox) event
- .getProperty()).booleanValue());
+ cont.setIncludeParentsWhenFiltering((Boolean) ((CheckBox) event
+ .getProperty()).getValue());
ccTree.requestRepaint();
}
});
diff --git a/tests/testbench/com/vaadin/tests/components/window/LazyWindowResize.java b/tests/testbench/com/vaadin/tests/components/window/LazyWindowResize.java index 6c051f4b1e..aed4d6fc53 100644 --- a/tests/testbench/com/vaadin/tests/components/window/LazyWindowResize.java +++ b/tests/testbench/com/vaadin/tests/components/window/LazyWindowResize.java @@ -1,11 +1,10 @@ package com.vaadin.tests.components.window; +import com.vaadin.data.Property.ValueChangeEvent; +import com.vaadin.data.Property.ValueChangeListener; import com.vaadin.tests.components.AbstractTestCase; import com.vaadin.tests.util.Log; import com.vaadin.tests.util.LoremIpsum; -import com.vaadin.ui.Button; -import com.vaadin.ui.Button.ClickEvent; -import com.vaadin.ui.Button.ClickListener; import com.vaadin.ui.CheckBox; import com.vaadin.ui.Label; import com.vaadin.ui.Window; @@ -16,7 +15,7 @@ public class LazyWindowResize extends AbstractTestCase { private Window mainWindow; private Window subWindow; - private Button lazyMode; + private CheckBox lazyMode; private Log log = new Log(5); private CheckBox resizeListenerCheckBox; @@ -56,19 +55,19 @@ public class LazyWindowResize extends AbstractTestCase { lazyMode = new CheckBox("Lazy resize"); lazyMode.setImmediate(true); - lazyMode.addListener(new ClickListener() { + lazyMode.addListener(new ValueChangeListener() { - public void buttonClick(ClickEvent event) { - setLazy(lazyMode.booleanValue()); + public void valueChange(ValueChangeEvent event) { + setLazy((Boolean) lazyMode.getValue()); } }); resizeListenerCheckBox = new CheckBox("Resize listener"); resizeListenerCheckBox.setImmediate(true); - resizeListenerCheckBox.addListener(new ClickListener() { + resizeListenerCheckBox.addListener(new ValueChangeListener() { - public void buttonClick(ClickEvent event) { - if (resizeListenerCheckBox.booleanValue()) { + public void valueChange(ValueChangeEvent event) { + if ((Boolean) resizeListenerCheckBox.getValue()) { subWindow.addListener(resizeListener); mainWindow.addListener(resizeListener); } else { @@ -81,11 +80,11 @@ public class LazyWindowResize extends AbstractTestCase { }); immediateCheckBox = new CheckBox("Windows immediate"); immediateCheckBox.setImmediate(true); - immediateCheckBox.addListener(new ClickListener() { + immediateCheckBox.addListener(new ValueChangeListener() { - public void buttonClick(ClickEvent event) { - mainWindow.setImmediate(immediateCheckBox.booleanValue()); - subWindow.setImmediate(immediateCheckBox.booleanValue()); + public void valueChange(ValueChangeEvent event) { + mainWindow.setImmediate((Boolean) immediateCheckBox.getValue()); + subWindow.setImmediate((Boolean) immediateCheckBox.getValue()); } diff --git a/tests/testbench/com/vaadin/tests/components/window/WindowResizeListener.java b/tests/testbench/com/vaadin/tests/components/window/WindowResizeListener.java index 62f998e20e..a225028726 100644 --- a/tests/testbench/com/vaadin/tests/components/window/WindowResizeListener.java +++ b/tests/testbench/com/vaadin/tests/components/window/WindowResizeListener.java @@ -1,9 +1,10 @@ package com.vaadin.tests.components.window; +import com.vaadin.data.Property; +import com.vaadin.data.Property.ValueChangeEvent; import com.vaadin.terminal.Sizeable; import com.vaadin.tests.components.TestBase; import com.vaadin.ui.Button; -import com.vaadin.ui.Button.ClickEvent; import com.vaadin.ui.CheckBox; import com.vaadin.ui.Label; import com.vaadin.ui.Layout; @@ -43,9 +44,10 @@ public class WindowResizeListener extends TestBase { CheckBox subwindow = new CheckBox("show subwindow"); subwindow.setImmediate(true); - subwindow.addListener(new Button.ClickListener() { - public void buttonClick(ClickEvent event) { - if (event.getButton().booleanValue()) { + subwindow.addListener(new Property.ValueChangeListener() { + + public void valueChange(ValueChangeEvent event) { + if ((Boolean) event.getProperty().getValue()) { getMainWindow().addWindow(subwin); } else { getMainWindow().removeWindow(subwin); @@ -55,9 +57,10 @@ public class WindowResizeListener extends TestBase { getLayout().addComponent(subwindow); CheckBox immediate = new CheckBox("immediate"); - immediate.addListener(new Button.ClickListener() { - public void buttonClick(ClickEvent event) { - boolean booleanValue = event.getButton().booleanValue(); + immediate.addListener(new Property.ValueChangeListener() { + + public void valueChange(ValueChangeEvent event) { + boolean booleanValue = (Boolean) event.getProperty().getValue(); getMainWindow().setImmediate(booleanValue); subwin.setImmediate(booleanValue); } diff --git a/tests/testbench/com/vaadin/tests/containers/BeanItemContainerFilteringTest.java b/tests/testbench/com/vaadin/tests/containers/BeanItemContainerFilteringTest.java index 0d47cc426d..23521d5164 100644 --- a/tests/testbench/com/vaadin/tests/containers/BeanItemContainerFilteringTest.java +++ b/tests/testbench/com/vaadin/tests/containers/BeanItemContainerFilteringTest.java @@ -1,6 +1,8 @@ package com.vaadin.tests.containers;
import com.vaadin.data.Item;
+import com.vaadin.data.Property.ValueChangeEvent;
+import com.vaadin.data.Property.ValueChangeListener;
import com.vaadin.data.util.BeanItemContainer;
import com.vaadin.terminal.Sizeable;
import com.vaadin.tests.components.TestBase;
@@ -84,17 +86,17 @@ public class BeanItemContainerFilteringTest extends TestBase { filterString = new TextField("Filter string:", "1");
vl.addComponent(filterString);
- final CheckBox cb = new CheckBox("Filter on value",
- new Button.ClickListener() {
- public void buttonClick(ClickEvent event) {
- container.removeAllContainerFilters();
- if (((CheckBox) event.getSource()).booleanValue()) {
- container.addContainerFilter("value",
- filterString.getValue().toString(),
- false, false);
- }
- }
- });
+ final CheckBox cb = new CheckBox("Filter on value");
+ cb.addListener(new ValueChangeListener() {
+
+ public void valueChange(ValueChangeEvent event) {
+ container.removeAllContainerFilters();
+ if ((Boolean) ((CheckBox) event.getProperty()).getValue()) {
+ container.addContainerFilter("value", filterString
+ .getValue().toString(), false, false);
+ }
+ }
+ });
cb.setImmediate(true);
vl.addComponent(cb);
diff --git a/tests/testbench/com/vaadin/tests/containers/IndexedContainerFilteringTest.java b/tests/testbench/com/vaadin/tests/containers/IndexedContainerFilteringTest.java index 154118a393..9b41523068 100644 --- a/tests/testbench/com/vaadin/tests/containers/IndexedContainerFilteringTest.java +++ b/tests/testbench/com/vaadin/tests/containers/IndexedContainerFilteringTest.java @@ -1,6 +1,8 @@ package com.vaadin.tests.containers;
import com.vaadin.data.Item;
+import com.vaadin.data.Property.ValueChangeEvent;
+import com.vaadin.data.Property.ValueChangeListener;
import com.vaadin.data.util.IndexedContainer;
import com.vaadin.terminal.Sizeable;
import com.vaadin.tests.components.TestBase;
@@ -51,10 +53,12 @@ public class IndexedContainerFilteringTest extends TestBase { filterString = new TextField("Filter string:", "1");
vl.addComponent(filterString);
- final CheckBox cb = new CheckBox("Filter", new Button.ClickListener() {
- public void buttonClick(ClickEvent event) {
+ final CheckBox cb = new CheckBox("Filter");
+ cb.addListener(new ValueChangeListener() {
+
+ public void valueChange(ValueChangeEvent event) {
container.removeAllContainerFilters();
- if (((CheckBox) event.getSource()).booleanValue()) {
+ if ((Boolean) ((CheckBox) event.getProperty()).getValue()) {
container.addContainerFilter("column1", filterString
.getValue().toString(), false, false);
}
diff --git a/tests/testbench/com/vaadin/tests/containers/TestItemSorter.java b/tests/testbench/com/vaadin/tests/containers/TestItemSorter.java index bf7ce6175a..0a1c592876 100644 --- a/tests/testbench/com/vaadin/tests/containers/TestItemSorter.java +++ b/tests/testbench/com/vaadin/tests/containers/TestItemSorter.java @@ -29,8 +29,8 @@ public class TestItemSorter extends TestBase { public int compare(Object o1, Object o2) { if (o1 instanceof CheckBox && o2 instanceof CheckBox) { - Boolean b1 = ((CheckBox) o1).booleanValue(); - return b1.compareTo(((CheckBox) o2).booleanValue()); + Boolean b1 = (Boolean) ((CheckBox) o1).getValue(); + return b1.compareTo((Boolean) ((CheckBox) o2).getValue()); } else if (o1 instanceof Button && o2 instanceof Button) { String caption1 = ((Button) o1).getCaption().toLowerCase(); String caption2 = ((Button) o2).getCaption().toLowerCase(); diff --git a/tests/testbench/com/vaadin/tests/dd/TreeDragStart.java b/tests/testbench/com/vaadin/tests/dd/TreeDragStart.java index 4a719bfa7f..4ef7023aa6 100644 --- a/tests/testbench/com/vaadin/tests/dd/TreeDragStart.java +++ b/tests/testbench/com/vaadin/tests/dd/TreeDragStart.java @@ -48,7 +48,7 @@ public class TreeDragStart extends TestBase { checkBox.setValue(true); checkBox.addListener(new ValueChangeListener() { public void valueChange(ValueChangeEvent event) { - if (((CheckBox) event.getProperty()).booleanValue()) { + if ((Boolean) ((CheckBox) event.getProperty()).getValue()) { tree.setDragMode(TreeDragMode.NODE); } else { tree.setDragMode(TreeDragMode.NONE); diff --git a/tests/testbench/com/vaadin/tests/integration/EmbedSizeTest.java b/tests/testbench/com/vaadin/tests/integration/EmbedSizeTest.java index 479af4aa87..05827e1f0f 100644 --- a/tests/testbench/com/vaadin/tests/integration/EmbedSizeTest.java +++ b/tests/testbench/com/vaadin/tests/integration/EmbedSizeTest.java @@ -1,9 +1,9 @@ package com.vaadin.tests.integration; +import com.vaadin.data.Property.ValueChangeEvent; +import com.vaadin.data.Property.ValueChangeListener; import com.vaadin.tests.components.TestBase; import com.vaadin.tests.util.Log; -import com.vaadin.ui.Button; -import com.vaadin.ui.Button.ClickEvent; import com.vaadin.ui.CheckBox; import com.vaadin.ui.Window; import com.vaadin.ui.Window.ResizeEvent; @@ -19,15 +19,16 @@ public class EmbedSizeTest extends TestBase { mainWindow.getContent().setSizeUndefined(); mainWindow.setImmediate(true); - CheckBox lazyCheckBox = new CheckBox("Lazy resize", - new Button.ClickListener() { - public void buttonClick(ClickEvent event) { - boolean resizeLazy = Boolean.TRUE == event.getButton() - .getValue(); - getMainWindow().setResizeLazy(resizeLazy); - log.log("Resize lazy: " + resizeLazy); - } - }); + CheckBox lazyCheckBox = new CheckBox("Lazy resize"); + lazyCheckBox.addListener(new ValueChangeListener() { + + public void valueChange(ValueChangeEvent event) { + CheckBox cb = (CheckBox) event.getProperty(); + Boolean resizeLazy = (Boolean) cb.getValue(); + getMainWindow().setResizeLazy(resizeLazy); + log.log("Resize lazy: " + resizeLazy); + } + }); lazyCheckBox.setValue(Boolean.FALSE); lazyCheckBox.setImmediate(true); addComponent(lazyCheckBox); diff --git a/tests/testbench/com/vaadin/tests/integration/LiferayThemeDemo.java b/tests/testbench/com/vaadin/tests/integration/LiferayThemeDemo.java index 4267a7ea91..6428186b54 100644 --- a/tests/testbench/com/vaadin/tests/integration/LiferayThemeDemo.java +++ b/tests/testbench/com/vaadin/tests/integration/LiferayThemeDemo.java @@ -5,15 +5,17 @@ import java.util.Iterator; import java.util.Locale; import com.vaadin.Application; +import com.vaadin.data.Property; +import com.vaadin.data.Property.ValueChangeEvent; import com.vaadin.event.Action; import com.vaadin.terminal.ExternalResource; import com.vaadin.terminal.Resource; import com.vaadin.terminal.ThemeResource; +import com.vaadin.ui.AbstractComponent; import com.vaadin.ui.AbstractSelect; import com.vaadin.ui.Accordion; import com.vaadin.ui.Button; import com.vaadin.ui.Button.ClickEvent; -import com.vaadin.ui.Button.ClickListener; import com.vaadin.ui.CheckBox; import com.vaadin.ui.ComboBox; import com.vaadin.ui.Component; @@ -139,7 +141,7 @@ public class LiferayThemeDemo extends Application { l.setMargin(true); l.setSpacing(true); - Button b = new Button("Normal Button"); + AbstractComponent b = new Button("Normal Button"); b.setDescription("This is a tooltip!"); l.addComponent(b); @@ -310,12 +312,14 @@ public class LiferayThemeDemo extends Application { } } - closable.addListener(new Button.ClickListener() { - public void buttonClick(ClickEvent event) { + closable.addListener(new Property.ValueChangeListener() { + + public void valueChange(ValueChangeEvent event) { Iterator<Component> it = ts.getComponentIterator(); for (; it.hasNext();) { Component c = it.next(); - ts.getTab(c).setClosable(event.getButton().booleanValue()); + ts.getTab(c).setClosable( + (Boolean) event.getProperty().getValue()); } } }); @@ -462,12 +466,13 @@ public class LiferayThemeDemo extends Application { sp3.setSecondComponent(sp4); l.addComponent(sp3); - lockCheckBox.addListener(new ClickListener() { - public void buttonClick(ClickEvent event) { - sp.setLocked(event.getButton().booleanValue()); - sp2.setLocked(event.getButton().booleanValue()); - sp3.setLocked(event.getButton().booleanValue()); - sp4.setLocked(event.getButton().booleanValue()); + lockCheckBox.addListener(new Property.ValueChangeListener() { + + public void valueChange(ValueChangeEvent event) { + sp.setLocked((Boolean) event.getProperty().getValue()); + sp2.setLocked((Boolean) event.getProperty().getValue()); + sp3.setLocked((Boolean) event.getProperty().getValue()); + sp4.setLocked((Boolean) event.getProperty().getValue()); } }); diff --git a/tests/testbench/com/vaadin/tests/layouts/FormLayoutWithInvisibleComponent.java b/tests/testbench/com/vaadin/tests/layouts/FormLayoutWithInvisibleComponent.java index e29c7559b3..bef997775d 100644 --- a/tests/testbench/com/vaadin/tests/layouts/FormLayoutWithInvisibleComponent.java +++ b/tests/testbench/com/vaadin/tests/layouts/FormLayoutWithInvisibleComponent.java @@ -1,8 +1,8 @@ package com.vaadin.tests.layouts; +import com.vaadin.data.Property.ValueChangeEvent; +import com.vaadin.data.Property.ValueChangeListener; import com.vaadin.tests.components.TestBase; -import com.vaadin.ui.Button; -import com.vaadin.ui.Button.ClickEvent; import com.vaadin.ui.CheckBox; import com.vaadin.ui.FormLayout; import com.vaadin.ui.TextField; @@ -24,15 +24,16 @@ public class FormLayoutWithInvisibleComponent extends TestBase { @Override protected void setup() { FormLayout formLayout = new FormLayout(); - CheckBox control = new CheckBox("Messages On/Off", - new Button.ClickListener() { - public void buttonClick(ClickEvent event) { - messages.setVisible(event.getButton().booleanValue()); - messages.setRequired(true); - messages.setCaption("Messages visible"); - } - - }); + CheckBox control = new CheckBox("Messages On/Off"); + control.addListener(new ValueChangeListener() { + + public void valueChange(ValueChangeEvent event) { + messages.setVisible((Boolean) event.getProperty().getValue()); + messages.setRequired(true); + messages.setCaption("Messages visible"); + } + + }); control.setImmediate(true); formLayout.addComponent(control); diff --git a/tests/testbench/com/vaadin/tests/layouts/TestLayoutPerformance.java b/tests/testbench/com/vaadin/tests/layouts/TestLayoutPerformance.java index 31ee15983e..992c037611 100644 --- a/tests/testbench/com/vaadin/tests/layouts/TestLayoutPerformance.java +++ b/tests/testbench/com/vaadin/tests/layouts/TestLayoutPerformance.java @@ -69,7 +69,7 @@ public class TestLayoutPerformance extends TestBase { Layout layout = getCurrentLayout();
for (int i = 0; i < components; i++) {
Component component = newTestComponent();
- if (cb.booleanValue()) {
+ if ((Boolean) cb.getValue()) {
component.setCaption("caption " + i);
}
layout.addComponent(component);
diff --git a/tests/testbench/com/vaadin/tests/layouts/layouttester/LayoutTesterApplication.html b/tests/testbench/com/vaadin/tests/layouts/layouttester/LayoutTesterApplication.html index b0e2444986..4bc409b881 100644 --- a/tests/testbench/com/vaadin/tests/layouts/layouttester/LayoutTesterApplication.html +++ b/tests/testbench/com/vaadin/tests/layouts/layouttester/LayoutTesterApplication.html @@ -316,12 +316,6 @@ <td>vaadin=runcomvaadintestslayoutslayouttesterLayoutTesterApplication::/VVerticalLayout[0]/ChildComponentContainer[0]/VHorizontalLayout[0]/ChildComponentContainer[0]/VButton[0]/domChild[0]</td> <td></td> </tr> -<!-- Only for IE6 so it has time to load images and adjust --> -<tr> - <td>pause</td> - <td>2000</td> - <td></td> -</tr> <tr> <td>screenCapture</td> <td></td> diff --git a/tests/testbench/com/vaadin/tests/themes/ButtonsTest.java b/tests/testbench/com/vaadin/tests/themes/ButtonsTest.java index 9425cd9bd2..8171d3ef09 100644 --- a/tests/testbench/com/vaadin/tests/themes/ButtonsTest.java +++ b/tests/testbench/com/vaadin/tests/themes/ButtonsTest.java @@ -1,5 +1,7 @@ package com.vaadin.tests.themes; +import com.vaadin.data.Property.ValueChangeEvent; +import com.vaadin.data.Property.ValueChangeListener; import com.vaadin.terminal.ThemeResource; import com.vaadin.terminal.UserError; import com.vaadin.ui.Button; @@ -29,8 +31,10 @@ public class ButtonsTest extends com.vaadin.Application { setMainWindow(main); setTheme("reindeer"); - themeToggle = new CheckBox("Runo theme", new Button.ClickListener() { - public void buttonClick(ClickEvent event) { + themeToggle = new CheckBox("Runo theme"); + themeToggle.addListener(new ValueChangeListener() { + + public void valueChange(ValueChangeEvent event) { if (getTheme() == "reindeer") { setTheme("runo"); } else { @@ -41,8 +45,10 @@ public class ButtonsTest extends com.vaadin.Application { themeToggle.setStyleName("small"); themeToggle.setImmediate(true); - styleToggle = new CheckBox("Black style", new Button.ClickListener() { - public void buttonClick(ClickEvent event) { + styleToggle = new CheckBox("Black style"); + styleToggle.addListener(new ValueChangeListener() { + + public void valueChange(ValueChangeEvent event) { if (!main.getContent().getStyleName().contains("black")) { main.getContent().setStyleName("black"); } else { @@ -53,8 +59,10 @@ public class ButtonsTest extends com.vaadin.Application { styleToggle.setImmediate(true); styleToggle.setStyleName("small"); - iconToggle = new CheckBox("64x icons", new Button.ClickListener() { - public void buttonClick(ClickEvent event) { + iconToggle = new CheckBox("64x icons"); + iconToggle.addListener(new ValueChangeListener() { + + public void valueChange(ValueChangeEvent event) { largeIcons = !largeIcons; recreateAll(); } @@ -62,13 +70,14 @@ public class ButtonsTest extends com.vaadin.Application { iconToggle.setImmediate(true); iconToggle.setStyleName("small"); - nativeToggle = new CheckBox("Native buttons", - new Button.ClickListener() { - public void buttonClick(ClickEvent event) { - nativeButtons = !nativeButtons; - recreateAll(); - } - }); + nativeToggle = new CheckBox("Native buttons"); + nativeToggle.addListener(new ValueChangeListener() { + + public void valueChange(ValueChangeEvent event) { + nativeButtons = !nativeButtons; + recreateAll(); + } + }); nativeToggle.setImmediate(true); nativeToggle.setStyleName("small"); diff --git a/tests/testbench/com/vaadin/tests/tickets/Ticket1710.java b/tests/testbench/com/vaadin/tests/tickets/Ticket1710.java index 404301dfa5..f2fe32484b 100644 --- a/tests/testbench/com/vaadin/tests/tickets/Ticket1710.java +++ b/tests/testbench/com/vaadin/tests/tickets/Ticket1710.java @@ -139,9 +139,6 @@ public class Ticket1710 extends com.vaadin.Application { private Form getFormPanelExample() {
Form f = new Form();
f.setCaption("Test form");
- Button fb1 = new Button("Test button");
- fb1.setComponentError(new SystemError("Test error"));
- f.addField("fb1", fb1);
CheckBox fb2 = new CheckBox("Test button", true);
fb2.setComponentError(new SystemError("Test error"));
f.addField("fb2", fb2);
diff --git a/tests/testbench/com/vaadin/tests/tickets/Ticket1983.java b/tests/testbench/com/vaadin/tests/tickets/Ticket1983.java index fbab5c5244..7df646676a 100644 --- a/tests/testbench/com/vaadin/tests/tickets/Ticket1983.java +++ b/tests/testbench/com/vaadin/tests/tickets/Ticket1983.java @@ -1,10 +1,11 @@ package com.vaadin.tests.tickets; import com.vaadin.Application; +import com.vaadin.data.Property.ValueChangeEvent; +import com.vaadin.data.Property.ValueChangeListener; import com.vaadin.data.util.IndexedContainer; import com.vaadin.terminal.Sizeable; import com.vaadin.ui.Button; -import com.vaadin.ui.Button.ClickEvent; import com.vaadin.ui.CheckBox; import com.vaadin.ui.HorizontalSplitPanel; import com.vaadin.ui.Layout; @@ -114,11 +115,11 @@ public class Ticket1983 extends Application { ol.addComponent(button); leftSide.setFirstComponent(ol); - button = new CheckBox("Two col"); - button.addListener(new Button.ClickListener() { - public void buttonClick(ClickEvent event) { - Button b = event.getButton(); - if (((Boolean) b.getValue()).booleanValue()) { + CheckBox checkBox = new CheckBox("Two col"); + checkBox.addListener(new ValueChangeListener() { + + public void valueChange(ValueChangeEvent event) { + if ((Boolean) event.getProperty().getValue()) { table.setVisibleColumns(new Object[] { propId, propId2 }); } else { table.setVisibleColumns(new Object[] { propId }); @@ -127,7 +128,7 @@ public class Ticket1983 extends Application { } }); - ol.addComponent(button); + ol.addComponent(checkBox); return leftSide; } diff --git a/tests/testbench/com/vaadin/tests/tickets/Ticket2001.java b/tests/testbench/com/vaadin/tests/tickets/Ticket2001.java index 4796451dc0..8890490860 100644 --- a/tests/testbench/com/vaadin/tests/tickets/Ticket2001.java +++ b/tests/testbench/com/vaadin/tests/tickets/Ticket2001.java @@ -23,7 +23,7 @@ public class Ticket2001 extends Application { final CheckBox b = new CheckBox("fixed width: 30px", false); b.addListener(new Property.ValueChangeListener() { public void valueChange(ValueChangeEvent event) { - if (b.booleanValue()) { + if ((Boolean) b.getValue()) { l.setWidth("30px"); } else { l.setWidth(null); diff --git a/tests/testbench/com/vaadin/tests/tickets/Ticket2038.java b/tests/testbench/com/vaadin/tests/tickets/Ticket2038.java index 85a5a4b701..fa75e03945 100644 --- a/tests/testbench/com/vaadin/tests/tickets/Ticket2038.java +++ b/tests/testbench/com/vaadin/tests/tickets/Ticket2038.java @@ -36,7 +36,7 @@ public class Ticket2038 extends Application { b.setImmediate(true); b.addListener(new Property.ValueChangeListener() { public void valueChange(ValueChangeEvent event) { - tf.setRequiredError(b.booleanValue() ? "Field must not be empty" + tf.setRequiredError((Boolean) b.getValue() ? "Field must not be empty" : null); } }); diff --git a/tests/testbench/com/vaadin/tests/tickets/Ticket2104.java b/tests/testbench/com/vaadin/tests/tickets/Ticket2104.java index 8b95fa35a2..712f917855 100644 --- a/tests/testbench/com/vaadin/tests/tickets/Ticket2104.java +++ b/tests/testbench/com/vaadin/tests/tickets/Ticket2104.java @@ -1,12 +1,12 @@ package com.vaadin.tests.tickets; import com.vaadin.Application; +import com.vaadin.data.Property.ValueChangeEvent; +import com.vaadin.data.Property.ValueChangeListener; import com.vaadin.data.util.MethodProperty; import com.vaadin.event.ItemClickEvent; import com.vaadin.event.ItemClickEvent.ItemClickListener; import com.vaadin.terminal.ExternalResource; -import com.vaadin.ui.Button; -import com.vaadin.ui.Button.ClickEvent; import com.vaadin.ui.CheckBox; import com.vaadin.ui.HorizontalLayout; import com.vaadin.ui.Label; @@ -48,8 +48,10 @@ public class Ticket2104 extends Application { "multiSelect")); cb.setImmediate(true); ol.addComponent(cb); - cb = new CheckBox("icon", new Button.ClickListener() { - public void buttonClick(ClickEvent event) { + cb = new CheckBox("icon"); + cb.addListener(new ValueChangeListener() { + + public void valueChange(ValueChangeEvent event) { if (tree.getItemIconPropertyId() == null) { tree.setItemIconPropertyId("icon"); } else { diff --git a/tests/testbench/com/vaadin/tests/tickets/Ticket2107.java b/tests/testbench/com/vaadin/tests/tickets/Ticket2107.java index 199b278343..1de418a9a7 100644 --- a/tests/testbench/com/vaadin/tests/tickets/Ticket2107.java +++ b/tests/testbench/com/vaadin/tests/tickets/Ticket2107.java @@ -51,7 +51,7 @@ public class Ticket2107 extends Application { b.setImmediate(true); b.addListener(new Property.ValueChangeListener() { public void valueChange(ValueChangeEvent event) { - tf.setRequiredError(b.booleanValue() ? "Field must not be empty" + tf.setRequiredError((Boolean) b.getValue() ? "Field must not be empty" : null); } }); diff --git a/tests/testbench/com/vaadin/tests/tickets/Ticket2151.java b/tests/testbench/com/vaadin/tests/tickets/Ticket2151.java index 5a48156367..d1c4268c40 100644 --- a/tests/testbench/com/vaadin/tests/tickets/Ticket2151.java +++ b/tests/testbench/com/vaadin/tests/tickets/Ticket2151.java @@ -2,6 +2,8 @@ package com.vaadin.tests.tickets; import com.vaadin.Application; import com.vaadin.data.util.ObjectProperty; +import com.vaadin.ui.AbstractComponent; +import com.vaadin.ui.AbstractField; import com.vaadin.ui.AbstractOrderedLayout; import com.vaadin.ui.Button; import com.vaadin.ui.CheckBox; @@ -38,16 +40,36 @@ public class Ticket2151 extends Application { layout.addComponent(new Label("b")); layout.addComponent(new Label("c")); - check(Button.class); - check(CheckBox.class); - checkDataBinding(Button.class); + checkButton(Button.class); + checkCheckBox(CheckBox.class); checkDataBinding(CheckBox.class); } - private void check(Class<? extends Button> class1) { + private void checkButton(Class<? extends Button> class1) { boolean ok = false; - Button b; + AbstractComponent b; + try { + b = class1.newInstance(); + b.setCaption("Button of type " + class1.getSimpleName()); + ok = true; + } catch (Exception e1) { + e1.printStackTrace(); + } + + if (ok) { + status.setValue(status.getValue() + " " + + class1.getClass().getSimpleName() + ": OK"); + } else { + status.setValue(status.getValue() + " " + + class1.getClass().getSimpleName() + ": FAILED"); + } + + } + + private void checkCheckBox(Class<? extends CheckBox> class1) { + boolean ok = false; + CheckBox b; try { b = class1.newInstance(); b.setCaption("Button of type " + class1.getSimpleName()); @@ -74,9 +96,9 @@ public class Ticket2151 extends Application { } - private void checkDataBinding(Class<? extends Button> class1) { + private void checkDataBinding(Class<? extends AbstractField> class1) { boolean ok = false; - Button b; + AbstractField b; try { b = class1.newInstance(); b.setCaption("Button of type " + class1.getSimpleName()); diff --git a/tests/testbench/com/vaadin/tests/validation/EmptyFieldErrorIndicators.java b/tests/testbench/com/vaadin/tests/validation/EmptyFieldErrorIndicators.java index b1d6a8f068..936c843abd 100644 --- a/tests/testbench/com/vaadin/tests/validation/EmptyFieldErrorIndicators.java +++ b/tests/testbench/com/vaadin/tests/validation/EmptyFieldErrorIndicators.java @@ -98,7 +98,8 @@ public class EmptyFieldErrorIndicators extends TestBase { // same as basic DateField
// form.addField("Popup Date", new PopupDateField("Date"));
Button setDateButton = new Button("Set date");
- form.addField("Set Date", setDateButton);
+ form.getLayout().addComponent(setDateButton);
+ // form.addField("Set Date", setDateButton);
setDateButton.addListener(new ClickListener() {
public void buttonClick(ClickEvent event) {
form.getField("Date").setValue(new Date(0));
|