It seem to work when I modify getFillPattern in BasicStyle to include
the check for null and then initialize the fillPattern as before.
public Paint getFillPattern() {
if (fillPattern == null) {
fillPattern = WKTFillPattern.createDiagonalStripePattern(4,
2, false, true);
}
return fillPattern;
}
The only side effect is that initially in the Change Styles Rendering
Tab, the Fill pattern is 0 grey. However when you check the Fill
pattern check box, it turns solid black and works correctly so I don't
see this as an issue.
regards,
Larry
On 6/5/07, Larry Becker <[EMAIL PROTECTED]> wrote:
> Sascha,
>
> I implemented your changes in SkyJUMP to BasicStyle and
> BasicStylePanel. It worked when I opened a task with colour theming
> already set up, but when I tried to add a new layer and chose Change
> Styles, I got:
>
> java.lang.NullPointerException
> at
> com.vividsolutions.jump.workbench.ui.style.BasicStylePanel.findEquivalentItem(BasicStylePanel.java:483)
> at
> com.vividsolutions.jump.workbench.ui.style.BasicStylePanel.setBasicStyle(BasicStylePanel.java:459)
> at
> com.vividsolutions.jump.workbench.ui.style.RenderingStylePanel.<init>(RenderingStylePanel.java:189)
> at
> com.vividsolutions.jump.workbench.ui.style.ChangeStylesPlugIn.execute(ChangeStylesPlugIn.java:87)
>
> regards,
> Larry
>
> On 6/5/07, Paul Austin <[EMAIL PROTECTED]> wrote:
> > Sascha,
> >
> > In your comments you said you added an if statement but used the ?:
> > operator, I think in this case a proper if {} else {} statement would be
> > much more readable. I think that the ?: operator should be used
> > minimally, for example if you were generating HTML and wanted to
> > optionally include an attribute on a tag.
> >
> > + fill = fill == null
> > + ? fillPatternComboBox.getItemAt(0)
> > + : findEquivalentItem(fill, fillPatternComboBox);
> >
> > BTW does this improvement only improve speed if you have a themed layer
> > or will it speed up all layers?
> >
> > 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
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
> >
>
>
> --
> http://amusingprogrammer.blogspot.com/
>
--
http://amusingprogrammer.blogspot.com/
-------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel