01: package com.vividsolutions.jump.workbench.ui.renderer.style;
02:
03: import com.vividsolutions.jump.workbench.plugin.AbstractPlugIn;
04: import com.vividsolutions.jump.workbench.plugin.PlugInContext;
05: import com.vividsolutions.jump.workbench.ui.images.IconLoader;
06:
07: import java.awt.Color;
08:
09: import java.util.ArrayList;
10: import java.util.Collection;
11:
12: public class CustomFillPatternExamplePlugIn extends AbstractPlugIn {
13: public void initialize(PlugInContext context) throws Exception {
14: Collection customFillPatterns = (Collection) context
15: .getWorkbenchContext().getWorkbench().getBlackboard()
16: .get(FillPatternFactory.CUSTOM_FILL_PATTERNS_KEY,
17: new ArrayList());
18: customFillPatterns.add(new WKTFillPattern(1, 10,
19: "LINESTRING(3 3, 3 -3, -3 -3, 3 3)"));
20: customFillPatterns.add(new ImageFillPattern(IconLoader.class,
21: "Favorite.gif"));
22: }
23: }
|