Paul, This sounds pretty slick. I just want to make sure that I understand your design. A FilterStyle object would implement and/or extend the current Style object. It would apply a Style filter object depending on the attribute values of each Feature in a layer.
It sounds like a FilterStyle is somewhat like a wrapper of a Style object with an embedded query. Do I have it correct? If so, I think this is a great feature. Will there be a UI component that allows the user to define new StyleFilters? SS P.S. - It seems like you might be able to simplify this a little bit by eliminating the StyleFilter object. You could move the isMatched method and the getStyle method to the FilterStyle. Then just store regular Styles in the FilterStyle. In this scenario you would move the selection of the approriate "style" to the FilterStyle itself. This is just a suggestion. :] On 6/11/07, Paul Austin <[EMAIL PROTECTED]> wrote: > The current theming works well if you have a single attribute value that > you want to assign a different style to. It does not however work if you > want to define more complex style to feature rules using more than one > attribute (e.g. number of lanes and surface type on a road). > > What would be useful is another type of style called FilterStyle. This > style would have an ordered list of StyleFilters which would have some > kind of filter, a label and a Style object to use if the filter matches > the feature. The implementation of Filter Style would loop through the > filters until one was matched and then return the style for that filter. > If no filters are matched then a default style is returned. > > The StyleFilter would be an interface as shown below and there would be > an implementation that would take a Map of expected values on the feature. > > public interface StyleFilter { > boolean isMatched(Feature feature); > > String getLabel(); > void setLabel(String label); > > Style getStyle(); > > void setStyle(Style style); > } > > > Obviously this new style would be a little slower than the existing > color theming so if you are filtering on one attribute stick with the > current method, if you want something more complex this new approach > will work. > > I have a prototype of the rendering side working, I'll need to add a UI > panel to edit the style and also need to extend the TreeModel to display > the themes in the tree as is done for the current style. With the new > style I'd allow users to show/hide themed features as well. > > Paul > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Jump-pilot-devel mailing list > Jump-pilot-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel > ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel