Revision: 6770
Author: [email protected]
Date: Mon Nov 9 10:52:41 2009
Log: Cleaning up the mail sample, adding new styles, and moving most images
into @sprite CssResource.
Review: http://gwt-code-reviews.appspot.com/97805
http://code.google.com/p/google-web-toolkit/source/detail?r=6770
Added:
/trunk/samples/mail/src/com/google/gwt/sample/mail/client/MailList.ui.xml
/trunk/samples/mail/src/com/google/gwt/sample/mail/client/NavBar.java
/trunk/samples/mail/src/com/google/gwt/sample/mail/client/NavBar.ui.xml
/trunk/samples/mail/src/com/google/gwt/sample/mail/client/contactsgroup.png
/trunk/samples/mail/src/com/google/gwt/sample/mail/client/drafts.png
/trunk/samples/mail/src/com/google/gwt/sample/mail/client/gradient_bg.png
/trunk/samples/mail/src/com/google/gwt/sample/mail/client/gradient_bg_dark.png
/trunk/samples/mail/src/com/google/gwt/sample/mail/client/gradient_bg_th.png
/trunk/samples/mail/src/com/google/gwt/sample/mail/client/home.png
/trunk/samples/mail/src/com/google/gwt/sample/mail/client/inbox.png
/trunk/samples/mail/src/com/google/gwt/sample/mail/client/mailboxesgroup.png
/trunk/samples/mail/src/com/google/gwt/sample/mail/client/sent.png
/trunk/samples/mail/src/com/google/gwt/sample/mail/client/tasksgroup.png
/trunk/samples/mail/src/com/google/gwt/sample/mail/client/templates.png
/trunk/samples/mail/src/com/google/gwt/sample/mail/client/trash.png
/trunk/samples/mail/war/gradient_bg_th.png
Deleted:
/trunk/samples/mail/src/com/google/gwt/sample/mail/client/contactsgroup.gif
/trunk/samples/mail/src/com/google/gwt/sample/mail/client/drafts.gif
/trunk/samples/mail/src/com/google/gwt/sample/mail/client/home.gif
/trunk/samples/mail/src/com/google/gwt/sample/mail/client/inbox.gif
/trunk/samples/mail/src/com/google/gwt/sample/mail/client/mailgroup.gif
/trunk/samples/mail/src/com/google/gwt/sample/mail/client/sent.gif
/trunk/samples/mail/src/com/google/gwt/sample/mail/client/tasksgroup.gif
/trunk/samples/mail/src/com/google/gwt/sample/mail/client/templates.gif
/trunk/samples/mail/src/com/google/gwt/sample/mail/client/trash.gif
/trunk/samples/mail/war/default_photo.jpg
/trunk/samples/mail/war/gradient.gif
/trunk/samples/mail/war/leftCorner.gif
/trunk/samples/mail/war/logo.png
/trunk/samples/mail/war/rightCorner.gif
Modified:
/trunk/samples/mail/src/com/google/gwt/sample/mail/Mail.gwt.xml
/trunk/samples/mail/src/com/google/gwt/sample/mail/client/AboutDialog.java
/trunk/samples/mail/src/com/google/gwt/sample/mail/client/AboutDialog.ui.xml
/trunk/samples/mail/src/com/google/gwt/sample/mail/client/ContactPopup.ui.xml
/trunk/samples/mail/src/com/google/gwt/sample/mail/client/MailList.java
/trunk/samples/mail/src/com/google/gwt/sample/mail/client/Shortcuts.ui.xml
/trunk/samples/mail/src/com/google/gwt/sample/mail/client/TopPanel.ui.xml
/trunk/samples/mail/src/com/google/gwt/sample/mail/client/default_photo.jpg
/trunk/samples/mail/src/com/google/gwt/sample/mail/client/logo.png
/trunk/samples/mail/war/Mail.css
=======================================
--- /dev/null
+++
/trunk/samples/mail/src/com/google/gwt/sample/mail/client/MailList.ui.xml
Mon Nov 9 10:52:41 2009
@@ -0,0 +1,67 @@
+<ui:UiBinder
+ xmlns:ui='urn:ui:com.google.gwt.uibinder'
+ xmlns:g='urn:import:com.google.gwt.user.client.ui'
+ xmlns:mail='urn:import:com.google.gwt.sample.mail.client'>
+
+ <ui:image field='gradient' src='gradient_bg_dark.png'
repeatStyle='Horizontal'/>
+
+ <ui:style>
+ .outer {
+ border-left: 1px solid #999;
+ border-bottom: 1px solid #999;
+ cursor: pointer;
+ cursor: hand;
+ }
+
+ .header {
+ background: #d3d6dd url(gradient_bg_dark.png) repeat-x bottom left;
+ table-layout: fixed;
+ width: 100%;
+ height: 100%;
+ }
+
+ .header td {
+ font-weight: bold;
+ text-shadow: #fff 0 2px 2px;
+ padding: 2px 0 1px 10px;
+ border-top: 1px solid #999;
+ border-bottom: 1px solid #999;
+ }
+
+ .table {
+ table-layout: fixed;
+ width: 100%;
+ }
+
+ .table td {
+ border-top: 1px solid #fff;
+ border-bottom: 1px solid #fff;
+ padding: 2px 0 2px 10px;
+ }
+ </ui:style>
+
+ <ui:style field='selectionStyle'
+ type='com.google.gwt.sample.mail.client.MailList.SelectionStyle'>
+
+ .selectedRow {
+ background: #adcce7;
+ }
+
+ .selectedRow td {
+ border-top: 1px solid #88a4d6;
+ border-bottom: 1px solid #7b97d0;
+ }
+ </ui:style>
+
+ <g:DockLayoutPanel styleName='{style.outer}' unit='EM'>
+ <g:north size='2'>
+ <g:FlexTable ui:field='header' styleName='{style.header}'
cellSpacing='0' cellPadding='0'/>
+ </g:north>
+
+ <g:center>
+ <g:ScrollPanel>
+ <g:FlexTable ui:field='table' styleName='{style.table}'
cellSpacing='0' cellPadding='0'/>
+ </g:ScrollPanel>
+ </g:center>
+ </g:DockLayoutPanel>
+</ui:UiBinder>
=======================================
--- /dev/null
+++ /trunk/samples/mail/src/com/google/gwt/sample/mail/client/NavBar.java
Mon Nov 9 10:52:41 2009
@@ -0,0 +1,63 @@
+/*
+ * Copyright 2009 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.google.gwt.sample.mail.client;
+
+import com.google.gwt.core.client.GWT;
+import com.google.gwt.dom.client.Element;
+import com.google.gwt.event.dom.client.ClickEvent;
+import com.google.gwt.uibinder.client.UiBinder;
+import com.google.gwt.uibinder.client.UiField;
+import com.google.gwt.uibinder.client.UiHandler;
+import com.google.gwt.uibinder.client.UiTemplate;
+import com.google.gwt.user.client.ui.Anchor;
+import com.google.gwt.user.client.ui.Composite;
+import com.google.gwt.user.client.ui.Widget;
+
+/**
+ * A simple widget representing prev/next page navigation.
+ */
+class NavBar extends Composite {
+ @UiTemplate("NavBar.ui.xml")
+ interface Binder extends UiBinder<Widget, NavBar> { }
+ private static final Binder binder = GWT.create(Binder.class);
+
+ @UiField Element countLabel;
+ @UiField Anchor newerButton;
+ @UiField Anchor olderButton;
+
+ private final MailList outer;
+
+ public NavBar(MailList outer) {
+ initWidget(binder.createAndBindUi(this));
+ this.outer = outer;
+ }
+
+ public void update(int startIndex, int count, int max) {
+ newerButton.setVisible(startIndex != 0);
+ olderButton.setVisible(startIndex + MailList.VISIBLE_EMAIL_COUNT <
count);
+ countLabel.setInnerText("" + (startIndex + 1) + " - " + max + " of " +
count);
+ }
+
+ @UiHandler("newerButton")
+ void onNewerClicked(ClickEvent event) {
+ outer.newer();
+ }
+
+ @UiHandler("olderButton")
+ void onOlderClicked(ClickEvent event) {
+ outer.older();
+ }
+}
=======================================
--- /dev/null
+++ /trunk/samples/mail/src/com/google/gwt/sample/mail/client/NavBar.ui.xml
Mon Nov 9 10:52:41 2009
@@ -0,0 +1,23 @@
+<ui:UiBinder
+ xmlns:ui='urn:ui:com.google.gwt.uibinder'
+ xmlns:g='urn:import:com.google.gwt.user.client.ui'
+ xmlns:mail='urn:import:com.google.gwt.sample.mail.client'>
+
+ <ui:style>
+ .anchor {
+ margin: 0 8px;
+ }
+ </ui:style>
+
+ <g:HTMLPanel>
+ <g:Anchor styleName='{style.anchor}' ui:field='newerButton'
+ href='javascript:;'>
+ < newer
+ </g:Anchor>
+ <span ui:field='countLabel'/>
+ <g:Anchor styleName='{style.anchor}' ui:field='olderButton'
+ href='javascript:;'>
+ older >
+ </g:Anchor>
+ </g:HTMLPanel>
+</ui:UiBinder>
=======================================
--- /dev/null
+++
/trunk/samples/mail/src/com/google/gwt/sample/mail/client/contactsgroup.png
Mon Nov 9 10:52:41 2009
Binary file, no diff available.
=======================================
--- /dev/null
+++ /trunk/samples/mail/src/com/google/gwt/sample/mail/client/drafts.png
Mon Nov 9 10:52:41 2009
@@ -0,0 +1,14 @@
+‰PNG
+
+
+IHDR óÿa tEXtSoftware Adobe
ImageReadyqÉe< ËIDATxÚbøÿÿ? )xo``Æ¡ìì ‹==#E899 A‚Ä‚v m
këm²::rçæÏ¿váõë‰LÄjNˆŽÒbvvÙôÇÈHŽ÷Þ= m
+
+-EVÖv¢ Xã. m°Ý'ÈOéüÓ§ k
+eØ ãÆ+ T4 1šUì 6Æùþ’Û¿v Ã÷ßL ÓÞ¿ iŽõÛ½{ Þ [ç$ªs¾5ëΟgUÿÿ •
+.býïjoÿÂÉÝÝ
+¦† —Íë Åt¤íƒ6ë&
+(0½<Ìðè.3õs¿ß ¥âöîØ± ® —Í' ÓïƒlþwÞöÿéÌÿg:0¼ bwtµDi^è/ò ›f F ÄM^2Ú g §
+ƒ ýøØ1† » ~||
ãÁÁ/² ›W™ 5Ë{Ä_1ó{‰¡Ù#”y'Îh 9cY¦æ¶‰ÁGþ?ŸûÿÿvæÿÏë àÎ z ÈÆ S` p
+ñ§‰‹1™þ|úŠáákk† û ^Âl ¹"nÃkœ ç O Á—¡Nzb’Bœ¿N\¸ GðÖ‚CÿáQÅ ÿqe 8 Ã}K îï
+Qò ôUùVCÕfCé@(m ¥u¡´ < ˆÙ[òè
+0%5{ õÒ à ¤ˆÖ IEND®B`‚
=======================================
--- /dev/null
+++
/trunk/samples/mail/src/com/google/gwt/sample/mail/client/gradient_bg.png
Mon Nov 9 10:52:41 2009
@@ -0,0 +1,4 @@
+‰PNG
+
+
+IHDR @ TsŠ tEXtSoftware Adobe ImageReadyqÉe< SIDATxÚd A À
þÿfR)0Lë)d£Q\’ œT™cqfóä ìd'/_:sd¦xï×9uÎj3.¿]šÞÔ ÖoKW×þ—¯gXyøç» µ×#À ²Õy H G/
IEND®B`‚
=======================================
--- /dev/null
+++
/trunk/samples/mail/src/com/google/gwt/sample/mail/client/gradient_bg_dark.png
Mon Nov 9 10:52:41 2009
@@ -0,0 +1,4 @@
+ÿØÿà JFIF d d ÿì Ducky d ÿî Adobe dÀ ÿÛ „
ÿÀ @ ÿÄ e
+ ðQ‘¡±Ñ bR¢ !Qðaá
ÿÚ ? ÓdŽÙ
+~ E–©ñ z:PfW - _ PfOg–â–
+i f*hQ+ å;û ƃd ’í ªÃ$/³½`<›F ÿÙ
=======================================
--- /dev/null
+++
/trunk/samples/mail/src/com/google/gwt/sample/mail/client/gradient_bg_th.png
Mon Nov 9 10:52:41 2009
@@ -0,0 +1,8 @@
+‰PNG
+
+
+IHDR ;Ì—Ú tEXtSoftware Adobe ImageReadyqÉe< OIDATxÚ4‰A
+€@ “þÿ âAñà]Y¡ é¢
+ “ c<Âvœ
+U!ªd( Ù¦Fª-½J³Ú( ˺+
+þ9 Ä®¾ hã? s5îk\¯ ôÂ3 Fªÿ IEND®B`‚
=======================================
--- /dev/null
+++ /trunk/samples/mail/src/com/google/gwt/sample/mail/client/home.png Mon
Nov 9 10:52:41 2009
Binary file, no diff available.
=======================================
--- /dev/null
+++ /trunk/samples/mail/src/com/google/gwt/sample/mail/client/inbox.png Mon
Nov 9 10:52:41 2009
Binary file, no diff available.
=======================================
--- /dev/null
+++
/trunk/samples/mail/src/com/google/gwt/sample/mail/client/mailboxesgroup.png
Mon Nov 9 10:52:41 2009
Binary file, no diff available.
=======================================
--- /dev/null
+++ /trunk/samples/mail/src/com/google/gwt/sample/mail/client/sent.png Mon
Nov 9 10:52:41 2009
@@ -0,0 +1,11 @@
+‰PNG
+
+
+IHDR óÿa tEXtSoftware Adobe ImageReadyqÉe< îIDATxÚÄ“K
+ƒ@ D+2[¿x E×
+0s ï¢ Üx qé...@b ò $
+ =]õ°ufvëºâ›Ððeˆ<Ï÷ÛS~ÈK1ϳ´m iš¾E6Mƒ¶m¥6Ž#<ÏC]×X–奤— Ym † PUÕS˜
+zÉ U P0M a ¢,Ë»05zèåZMÐ÷=¶ÿ ’B E(ŠâÔ;&{Ôè9öÈjÓ4]¼Å²,Äq¬ jLÖìQ;÷R ü .ÎÃq
+$I¢Ff°fïÚGVt]§F¹ ]×áûþ©¾å!+
+íµëº?8ÊÛVÈ,Ë>>Ê»¿ßƃ ŽÄì¯
+>r IEND®B`‚
=======================================
--- /dev/null
+++
/trunk/samples/mail/src/com/google/gwt/sample/mail/client/tasksgroup.png
Mon Nov 9 10:52:41 2009
@@ -0,0 +1,32 @@
+‰PNG
+
+
+IHDR 8¡Gñ tEXtSoftware Adobe ImageReadyqÉe<
IDATxÚ¬U]h#U þæ7™ü'MkZ¥4ê–•¢(ÝU¡U µ–>lƒ‚
+>h© ¥¾¸â¾øä› \)RD¤-})"HeA² Rꊂ¬n\Ø ]ÄÀ&ݦ›Î¶IfæÎxîMR
v»Áñ†aBrïù¾ïœïœ+yž‡{s󯊷¦ÈøóÖ
+Þøò; Ÿ8‰™·Þ~4
+ «Š 3MóÇ ¶¶òŸ-ž {ç^|
+¯?=ˆ½š
+ñ ¿ÂQKE‡ËqÝæ U‰¤R©O*• “¦y§400p: ÐGé¯_{ãa
+ïMÁrÜŽbÊ lb®‡>
+<’í†Ù`™d"ùø Ÿ/ yÿ½w_9Øßßu$åÙ„.ãÃ×Fñd 7j–Ý øý”Ÿ†ç=c[
+)¬Ê˜{á \Ž
+ë6kõôËÏ ¾yâø±œ¢j©Çú{ß93921˜ âÖîm¨Z ’$ýBç?8*¸tTÍ¿ ËU4#’|à¹S°¡àæ ˜
+F 8 5 Š,‘J‡ÒçB·ö 'õéD
+Ås8(þQ?õé7Æ Vî8L ÕZM¤aôfqíb ˆ¬ç¢n·H y&I¨« $ûú Œ‡Pܹ
+é î/íd2×s s ¹s årùðÿvÖh B¡ ú3Ýp
+ »Õ* Ërý d
+P4¤ÓiLLL J mÛæ5 àm
+< O`¯\ ÁMê œ¹ e ŠªB×u蚆D"q Ê N"
+bµz�...@Ýaç
+ÆüµšMA\ — ¼”1ö¯‡¯
+lnn „ÍUÿ à<€« «UM€Ë²,Tò,ðÅß+++XZZB, ;$ÈÏùWN
+<ª·¢éPˆ 7Ö Ö×× F±ººŠµµ5LOOchh 6 .^s Ú®ëW97œ*À5J}©TB>ŸG¡PÀââ¢P=33ƒ±±1Q ¡
+ÍÒt¢üHÃYš«šÞšë*’É$–——‘Éd0?? \.GóÀi ,Þvžp.1׿ۡ��...@pÔ²«« ÃÃÃØÞÞÆìì,&''
+˹ xI$úØ
+›ñ Á÷ lD ¥öâ)
+‡Ã˜šš j³Ù¬H/'ÅÁ[c z H; \ŸàL’ ˆ%ðÛO øC "Ó÷
zzz`Y–PË 2$£ôïUwaÙ dϧá û¸vá<*U ;ôܸò{³ x ‰ŒDäxF$" p •í ¹¾IÌ ¸åX(_/àÒù¯E0—
·_ûñÜÖïLԻѨ£ô÷_T÷ @ò™v îQ
+S¼¸
+Fµ‚‡GÆqåìG ìÜu¿
+4pãêe0J;‚†âÓíÌj /Q ®_ú f ƪww]” ¨-£¡ 7Ÿí Üõ¼<½^âåñZ}
+1dÜë¾â œªÐ\ ÅuûýýÀÿ ` £
+’dúi^ IEND®B`‚
=======================================
--- /dev/null
+++ /trunk/samples/mail/src/com/google/gwt/sample/mail/client/templates.png
Mon Nov 9 10:52:41 2009
@@ -0,0 +1,11 @@
+‰PNG
+
+
+IHDR óÿa tEXtSoftware Adobe ImageReadyqÉe<
+IDATxÚbüÿÿ? tLš¡ ¤æ ± ~p ˆ øAE^ È ž2gѳOŸ¿ü' OŸ¿ô L #ˆè™6{³‘®¶ ;;; 1àû
®\ÛR’•êË óq²µb
+ð Ñ` ˜ ™À‚ééé
+gΜÉ`Wƒ*v¨ ¡ l 333\16À/ÇÀðñ! – Ò b,,Ì `
+\.` Ò @Íÿ¡† ]Í„ì &ü.à“ƒØ, ¤?À\ÀÌ‚ä ¨ êêê04755A\ µ F£x
ÅØÀb L1˜«¡a qN{{;QQXYY · Lp b 3
+.€é “
+Ð$LŠ `z˜ ( °XhÙºë@
+±š@ ¤ Ä 0 ±„~ z8 ¬ IEND®B`‚
=======================================
--- /dev/null
+++ /trunk/samples/mail/src/com/google/gwt/sample/mail/client/trash.png Mon
Nov 9 10:52:41 2009
@@ -0,0 +1,15 @@
+‰PNG
+
+
+IHDR óÿa tEXtSoftware Adobe
ImageReadyqÉe< HIDATxÚ”RMh A }³»I]»5 1¡¶
+45F¨
+z AK«( ñ z1 ÿ¢ ¡7 A A#(¢àÅ£
+ˆ- DQ,BiÑJ âÅJ+ R´hsЪIӦݟìŽ3 Ú“„øàí÷½™yofg— ñÓà š;ÛÊÊ
+Æv”Ç(cO‡?5Æ !ïchµš 7Ã÷òVø *Á¥é ¾!wdÌ53HÈh ê ~¤Å Ȳ‚ÉÉOeÍ[·µ€Ú b‹½oÒä×~ K–ö
?Úªë4dççáYï- ›&¼
+ fæ~î lMAÁŠZ°\š¦!·X€×ç+ @Ø)©*Ã*è.&c
+ »‹OHŠŒP°±¢;È — Ó (.(ÐmYR] ÆQ1 ¤*p–-°€b?Í,ì µ*ü œÙ<àSû
¹ÓÞ@@¾Ë͵deòbø îM¿( ` ÉQ
+ ”` 3~ºö7...@ÑÁÀ®nÜÞ~nt®9ÍÎghl‰®jz°à£ê îe 66¹ S4k``÷et6î ;ðÊ5L î¾£H´œ
='Íꈸë>s¯ ËAXÝ8Aó:¢ÃI¸{ ‰€ä‡>¡Ù.%3 ë9...@ÓšÀ ÷J|
<RÓ0Nu Ô(‘ãú»”è ﻂÄΓbÌ<ÿJhÊB6×Ô ŸŸ?‚Õþ4
+v<Ý L2³Õ5$úèó«xš~+ xå ìW iì V êUßì ÷:v9ìxì$×^?€r³MôœÇŸô {侨|
M ªVxV 2ñæ 8K&œ 㟼;ò°Ô³5gB
+‡?þ
+0 ]á ¹û
+ ´ IEND®B`‚
=======================================
--- /dev/null
+++ /trunk/samples/mail/war/gradient_bg_th.png Mon Nov 9 10:52:41 2009
@@ -0,0 +1,8 @@
+‰PNG
+
+
+IHDR ;Ì—Ú tEXtSoftware Adobe ImageReadyqÉe< OIDATxÚ4‰A
+€@ “þÿ âAñà]Y¡ é¢
+ “ c<Âvœ
+U!ªd( Ù¦Fª-½J³Ú( ˺+
+þ9 Ä®¾ hã? s5îk\¯ ôÂ3 Fªÿ IEND®B`‚
=======================================
---
/trunk/samples/mail/src/com/google/gwt/sample/mail/client/contactsgroup.gif
Tue May 22 21:45:36 2007
+++ /dev/null
Binary file, no diff available.
=======================================
--- /trunk/samples/mail/src/com/google/gwt/sample/mail/client/drafts.gif
Tue May 22 21:45:36 2007
+++ /dev/null
Binary file, no diff available.
=======================================
--- /trunk/samples/mail/src/com/google/gwt/sample/mail/client/home.gif Tue
May 22 21:45:36 2007
+++ /dev/null
@@ -1,14 +0,0 @@
-GIF89a æ ÿÿÿPBC1"(@;>dae'%+ÉËÌ0;@ )2 *2 4:• £ 08 +2 ,5
-DL2SZ3T[5W^4U\6X_8[b7Y`9\c8Za:\cf}‚h „e{€ 6>'LS9\bXmqcy}ßåæ
ª¬œ©«®¿ÁæîîåííãëëâééßååÛááÔØØÐÓÓÌÏÏÎÐÐÊÌÌÇÈÈØÝÜþ
- þ1 û2
-û?)ï;(÷D.ï@,ïA-ïD1ïH4ûK7ïL9üR>ñN;üVDðSBúZHñVEüaPö`OócRÿkZÏVIïeVþn^üo^ïo`Ïj_ò ù
- ò ¿
-û% œ ò2 ï4$€&
- B; WRÕ
- Í é Þ
-â ï0$`0-¼ î)"î,$ë)$å&#ÇÇÇÿÿÿ
!ù h , ¨€h‚ƒh †„ˆƒ Y<a ‰Š j...@95x ‰ KDA;V4U ˆ
ZLGC=8`cPS
- OMHE?:Wdef_\
-NIFB>76TQR]^[b !
-
- ±&')#,3-./ g"˜ âäæèêìîðåçéëí‚ïãå†JÐãWè
-‹€ í¡P±âà 0bÈ ˆ × } !‚ H ;
=======================================
--- /trunk/samples/mail/src/com/google/gwt/sample/mail/client/inbox.gif Tue
May 22 21:45:36 2007
+++ /dev/null
@@ -1,6 +0,0 @@
-GIF89a Õ ÿÿÿýýþûûüïïððò÷ÑÙæ5Z 6[ 6Z 7\‘7[ =_‘Bd–GhšVu¢Ut¡e
«sŒ±u޳„𼄛¼„𻂖³“§Äª¸Í²ÀÕª¸Ì¸ÈÂÍÝÅÎÛ6[ 7\
¾ÇÓîñõÏÓØÉËÍñòóðñòæçèÚÛÜÑÒÓÉÊËÓÕÖËÍÎÄÆÇáããÛÝÝðññïððîïïéêêßààÜÝÝþþþýýýüüüúúúæææÿÿÿ
!ù ; , wÀ pH, Èä0ñI
-žOæg Z,œ
- vËÕ^ ˆ‰Dt+›Ë" Æ è( ¸\〳
-‡å ÏSäOr7 !
-
- € q 0-# ($%8q 6&*1r ,2—™63)9 q9+'8O.5]]4/P¸¹¹J¼¼A ;
=======================================
--- /trunk/samples/mail/src/com/google/gwt/sample/mail/client/mailgroup.gif
Tue May 22 21:45:36 2007
+++ /dev/null
Binary file, no diff available.
=======================================
--- /trunk/samples/mail/src/com/google/gwt/sample/mail/client/sent.gif Tue
May 22 21:45:36 2007
+++ /dev/null
Binary file, no diff available.
=======================================
---
/trunk/samples/mail/src/com/google/gwt/sample/mail/client/tasksgroup.gif
Tue May 22 21:45:36 2007
+++ /dev/null
Binary file, no diff available.
=======================================
--- /trunk/samples/mail/src/com/google/gwt/sample/mail/client/templates.gif
Tue May 22 21:45:36 2007
+++ /dev/null
@@ -1,13 +0,0 @@
-GIF89a Õ ÿÿÿûûýíïõáåïøùû X¿!YÀ(^ÂÅÏâËÔåÒÚèçëòÙàìóõø ‚
lnlege–˜–†ˆ†««¸¹¸¶·¶«¬«¤¥¤ ž š›šƒ„ƒ_b^ruqjlibdaac``b_y{xvxuŒŽ‹ƒ
-‚ Ÿœgie`a_¤¥£žŸ ›œš–—•’“‘Š‹‰„
-ƒ±²°°±¯_`]}~{pqn‘’ „
-‚ÃÃÂÂÂÁ··¶ÿÿÿ !ù : , @ pH,ên¦Ô –k6+ S
- Ëíª2\Uw,Ȭ¸ rw%á²Ô\...@¯Ñïøb‹äè»ú€ $ †/6/ %%/ 66 ”3 ”˜™ " # ¡ "
-
-¦4¦©ª
-
- ¯
-¯²³ '
-¸ ¸»¼
-' ÁÀÁÄÅ 72(! ÍÎ !
-8A ;
=======================================
--- /trunk/samples/mail/src/com/google/gwt/sample/mail/client/trash.gif Tue
May 22 21:45:36 2007
+++ /dev/null
Binary file, no diff available.
=======================================
--- /trunk/samples/mail/war/default_photo.jpg Tue Oct 13 16:57:19 2009
+++ /dev/null
Binary file, no diff available.
=======================================
--- /trunk/samples/mail/war/gradient.gif Tue Oct 13 16:57:19 2009
+++ /dev/null
@@ -1,5 +0,0 @@
-GIF89a ( ¥"
fffÁîÈÂîÈÃîÈÄîÈÆîÈÇîÈÉíÈÉîÉÊîÈËîÈËîÉÌîÉÍîÉÎîÉÏîÊÐîËÑîËÒîÍÒïÌÔîÎÔîÏÓïÍÕîÏÕîÐÔïÏÖïÑØîÔ×ïÒÚï×ÚïÙÜïÝÝïÞÞïáÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ,
( $@@ ôñt6
-
-¦rÉP, Ëd 8
-Ž C±H
- C 0 ÌA ;
=======================================
--- /trunk/samples/mail/war/leftCorner.gif Tue Oct 13 16:57:19 2009
+++ /dev/null
Binary file, no diff available.
=======================================
--- /trunk/samples/mail/war/logo.png Tue Oct 13 16:57:19 2009
+++ /dev/null
Binary file, no diff available.
=======================================
--- /trunk/samples/mail/war/rightCorner.gif Tue Oct 13 16:57:19 2009
+++ /dev/null
Binary file, no diff available.
=======================================
--- /trunk/samples/mail/src/com/google/gwt/sample/mail/Mail.gwt.xml Tue Sep
22 14:34:43 2009
+++ /trunk/samples/mail/src/com/google/gwt/sample/mail/Mail.gwt.xml Mon
Nov 9 10:52:41 2009
@@ -14,6 +14,5 @@
<module rename-to="mail">
<inherits name='com.google.gwt.user.User'/>
- <inherits name="com.google.gwt.uibinder.UiBinder" />
<entry-point class='com.google.gwt.sample.mail.client.Mail'/>
</module>
=======================================
---
/trunk/samples/mail/src/com/google/gwt/sample/mail/client/AboutDialog.java
Tue Sep 22 14:34:43 2009
+++
/trunk/samples/mail/src/com/google/gwt/sample/mail/client/AboutDialog.java
Mon Nov 9 10:52:41 2009
@@ -41,6 +41,9 @@
// Use this opportunity to set the dialog's caption.
setText("About the Mail Sample");
setWidget(binder.createAndBindUi(this));
+
+ setAnimationEnabled(true);
+ setGlassEnabled(true);
}
@Override
=======================================
---
/trunk/samples/mail/src/com/google/gwt/sample/mail/client/AboutDialog.ui.xml
Tue Sep 22 14:34:43 2009
+++
/trunk/samples/mail/src/com/google/gwt/sample/mail/client/AboutDialog.ui.xml
Mon Nov 9 10:52:41 2009
@@ -4,24 +4,18 @@
<ui:style>
.aboutText {
- width: 24em;
padding: 10px;
text-align: left;
}
</ui:style>
- <g:DockPanel>
- <g:Dock direction='SOUTH'>
- <g:Button text='Close' ui:field='closeButton' />
- </g:Dock>
- <g:Dock direction='CENTER'>
- <g:HTML styleName='{style.aboutText}'>
- This sample application demonstrates the
- construction of a complex user interface using GWT's built-in
- widgets. Have a look at the code to see how easy it is to build
- your own apps!
- </g:HTML>
- </g:Dock>
- </g:DockPanel>
-
+ <g:HTMLPanel width='24em'>
+ <div class='{style.aboutText}'>
+ This sample application demonstrates the
+ construction of a complex user interface using GWT's built-in
+ widgets. Have a look at the code to see how easy it is to build
+ your own apps!
+ </div>
+ <g:Button text='Close' ui:field='closeButton' />
+ </g:HTMLPanel>
</ui:UiBinder>
=======================================
---
/trunk/samples/mail/src/com/google/gwt/sample/mail/client/ContactPopup.ui.xml
Tue Sep 22 14:34:43 2009
+++
/trunk/samples/mail/src/com/google/gwt/sample/mail/client/ContactPopup.ui.xml
Mon Nov 9 10:52:41 2009
@@ -3,6 +3,8 @@
xmlns:g='urn:import:com.google.gwt.user.client.ui'
xmlns:mail='urn:import:com.google.gwt.sample.mail.client'>
+ <ui:image field='photo' src='default_photo.jpg'/>
+
<ui:style>
.popup {
background: #fff;
@@ -12,13 +14,11 @@
height: 2.5em;
}
- .photo {
+ @sprite .photo {
+ gwt-image: 'photo';
+
float: left;
margin-right: 4px;
-
- background: url(default_photo.jpg);
- width: 32px;
- height: 32px;
}
.right {
=======================================
--- /trunk/samples/mail/src/com/google/gwt/sample/mail/client/MailList.java
Wed Nov 4 07:47:35 2009
+++ /trunk/samples/mail/src/com/google/gwt/sample/mail/client/MailList.java
Mon Nov 9 10:52:41 2009
@@ -15,23 +15,22 @@
*/
package com.google.gwt.sample.mail.client;
-import com.google.gwt.dom.client.Style.Unit;
+import com.google.gwt.core.client.GWT;
import com.google.gwt.event.dom.client.ClickEvent;
-import com.google.gwt.event.dom.client.ClickHandler;
-import com.google.gwt.user.client.ui.DockLayoutPanel;
+import com.google.gwt.resources.client.CssResource;
+import com.google.gwt.uibinder.client.UiBinder;
+import com.google.gwt.uibinder.client.UiField;
+import com.google.gwt.uibinder.client.UiHandler;
import com.google.gwt.user.client.ui.FlexTable;
-import com.google.gwt.user.client.ui.HTML;
-import com.google.gwt.user.client.ui.HorizontalPanel;
+import com.google.gwt.user.client.ui.HasHorizontalAlignment;
import com.google.gwt.user.client.ui.ResizeComposite;
-import com.google.gwt.user.client.ui.ScrollPanel;
+import com.google.gwt.user.client.ui.Widget;
import com.google.gwt.user.client.ui.HTMLTable.Cell;
/**
* A composite that displays a list of emails that can be selected.
*/
-public class MailList extends ResizeComposite implements ClickHandler {
-
- private static final int VISIBLE_EMAIL_COUNT = 20;
+public class MailList extends ResizeComposite {
/**
* Callback when mail items are selected.
@@ -40,83 +39,29 @@
void onItemSelected(MailItem item);
}
- private Listener listener;
-
- private HTML countLabel = new HTML();
- private HTML newerButton = new HTML("<a href='javascript:;'><
newer</a>",
- true);
- private HTML olderButton = new HTML("<a href='javascript:;'>older
></a>",
- true);
+ interface Binder extends UiBinder<Widget, MailList> { }
+ interface SelectionStyle extends CssResource {
+ String selectedRow();
+ }
+
+ private static final Binder binder = GWT.create(Binder.class);
+ static final int VISIBLE_EMAIL_COUNT = 20;
+
+ @UiField FlexTable header;
+ @UiField FlexTable table;
+ @UiField SelectionStyle selectionStyle;
+
+ private Listener listener;
private int startIndex, selectedRow = -1;
- private FlexTable header = new FlexTable();
- private FlexTable table = new FlexTable();
- private HorizontalPanel navBar = new HorizontalPanel();
+ private NavBar navBar;
public MailList() {
- // Setup the table.
- table.setCellSpacing(0);
- table.setCellPadding(0);
-
- // Hook up events.
- table.addClickHandler(this);
- newerButton.addClickHandler(this);
- olderButton.addClickHandler(this);
-
- // Create the 'navigation' bar at the upper-right.
- HorizontalPanel innerNavBar = new HorizontalPanel();
- navBar.setStyleName("mail-ListNavBar");
- innerNavBar.add(newerButton);
- innerNavBar.add(countLabel);
- innerNavBar.add(olderButton);
-
- navBar.setHorizontalAlignment(HorizontalPanel.ALIGN_RIGHT);
- navBar.add(innerNavBar);
- navBar.setWidth("100%");
-
- DockLayoutPanel dock = new DockLayoutPanel(Unit.EM);
- dock.addNorth(header, 2);
- dock.add(new ScrollPanel(table));
- header.setWidth("100%");
- table.setWidth("100%");
-
- initWidget(dock);
- setStyleName("mail-List");
+ initWidget(binder.createAndBindUi(this));
+ navBar = new NavBar(this);
initTable();
update();
}
-
- public void onClick(ClickEvent event) {
- Object sender = event.getSource();
- if (sender == olderButton) {
- // Move forward a page.
- startIndex += VISIBLE_EMAIL_COUNT;
- if (startIndex >= MailItems.getMailItemCount()) {
- startIndex -= VISIBLE_EMAIL_COUNT;
- } else {
- styleRow(selectedRow, false);
- selectedRow = -1;
- update();
- }
- } else if (sender == newerButton) {
- // Move back a page.
- startIndex -= VISIBLE_EMAIL_COUNT;
- if (startIndex < 0) {
- startIndex = 0;
- } else {
- styleRow(selectedRow, false);
- selectedRow = -1;
- update();
- }
- } else if (sender == table) {
- // Select the row that was clicked (-1 to account for header row).
- Cell cell = table.getCellForEvent(event);
- if (cell != null) {
- int row = cell.getRowIndex();
- selectRow(row);
- }
- }
- }
/**
* Sets the listener that will be notified when an item is selected.
@@ -132,32 +77,60 @@
selectRow(0);
}
}
+
+ void newer() {
+ // Move back a page.
+ startIndex -= VISIBLE_EMAIL_COUNT;
+ if (startIndex < 0) {
+ startIndex = 0;
+ } else {
+ styleRow(selectedRow, false);
+ selectedRow = -1;
+ update();
+ }
+ }
+
+ void older() {
+ // Move forward a page.
+ startIndex += VISIBLE_EMAIL_COUNT;
+ if (startIndex >= MailItems.getMailItemCount()) {
+ startIndex -= VISIBLE_EMAIL_COUNT;
+ } else {
+ styleRow(selectedRow, false);
+ selectedRow = -1;
+ update();
+ }
+ }
+
+ @UiHandler("table")
+ void onTableClicked(ClickEvent event) {
+ // Select the row that was clicked (-1 to account for header row).
+ Cell cell = table.getCellForEvent(event);
+ if (cell != null) {
+ int row = cell.getRowIndex();
+ selectRow(row);
+ }
+ }
/**
* Initializes the table so that it contains enough rows for a full page
of
* emails. Also creates the images that will be used as 'read' flags.
*/
private void initTable() {
- // Create the header.
- header.getRowFormatter().setStyleName(0, "mail-ListHeader");
- header.getElement().getStyle().setProperty("tableLayout", "fixed");
- header.setCellSpacing(0);
-
- header.getColumnFormatter().setWidth(0, "96px");
- header.getColumnFormatter().setWidth(1, "160px");
+ // Initialize the header.
+ header.getColumnFormatter().setWidth(0, "128px");
+ header.getColumnFormatter().setWidth(1, "192px");
header.getColumnFormatter().setWidth(3, "256px");
header.setText(0, 0, "Sender");
header.setText(0, 1, "Email");
header.setText(0, 2, "Subject");
header.setWidget(0, 3, navBar);
+ header.getCellFormatter().setHorizontalAlignment(0, 3,
HasHorizontalAlignment.ALIGN_RIGHT);
// Initialize the table.
- table.getElement().getStyle().setProperty("tableLayout", "fixed");
- header.setCellSpacing(0);
-
- table.getColumnFormatter().setWidth(0, "96px");
- table.getColumnFormatter().setWidth(1, "160px");
+ table.getColumnFormatter().setWidth(0, "128px");
+ table.getColumnFormatter().setWidth(1, "192px");
for (int i = 0; i < VISIBLE_EMAIL_COUNT; ++i) {
table.setText(i, 0, "");
@@ -196,10 +169,12 @@
private void styleRow(int row, boolean selected) {
if (row != -1) {
+ String style = selectionStyle.selectedRow();
+
if (selected) {
- table.getRowFormatter().addStyleName(row, "mail-SelectedRow");
+ table.getRowFormatter().addStyleName(row, style);
} else {
- table.getRowFormatter().removeStyleName(row, "mail-SelectedRow");
+ table.getRowFormatter().removeStyleName(row, style);
}
}
}
@@ -212,9 +187,8 @@
max = count;
}
- newerButton.setVisible(startIndex != 0);
- olderButton.setVisible(startIndex + VISIBLE_EMAIL_COUNT < count);
- countLabel.setText("" + (startIndex + 1) + " - " + max + " of " +
count);
+ // Update the nav bar.
+ navBar.update(startIndex, count, max);
// Show the selected emails.
int i = 0;
=======================================
---
/trunk/samples/mail/src/com/google/gwt/sample/mail/client/Shortcuts.ui.xml
Tue Sep 22 14:34:43 2009
+++
/trunk/samples/mail/src/com/google/gwt/sample/mail/client/Shortcuts.ui.xml
Mon Nov 9 10:52:41 2009
@@ -5,41 +5,70 @@
<ui:style>
.shortcuts {
- border-left: 1px solid #666;
- border-right: 1px solid #666;
+ border-left: 1px solid #999;
+ border-right: 1px solid #999;
+ border-bottom: 1px solid #999;
}
- .stackHeader {
- background: #c1eec8 url(gradient.gif) repeat-x 0px -1px;
- padding-top: 1em;
+ @sprite .stackHeader {
+ gwt-image: 'gradient';
+ background-color: #b4b6bc;
+
+ text-shadow: rgba(255, 255, 255, 1) 0 1px 1px;
+ font-size: 1.2em;
font-weight: bold;
- text-align: center;
- border-top: 1px solid #666;
- border-bottom: 1px solid #666;
+ color: #000;
+ padding: .7em .5em 0 .6em;
+ border-top: 1px solid #888;
+ }
+
+ @sprite .mailboxesIcon {
+ gwt-image: 'mailboxesgroup';
+ float: left;
+ }
+
+ @sprite .tasksIcon {
+ gwt-image: 'tasksgroup';
+ float: left;
+ }
+
+ @sprite .contactsIcon {
+ gwt-image: 'contactsgroup';
+ float: left;
}
</ui:style>
+ <ui:image field='mailboxesgroup' src='mailboxesgroup.png'/>
+ <ui:image field='contactsgroup' src='contactsgroup.png'/>
+ <ui:image field='tasksgroup' src='tasksgroup.png'/>
+ <ui:image field='gradient' src='gradient_bg_dark.png'
repeatStyle='Horizontal'/>
+
<g:StackLayoutPanel styleName='{style.shortcuts}' unit='EM'>
<g:stack>
- <g:header size='4'>
- <g:Label styleName='{style.stackHeader}'>Mailboxes</g:Label>
+ <g:header size='3'>
+ <g:HTMLPanel styleName='{style.stackHeader}'>
+ <div class='{style.mailboxesIcon}'/> Mailboxes
+ </g:HTMLPanel>
</g:header>
<mail:Mailboxes ui:field='mailboxes'/>
</g:stack>
<g:stack>
- <g:header size='4'>
- <g:Label styleName='{style.stackHeader}'>Tasks</g:Label>
+ <g:header size='3'>
+ <g:HTMLPanel styleName='{style.stackHeader}'>
+ <div class='{style.tasksIcon}'/> Tasks
+ </g:HTMLPanel>
</g:header>
<mail:Tasks ui:field='tasks'/>
</g:stack>
<g:stack>
- <g:header size='4'>
- <g:Label styleName='{style.stackHeader}'>Contacts</g:Label>
+ <g:header size='3'>
+ <g:HTMLPanel styleName='{style.stackHeader}'>
+ <div class='{style.contactsIcon}'/> Contacts
+ </g:HTMLPanel>
</g:header>
<mail:Contacts ui:field='contacts'/>
</g:stack>
</g:StackLayoutPanel>
-
</ui:UiBinder>
=======================================
---
/trunk/samples/mail/src/com/google/gwt/sample/mail/client/TopPanel.ui.xml
Tue Oct 6 14:10:56 2009
+++
/trunk/samples/mail/src/com/google/gwt/sample/mail/client/TopPanel.ui.xml
Mon Nov 9 10:52:41 2009
@@ -6,6 +6,8 @@
xmlns:g='urn:import:com.google.gwt.user.client.ui'
xmlns:mail='urn:import:com.google.gwt.sample.mail.client'>
+ <ui:image field='logo' src='logo.png'/>
+
<ui:style>
.statusDiv {
text-align: right;
@@ -16,11 +18,9 @@
text-align: right;
}
- .logo {
- background: url(logo.png);
+ @sprite .logo {
+ gwt-image: 'logo';
position: absolute;
- width: 140px;
- height: 75px;
}
</ui:style>
@@ -39,5 +39,4 @@
</div>
</div>
</g:HTMLPanel>
-
</ui:UiBinder>
=======================================
---
/trunk/samples/mail/src/com/google/gwt/sample/mail/client/default_photo.jpg
Tue May 22 21:45:36 2007
+++
/trunk/samples/mail/src/com/google/gwt/sample/mail/client/default_photo.jpg
Mon Nov 9 10:52:41 2009
Binary file, no diff available.
=======================================
--- /trunk/samples/mail/src/com/google/gwt/sample/mail/client/logo.png Tue
May 22 21:45:36 2007
+++ /trunk/samples/mail/src/com/google/gwt/sample/mail/client/logo.png Mon
Nov 9 10:52:41 2009
Binary file, no diff available.
=======================================
--- /trunk/samples/mail/war/Mail.css Tue Oct 13 16:57:19 2009
+++ /trunk/samples/mail/war/Mail.css Mon Nov 9 10:52:41 2009
@@ -1,112 +1,54 @@
body, table {
font-size: small;
}
-
body {
- background: #fff;
- color: black;
font-family: Helvetica, Arial, sans-serif;
- margin: 8px;
- margin-top: 3px;
-}
-
-a {
+ color: #000;
+ background: #fff;
+}
+a:link, a:visited, a:hover, a:active {
color: #000;
+ text-decoration: none;
}
-a:visited {
- color: #000;
-}
-
+/* Dialog boxes */
+.dialogTopLeftInner, .dialogMiddleLeftInner, .dialogBottomLeftInner,
+.dialogTopRightInner, .dialogMiddleRightInner, .dialogBottomRightInner {
+ display: none;
+}
.gwt-DialogBox {
background-color: white;
-}
-
+ border: 1px solid #666;
+}
.gwt-DialogBox .Caption {
- background: url(gradient.gif) repeat-x 0px -1px;
- font-weight: normal;
+ background: #d3d6dd url(gradient_bg_th.png) repeat-x bottom left;
+ font-weight: bold;
+ text-shadow: #fff 0 2px 2px;
cursor: default;
padding: 5px 10px;
- border: 1px solid #666;
+ border-bottom: 1px solid #999;
text-align: left;
}
-
.gwt-DialogBox .dialogContent {
- border: 1px solid #666;
- border-top: 0;
-}
-
-.gwt-DialogBox td {
- text-align: right;
-}
-
+}
.gwt-DialogBox .gwt-Button {
margin: 10px;
}
-
+.gwt-PopupGlass {
+ background-color: #000;
+ opacity: 0.3;
+ filter: alpha(opacity=30);
+}
+
+/* GWT Tree */
.gwt-Tree {
}
-
.gwt-Tree .gwt-TreeItem {
- padding: 1px 3px 0 3px;
+ padding: 0;
cursor: hand;
cursor: pointer;
display: block !important;
}
-
.gwt-Tree .gwt-TreeItem-selected {
background: #ccc;
}
-
-.mail-List {
- border-left: 1px solid #666;
- border-right: 1px solid #666;
- border-bottom: 1px solid #666;
- cursor: pointer;
- cursor: hand;
-}
-
-.mail-List td {
- border-top: 1px solid #fff;
- border-bottom: 1px solid #fff;
- padding: 2px 0 2px 10px;
-}
-
-.mail-ListHeader td {
- border-top: none;
-}
-
-.mail-ListHeader {
- background: #c1eec8 url(gradient.gif) repeat-x 0px -1px;
- font-weight: normal;
-}
-
-.mail-ListHeader .mail-ListNavBar .gwt-HTML {
- font-weight: normal;
-}
-
-.mail-ListHeader td {
- padding: 2px 0 2px 10px;
- border-top: 1px solid #666;
- border-bottom: 1px solid #666;
-}
-
-.mail-ListNavBar table {
-}
-
-.mail-ListNavBar td {
- border: none;
-}
-
-.mail-ListNavBar a {
- margin: 0 8px;
-}
-
-.mail-SelectedRow td {
- border-bottom: 1px solid #666;
- border-top: 1px solid #666;
-}
-
-.mail-SelectedRow {
- background: #eee;
-}
--~--~---------~--~----~------------~-------~--~----~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~----------~----~----~----~------~----~------~--~---