Revision: 7552
Author: j...@google.com
Date: Wed Feb 10 08:44:48 2010
Log: http://gwt-code-reviews.appspot.com/143801
http://code.google.com/p/google-web-toolkit/source/detail?r=7552
Modified:
/trunk/user/src/com/google/gwt/user/client/ui/StackLayoutPanel.java
/trunk/user/src/com/google/gwt/user/theme/chrome/public/gwt/chrome/chrome.css
/trunk/user/src/com/google/gwt/user/theme/chrome/public/gwt/chrome/chrome_rtl.css
/trunk/user/src/com/google/gwt/user/theme/dark/public/gwt/dark/dark.css
/trunk/user/src/com/google/gwt/user/theme/dark/public/gwt/dark/dark_rtl.css
/trunk/user/src/com/google/gwt/user/theme/standard/public/gwt/standard/standard.css
/trunk/user/src/com/google/gwt/user/theme/standard/public/gwt/standard/standard_rtl.css
=======================================
--- /trunk/user/src/com/google/gwt/user/client/ui/StackLayoutPanel.java Tue
Jan 26 10:19:07 2010
+++ /trunk/user/src/com/google/gwt/user/client/ui/StackLayoutPanel.java Wed
Feb 10 08:44:48 2010
@@ -19,6 +19,10 @@
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.event.dom.client.HasClickHandlers;
+import com.google.gwt.event.dom.client.MouseOutEvent;
+import com.google.gwt.event.dom.client.MouseOutHandler;
+import com.google.gwt.event.dom.client.MouseOverEvent;
+import com.google.gwt.event.dom.client.MouseOverHandler;
import com.google.gwt.event.logical.shared.BeforeSelectionEvent;
import com.google.gwt.event.logical.shared.BeforeSelectionHandler;
import com.google.gwt.event.logical.shared.HasBeforeSelectionHandlers;
@@ -46,6 +50,8 @@
* <dt>.gwt-StackLayoutPanel <dd> the panel itself
* <dt>.gwt-StackLayoutPanel .gwt-StackLayoutPanelHeader <dd> applied to
each
* header widget
+ * <dt>.gwt-StackLayoutPanel .gwt-StackLayoutPanelHeader-hovering <dd>
applied to each
+ * header widget on mouse hover
* <dt>.gwt-StackLayoutPanel .gwt-StackLayoutPanelContent <dd> applied to
each
* child widget
* </dl>
@@ -99,6 +105,14 @@
public HandlerRegistration addClickHandler(ClickHandler handler) {
return this.addDomHandler(handler, ClickEvent.getType());
}
+
+ public HandlerRegistration addMouseOutHandler(MouseOutHandler handler)
{
+ return this.addDomHandler(handler, MouseOutEvent.getType());
+ }
+
+ public HandlerRegistration addMouseOverHandler(MouseOverHandler
handler) {
+ return this.addDomHandler(handler, MouseOverEvent.getType());
+ }
}
private static class LayoutData {
@@ -116,6 +130,7 @@
private static final String WIDGET_STYLE = "gwt-StackLayoutPanel";
private static final String CONTENT_STYLE
= "gwt-StackLayoutPanelContent";
private static final String HEADER_STYLE = "gwt-StackLayoutPanelHeader";
+ private static final String HEADER_STYLE_HOVERING
= "gwt-StackLayoutPanelHeader-hovering";
private static final int ANIMATION_TIME = 250;
@@ -468,7 +483,7 @@
assert (index >= 0) && (index < getWidgetCount()) : "Index out of
bounds";
}
- private void insert(final Widget child, Header header, double headerSize,
+ private void insert(final Widget child, final Header header, double
headerSize,
int beforeIndex) {
assert (beforeIndex >= 0) && (beforeIndex <=
getWidgetCount()) : "beforeIndex out of bounds";
@@ -501,6 +516,18 @@
}
});
+ header.addMouseOutHandler(new MouseOutHandler() {
+ public void onMouseOut(MouseOutEvent event) {
+ header.removeStyleName(HEADER_STYLE_HOVERING);
+ }
+ });
+
+ header.addMouseOverHandler(new MouseOverHandler() {
+ public void onMouseOver(MouseOverEvent event) {
+ header.addStyleName(HEADER_STYLE_HOVERING);
+ }
+ });
+
if (selectedIndex == -1) {
// If there's no visible widget, display the first one. The layout
will
// be updated onLoad().
=======================================
---
/trunk/user/src/com/google/gwt/user/theme/chrome/public/gwt/chrome/chrome.css
Tue Jan 26 10:19:07 2010
+++
/trunk/user/src/com/google/gwt/user/theme/chrome/public/gwt/chrome/chrome.css
Wed Feb 10 08:44:48 2010
@@ -1095,6 +1095,9 @@
padding: 3px;
text-align: center;
}
+.gwt-StackLayoutPanel .gwt-StackLayoutPanelHeader-hovering {
+ background: #d3def6 url(images/hborder.png) repeat-x 0px -1464px;
+}
.gwt-StackLayoutPanel .gwt-StackLayoutPanelContent {
border: 1px solid #bbbbbb;
border-bottom: 0px;
=======================================
---
/trunk/user/src/com/google/gwt/user/theme/chrome/public/gwt/chrome/chrome_rtl.css
Tue Jan 26 10:19:07 2010
+++
/trunk/user/src/com/google/gwt/user/theme/chrome/public/gwt/chrome/chrome_rtl.css
Wed Feb 10 08:44:48 2010
@@ -1096,6 +1096,9 @@
padding: 3px;
text-align: center;
}
+.gwt-StackLayoutPanel .gwt-StackLayoutPanelHeader-hovering {
+ background: #d3def6 url(images/hborder.png) repeat-x 0px -1464px;
+}
.gwt-StackLayoutPanel .gwt-StackLayoutPanelContent {
border: 1px solid #bbbbbb;
border-bottom: 0px;
=======================================
--- /trunk/user/src/com/google/gwt/user/theme/dark/public/gwt/dark/dark.css
Tue Jan 26 10:19:07 2010
+++ /trunk/user/src/com/google/gwt/user/theme/dark/public/gwt/dark/dark.css
Wed Feb 10 08:44:48 2010
@@ -1045,6 +1045,9 @@
border-bottom: 0px;
background: #222;
}
+.gwt-StackLayoutPanel .gwt-StackLayoutPanelHeader-hovering {
+ background: #444;
+}
.gwt-StackLayoutPanel .gwt-StackLayoutPanelContent {
border: 1px solid #00CCFF;
border-bottom: 0px;
=======================================
---
/trunk/user/src/com/google/gwt/user/theme/dark/public/gwt/dark/dark_rtl.css
Tue Jan 26 10:19:07 2010
+++
/trunk/user/src/com/google/gwt/user/theme/dark/public/gwt/dark/dark_rtl.css
Wed Feb 10 08:44:48 2010
@@ -1046,6 +1046,9 @@
border-bottom: 0px;
background: #222;
}
+.gwt-StackLayoutPanel .gwt-StackLayoutPanelHeader-hovering {
+ background: #444;
+}
.gwt-StackLayoutPanel .gwt-StackLayoutPanelContent {
border: 1px solid #00CCFF;
border-bottom: 0px;
=======================================
---
/trunk/user/src/com/google/gwt/user/theme/standard/public/gwt/standard/standard.css
Tue Jan 26 10:19:07 2010
+++
/trunk/user/src/com/google/gwt/user/theme/standard/public/gwt/standard/standard.css
Wed Feb 10 08:44:48 2010
@@ -1094,6 +1094,9 @@
border-bottom: 0px;
background: #d3def6 url(images/hborder.png) repeat-x 0px -989px;
}
+.gwt-StackLayoutPanel .gwt-StackLayoutPanelHeader-hovering {
+ background: #d3def6 url(images/hborder.png) repeat-x 0px -1464px;
+}
.gwt-StackLayoutPanel .gwt-StackLayoutPanelContent {
border: 1px solid #bbbbbb;
border-bottom: 0px;
=======================================
---
/trunk/user/src/com/google/gwt/user/theme/standard/public/gwt/standard/standard_rtl.css
Tue Jan 26 10:19:07 2010
+++
/trunk/user/src/com/google/gwt/user/theme/standard/public/gwt/standard/standard_rtl.css
Wed Feb 10 08:44:48 2010
@@ -1095,6 +1095,9 @@
border-bottom: 0px;
background: #d3def6 url(images/hborder.png) repeat-x 0px -989px;
}
+.gwt-StackLayoutPanel .gwt-StackLayoutPanelHeader-hovering {
+ background: #d3def6 url(images/hborder.png) repeat-x 0px -1464px;
+}
.gwt-StackLayoutPanel .gwt-StackLayoutPanelContent {
border: 1px solid #bbbbbb;
border-bottom: 0px;
--
http://groups.google.com/group/Google-Web-Toolkit-Contributors