Revision 44534 trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/label/GeneralLabelingFactory.java

View differences:

GeneralLabelingFactory.java
44 44
import org.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelingMethod;
45 45
import org.gvsig.fmap.mapcontext.rendering.legend.styling.IPlacementConstraints;
46 46
import org.gvsig.fmap.mapcontext.rendering.legend.styling.IZoomConstraints;
47
import org.gvsig.tools.util.Factory;
47 48

  
48 49
/**
49 50
 *
......
53 54
 * @author jaume dominguez faus - jaume.dominguez@iver.es Mar 6, 2008
54 55
 *
55 56
 */
56
public class GeneralLabelingFactory {
57
public class GeneralLabelingFactory implements Factory {
57 58

  
58
	public static GeneralLabelingStrategy createStrategy(
59
			FLayer layer,
60
			ILabelingMethod method,
61
			IPlacementConstraints placement_c,
62
			IZoomConstraints zoom_c) {
59
    public static GeneralLabelingStrategy createStrategy(
60
            FLayer layer,
61
            ILabelingMethod method,
62
            IPlacementConstraints placement_c,
63
            IZoomConstraints zoom_c) {
63 64

  
64
		GeneralLabelingStrategy resp = new GeneralLabelingStrategy();
65
		resp.setLayer(layer);
66
		if (method != null) {
67
			resp.setLabelingMethod(method);
68
		}
69
		if (placement_c != null) {
70
			resp.setPlacementConstraints(placement_c);
71
		}
72
		if (zoom_c != null) {
73
			resp.setZoomConstraints(zoom_c);
74
		}
75
		return resp;
76
	}
65
        GeneralLabelingStrategy resp = new GeneralLabelingStrategy();
66
        resp.setLayer(layer);
67
        if (method != null) {
68
            resp.setLabelingMethod(method);
69
        }
70
        if (placement_c != null) {
71
            resp.setPlacementConstraints(placement_c);
72
        }
73
        if (zoom_c != null) {
74
            resp.setZoomConstraints(zoom_c);
75
        }
76
        return resp;
77
    }
78

  
79
    @Override
80
    public String getName() {
81
        return IGeneralLabelingStrategy.NAME;
82
    }
83

  
84
    @Override
85
    public Object create(Object... parameters) {
86
        GeneralLabelingStrategy resp = new GeneralLabelingStrategy();
87

  
88
        return resp;
89
    }
77 90
}

Also available in: Unified diff