com.google.gwt.sample.stockwatcher.client.AppActivityMapper.java Source code

Java tutorial

Introduction

Here is the source code for com.google.gwt.sample.stockwatcher.client.AppActivityMapper.java

Source

package com.google.gwt.sample.stockwatcher.client;

import com.google.gwt.activity.shared.Activity;
import com.google.gwt.activity.shared.ActivityMapper;
import com.google.gwt.place.shared.Place;

public class AppActivityMapper implements ActivityMapper {
    private ClientFactory clientFactory;

    public AppActivityMapper(ClientFactory clientFactory) {
        super();
        this.clientFactory = clientFactory;
    }

    @Override
    public Activity getActivity(Place place) {
        if (place instanceof StockWatcherListPlace)
            return new StockWatcherActivity((StockWatcherListPlace) place, clientFactory);
        return null;
    }
}