[OpenMap Users] OMScalingIcon not re-rendering after property change

From: SlikWilly <rbenito_at_mitre.org>
Date: Mon, 12 Jan 2009 06:18:10 -0800 (PST)

Hi,
  I am trying to set the matting on the an OMScalingIcon whenever the icon
is in a predefined Rectangle. My code (below) is able to identify when an
OMSCalingIcon is in the Rectangle, and it sets the Matting on the icon (I've
verified this through breakpoints), but the OMScalingIcon matting is not
being shown on the map. I've attached the pertinent methods of my Layer
class below. Any suggestions on how to get this working?

Thanks



    public void findInRectangle(){
        int listSize = myOMGraphicList.size();
        if(listSize == 0){return;}
        int counter = 0;

        while(counter <= listSize - 1){
            OMScalingIcon graphicToTest = (OMScalingIcon)
myOMGraphicList.getOMGraphicAt(counter);
            
            //areaDrawn is a predefined Rectangle object
            if(areaDrawn.contains(graphicToTest.getMapLocation())){
                //Set the matting of the OMGraphic
                System.out.println("In the rectangle");
                graphicToTest.setMatted(Boolean.TRUE);
                graphicToTest.regenerate(getProjection());
            }
            else{
                System.out.println("Not in the rectangle");
            }
            counter++;
        }
        update();
    }

    private void update(){
        myOMGraphicList.generate(getProjection());
        repaint();
    }

    public void projectionChanged(ProjectionEvent e) {
       this.setProjection(e);
       myOMGraphicList.project(e.getProjection(), true);
       repaint();
    }

    public void paint(java.awt.Graphics g) {
        myOMGraphicList.render(g);
    }
-- 
View this message in context: http://www.nabble.com/OMScalingIcon-not-re-rendering-after-property-change-tp21415302p21415302.html
Sent from the OpenMap mailing list archive at Nabble.com.
--
[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 12 2009 - 09:20:29 EST

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