[OpenMap Users] OMText please help

From: Mariusz Chmielewski <mchmiel_at_isi.wat.waw.pl>
Date: Fri, 03 Jun 2005 14:35:43 +0200

I created a layer that viewes my Pictures and inside each Picture object
i put the description (OMText) but the thext ins't showing i debugged it
sereral times and found that when called rander on OMText the function
returns without any results in this line:

public synchronized void render(Graphics g) {
       g = g.create();

>>>>> if (getNeedToRegenerate() || pt == null || !isVisible())
                       return;


i do not know why perhaps my concept of extending an OMRaster class and
putting attribute of OMText inside it which displays the text under the
icon isn't right???


what am i doing wrong ??

here is the layer implementation:

   public void projectionChanged(ProjectionEvent event) {
       projection = event.getProjection();
       Iterator itList = unitList.iterator();
       while (itList.hasNext()) {
           MilitaryUnitGraphicsObj graphic = (MilitaryUnitGraphicsObj)
itList
                   .next();
          
          
           //OMGraphicList graphic = (OMGraphicList) itList.next();
          
           //graphic.getUnitDescription().generate(projection);
           graphic.generate(projection);
           graphic.getUnitDescription().generate(projection);
       }
   }

   public void paint(Graphics g) {
       Iterator itList = unitList.iterator();
       while (itList.hasNext()) {
           MilitaryUnitGraphicsObj graphic = (MilitaryUnitGraphicsObj)
itList.next();
           //OMGraphicList graphic = (OMGraphicList) itList.next();
           //OMGraphicList a = new OMGraphicList();
           //a.add(graphic);
           graphic.render(g);
          
           //a.add(graphic.getUnitDescription());
           graphic.getUnitDescription().render(g);
           //a.render(g);
       }
      
       //thisS.render(g);
       //unitList.renderAllAsSelected(g);
      
   }

   public void updateGraphics() {

      
       Iterator iter = unitList.iterator();
       while (iter.hasNext()) {
           MilitaryUnitGraphicsObj militaryUnit =
(MilitaryUnitGraphicsObj) iter.next();
           militaryUnit.setNeedToRegenerate(true);
           militaryUnit.getUnitDescription().setNeedToRegenerate(true);
           if (projection != null){
               militaryUnit.getUnitDescription().generate(projection);
               militaryUnit.generate(projection);
              
           }
          
       }
       repaint();

   }

please help

Mariusz Chmielewski




--
[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 Fri Jun 03 2005 - 08:39:11 EDT

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