Hi Luong,

I don't quite understand what you're trying to do, but passing an
instance of your ConstructStyle class to the map context or whatever
won't work because it is NOT a Style object.  What you want to pass it
is the return value of the createStyle method.

If you want a separate style helper class you could have one with
static methodsj.  For example...

public class ConstructStyle {

    public static Style constructLineStyle(String featureTypeName, Color c) {
        ...
    }

   // insert other style methods for polygons etc.
}

then in your map building code when you need a style for a feature type...

Style style = ConstructStyle.constructLineStyle(myTypeName, myColour);

Michael

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Geotools-gt2-users mailing list
Geotools-gt2-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to