From 6c63829236d3f7dc2186d3fdcf1b581cca12d390 Mon Sep 17 00:00:00 2001 From: Marc Englund Date: Tue, 10 Feb 2009 19:48:58 +0000 Subject: [PATCH] Sampler: removed "View section" -links from ListView for clarity. svn changeset:6790/svn branch:trunk --- .../demo/sampler/SamplerApplication.java | 29 ++++++++++--------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/src/com/itmill/toolkit/demo/sampler/SamplerApplication.java b/src/com/itmill/toolkit/demo/sampler/SamplerApplication.java index aadf405edb..4131b58207 100644 --- a/src/com/itmill/toolkit/demo/sampler/SamplerApplication.java +++ b/src/com/itmill/toolkit/demo/sampler/SamplerApplication.java @@ -579,20 +579,23 @@ public class SamplerApplication extends Application { public Component generateCell(Table source, Object itemId, Object columnId) { final Feature feature = (Feature) itemId; - ActiveLink b = new ActiveLink( - (feature instanceof FeatureSet ? "View section ‣" - : "View sample ‣"), new ExternalResource( - "#" + getPathFor(feature))); - b.addListener(new ActiveLink.LinkActivatedListener() { - public void linkActivated(LinkActivatedEvent event) { - if (!event.isLinkOpened()) { - ((SamplerWindow) getWindow()) - .setFeature(feature); + if (feature instanceof FeatureSet) { + return null; + } else { + ActiveLink b = new ActiveLink("View sample ‣", + new ExternalResource("#" + getPathFor(feature))); + b.addListener(new ActiveLink.LinkActivatedListener() { + public void linkActivated(LinkActivatedEvent event) { + if (!event.isLinkOpened()) { + ((SamplerWindow) getWindow()) + .setFeature(feature); + } } - } - }); - b.setStyleName(Button.STYLE_LINK); - return b; + }); + + b.setStyleName(Button.STYLE_LINK); + return b; + } } }); -- 2.39.5