]> source.dussan.org Git - vaadin-framework.git/commitdiff
Sampler theming.
authorMarc Englund <marc.englund@itmill.com>
Tue, 27 Jan 2009 10:14:19 +0000 (10:14 +0000)
committerMarc Englund <marc.englund@itmill.com>
Tue, 27 Jan 2009 10:14:19 +0000 (10:14 +0000)
svn changeset:6643/svn branch:trunk

WebContent/ITMILL/themes/sampler/sampler/next.png [new file with mode: 0644]
WebContent/ITMILL/themes/sampler/sampler/prev.png [new file with mode: 0644]
WebContent/ITMILL/themes/sampler/sampler/quickjump.png [new file with mode: 0644]
WebContent/ITMILL/themes/sampler/sampler/styles.css
src/com/itmill/toolkit/demo/sampler/SamplerApplication.java

diff --git a/WebContent/ITMILL/themes/sampler/sampler/next.png b/WebContent/ITMILL/themes/sampler/sampler/next.png
new file mode 100644 (file)
index 0000000..1193bc1
Binary files /dev/null and b/WebContent/ITMILL/themes/sampler/sampler/next.png differ
diff --git a/WebContent/ITMILL/themes/sampler/sampler/prev.png b/WebContent/ITMILL/themes/sampler/sampler/prev.png
new file mode 100644 (file)
index 0000000..ccaff7d
Binary files /dev/null and b/WebContent/ITMILL/themes/sampler/sampler/prev.png differ
diff --git a/WebContent/ITMILL/themes/sampler/sampler/quickjump.png b/WebContent/ITMILL/themes/sampler/sampler/quickjump.png
new file mode 100644 (file)
index 0000000..ad7ff01
Binary files /dev/null and b/WebContent/ITMILL/themes/sampler/sampler/quickjump.png differ
index c4e2a80266ac713691b53fc283c707550d2e0751..c8fa6220f7a0b134219990fe8a33ef45933d3f5a 100644 (file)
        background: transparent url(grayfade.png) repeat-x;
 }
 
+.i-app-SamplerApplication .i-popupview-quickjump {
+       background: transparent url(quickjump.png) no-repeat 0px 1px;
+}
+
 .i-customcomponent-breadcrumbs .i-link a {
        text-decoration: none;
 }
index 18a5f11e2ba7ff13c289854eb82ae084de4915e8..46d79a075869f178c2a42193bbf0e20119ee39a0 100644 (file)
@@ -27,6 +27,7 @@ import com.itmill.toolkit.ui.GridLayout;
 import com.itmill.toolkit.ui.HorizontalLayout;
 import com.itmill.toolkit.ui.Label;
 import com.itmill.toolkit.ui.Panel;
+import com.itmill.toolkit.ui.PopupView;
 import com.itmill.toolkit.ui.SplitPanel;
 import com.itmill.toolkit.ui.Table;
 import com.itmill.toolkit.ui.Tree;
@@ -186,21 +187,21 @@ public class SamplerApplication extends Application {
                 }
             });
 
+            // "Search" combobox
+            // TODO add input prompt
+            Component search = createSearch();
+            nav.addComponent(search);
+            nav.setComponentAlignment(search, Alignment.MIDDLE_LEFT);
+
             // Previous sample
             Button b = createPrevButton();
             nav.addComponent(b);
-            nav.setComponentAlignment(b, Alignment.MIDDLE_LEFT);
+            nav.setComponentAlignment(b, Alignment.MIDDLE_RIGHT);
             // Next sample
             b = createNextButton();
             nav.addComponent(b);
             nav.setComponentAlignment(b, Alignment.MIDDLE_LEFT);
 
-            // "Search" combobox
-            // TODO add input prompt
-            Component search = createSearch();
-            nav.addComponent(search);
-            nav.setComponentAlignment(search, Alignment.MIDDLE_LEFT);
-
             // togglebar
             mainExpand.addComponent(toggleBar);
             toggleBar.setHeight("40px");
@@ -293,7 +294,14 @@ public class SamplerApplication extends Application {
                 }
             });
             // TODO add icons for section/sample
-            return search;
+
+            PopupView pv = new PopupView("", search);
+            pv.setWidth("22px");
+            pv.setHeight("22px");
+            pv.setStyleName("quickjump");
+            pv.setDescription("Quick jump");
+
+            return pv;
         }
 
         private Component createLogo() {
@@ -310,7 +318,7 @@ public class SamplerApplication extends Application {
         }
 
         private Button createNextButton() {
-            Button b = new Button("Next sample →", new ClickListener() {
+            Button b = new Button("", new ClickListener() {
                 public void buttonClick(ClickEvent event) {
                     Object curr = currentFeature.getValue();
                     Object next = allFeatures.nextItemId(curr);
@@ -320,13 +328,16 @@ public class SamplerApplication extends Application {
                     currentFeature.setValue(next);
                 }
             });
+            b.setWidth("22px");
+            b.setHeight("22px");
+            b.setIcon(new ThemeResource("sampler/next.png"));
             b.setDescription("Jump to the next sample");
             b.setStyleName(Button.STYLE_LINK);
             return b;
         }
 
         private Button createPrevButton() {
-            Button b = new Button("← Previous sample", new ClickListener() {
+            Button b = new Button("", new ClickListener() {
                 public void buttonClick(ClickEvent event) {
                     Object curr = currentFeature.getValue();
                     Object prev = allFeatures.prevItemId(curr);
@@ -336,6 +347,9 @@ public class SamplerApplication extends Application {
                     currentFeature.setValue(prev);
                 }
             });
+            b.setWidth("22px");
+            b.setHeight("22px");
+            b.setIcon(new ThemeResource("sampler/prev.png"));
             b.setDescription("Jump to the previous sample");
             b.setStyleName(Button.STYLE_LINK);
             return b;