Re: [OpenMap Users] Re: setting DCW map fill color

From: Peter Wilkes <pwilkes_at_cowpie.acm.vt.edu>
Date: Mon, 31 Jan 2005 13:46:40 -0500 (EST)

Don,

        thank you. i've been following up with what you recommended and
this is what i have so far...

DrawingAttributes da = null;
Paint fillPaint = null;
VPFLayer dcwLayer = getDcwPolicalLayer();
if(dcwLayer != null)
{
  da = dcwLayer.getDrawingAttributes();
  fillPaint = da.getFillPaint();
  da.setFillPaint(Color.WHITE);
  dcwLayer.setDrawingAttributes(da);
  dcwLayer.doPrepare();
}

however it seems that i want to wait for the entire map to redraw itself.
i figured calling the "doPrepare" would work. however that just seems to
set up the layer to redraw.

i tried invalidate, validate, revalidate and repaint however i believe
they return immediately and i want to wait for drawing to complete before
i continue.

i tried implementing LayerStatusListener and waiting for the "update
finished" event however i don't seem to get getting that event.

is there anyway you could recommend waiting for the layer to repaint
completing before continuing?

thanks

Pete



On Mon, 31 Jan 2005, Don Dietrick wrote:

> OK, that helps. Programmatically, you can call
>
> DrawingAttributes da = layer.getWarehouse().getDrawingAttributes();
>
> and then set the fillColor on the da object.
>
> You can also set the fill color via properties.
>
> String prefix = layer.getPropertyPrefix();
> Properties props = new Properties();
> props.set(PropUtils.getScopedPropertyPrefix(prefix) + "fillColor",
> "AARRGGBB");
> layer.setProperties(prefix, props);
>
> - Don
>
>
>
> On Jan 31, 2005, at 10:08 AM, Peter Wilkes wrote:
>
> > as far as i can tell i'm using the VPFLayer with the DCW data. our
> > properties are as follows.
> >
> > dcwPolitical.class=com.bbn.openmap.layer.vpf.VPFLayer
> > dcwPolitical.prettyName=DCW Political Boundaries
> > dcwPolitical.vpfPath=Y:/mapdata/dcw
> > dcwPolitical.coverageType=po
> > dcwPolitical.featureTypes=edge area
> >
> > Thxs Don.
> >
> > Pete
> >
> > On Mon, 31 Jan 2005, Don Dietrick wrote:
> >
> >> Hi Peter,
> >>
> >> So you're using the VPFLayer with DCW data? Or are you using the
> >> ShapeLayer with a shape file derivative? It's unclear what layer you
> >> are using, and that kind of affects the answer.
> >>
> >> - Don
> >>
> >>
> >> On Jan 31, 2005, at 9:13 AM, Peter Wilkes wrote:
> >>
> >>> Hello,
> >>>
> >>> i've been checking the openmap website thinking that maybe someone
> >>> posted a solution however it appears the the mail archives are not
> >>> working
> >>> properly.
> >>>
> >>> in relation to this problem i can see no possible way to temporarily
> >>> change the fill color. i thought of a solution of having a layer
> >>> with
> >>> the
> >>> same exact properies set (except fillcolor) and disabling the normal
> >>> layer
> >>> and enabling the one with the fill color we want however i can't seem
> >>> to
> >>> find a way to temporarily remove/add a layer by name.
> >>>
> >>> i would appreciate any help anyone could please provide.
> >>>
> >>> thank you
> >>>
> >>> Pete
> >>>
> >>> On Thu, 27 Jan 2005, Peter Wilkes wrote:
> >>>
> >>>> Hi,
> >>>>
> >>>> my client has asked us to have the option of printing our openmap
> >>>> map in grayscale with white background and black icons on top. i
> >>>> have
> >>>> figured out how to set the background color of the map
> >>>> programmatically
> >>>> and i can see how to change the color of the DCW layers in the
> >>>> properties
> >>>> files however i want to be able to change that programmatically so i
> >>>> can
> >>>> do the following
> >>>>
> >>>> backcolor = getbackgroundcolor()
> >>>> fillcolor = getdcwfillcolor()
> >>>> setbackground(WHITE)
> >>>> setdcwfillcolor(WHITE)
> >>>>
> >>>> print()
> >>>>
> >>>> setbackcolor(backcolor)
> >>>> setdcwfillcolor(fillcolor)
> >>>>
> >>>> if anyone knows how to be able to set/get the DCW fill color
> >>>> programmatically i would be most appreciative.
> >>>>
> >>>> Pete
> >>>>
> >>>
> >>> --
> >>> [To unsubscribe to this list send an email to "majdart_at_bbn.com"
> >>> with the following text in the BODY of the message "unsubscribe
> >>> openmap-users"]
> >>>
> >>>
> >>
> >>
> >> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> >> Don Dietrick, dietrick_at_bbn.com
> >> BBN Technologies, Cambridge, MA
> >> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> >>
> >>
> >
> >
>
>
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> Don Dietrick, dietrick_at_bbn.com
> BBN Technologies, Cambridge, MA
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>
> --
> [To unsubscribe to this list send an email to "majdart_at_bbn.com"
> with the following text in the BODY of the message "unsubscribe openmap-users"]
>

--
[To unsubscribe to this list send an email to "majdart_at_bbn.com"
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Mon Jan 31 2005 - 13:50:44 EST

This archive was generated by hypermail 2.3.0 : Tue Mar 28 2017 - 23:25:06 EDT