diff options
-rw-r--r-- | WebContent/ITMILL/themes/sampler/sampler/next.png | bin | 0 -> 824 bytes | |||
-rw-r--r-- | WebContent/ITMILL/themes/sampler/sampler/prev.png | bin | 0 -> 826 bytes | |||
-rw-r--r-- | WebContent/ITMILL/themes/sampler/sampler/quickjump.png | bin | 0 -> 889 bytes | |||
-rw-r--r-- | WebContent/ITMILL/themes/sampler/sampler/styles.css | 4 | ||||
-rw-r--r-- | src/com/itmill/toolkit/demo/sampler/SamplerApplication.java | 34 |
5 files changed, 28 insertions, 10 deletions
diff --git a/WebContent/ITMILL/themes/sampler/sampler/next.png b/WebContent/ITMILL/themes/sampler/sampler/next.png Binary files differnew file mode 100644 index 0000000000..1193bc1897 --- /dev/null +++ b/WebContent/ITMILL/themes/sampler/sampler/next.png diff --git a/WebContent/ITMILL/themes/sampler/sampler/prev.png b/WebContent/ITMILL/themes/sampler/sampler/prev.png Binary files differnew file mode 100644 index 0000000000..ccaff7d02d --- /dev/null +++ b/WebContent/ITMILL/themes/sampler/sampler/prev.png diff --git a/WebContent/ITMILL/themes/sampler/sampler/quickjump.png b/WebContent/ITMILL/themes/sampler/sampler/quickjump.png Binary files differnew file mode 100644 index 0000000000..ad7ff01f63 --- /dev/null +++ b/WebContent/ITMILL/themes/sampler/sampler/quickjump.png diff --git a/WebContent/ITMILL/themes/sampler/sampler/styles.css b/WebContent/ITMILL/themes/sampler/sampler/styles.css index c4e2a80266..c8fa6220f7 100644 --- a/WebContent/ITMILL/themes/sampler/sampler/styles.css +++ b/WebContent/ITMILL/themes/sampler/sampler/styles.css @@ -12,6 +12,10 @@ 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; } diff --git a/src/com/itmill/toolkit/demo/sampler/SamplerApplication.java b/src/com/itmill/toolkit/demo/sampler/SamplerApplication.java index 18a5f11e2b..46d79a0758 100644 --- a/src/com/itmill/toolkit/demo/sampler/SamplerApplication.java +++ b/src/com/itmill/toolkit/demo/sampler/SamplerApplication.java @@ -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; |