Colors in Gridded 2d set

Hi All,

1. I have created a 2D grid using UnionSet. I also
worked on changing the colors of the gridded sets. We
want the boundary gridded sets to be of different
colors. Is there any way to change the colors of
particular gridded sets?
Please suggest in this.

2. I am using Direct Manipuilation renderer for
drawing the geometry and then drawing the grid.
Everything works fine. I want to stop the direct
manipulation renderer after the grid is drawn. How can
i stop this? Please help me out in this matter.

3. I want to add JPopUp menu on JPanel where grid is
coming. I am trying to add it but, it is giving some
problem. How can i achive this.

public void popAdd(){
         display.addDisplayListener(new
DisplayListener() {
             public void displayChanged(DisplayEvent
e) {
                 if(e.getId() =
DisplayEvent.MOUSE_RELEASED_RIGHT ) {   
                     addPopupMenu();
                 }
             }
         }
         );
    }
    
       
    public void addPopupMenu() {
        popupMenu = new JPopupMenu();
        item = new JMenuItem("Show Grid");
        popupMenu.add(item);
        popupMenu.show();
        
        item.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent
avt) {
                 // checkPopup(avt);
            }
        });
    }
     
    public void checkPopup(MouseEvent mv) {
        if(mv.isPopupTrigger()) {
            popupMenu.show(this, mv.getX(),
mv.getY());
            System.out.println("x = " + mv.getX() + " 
  y = " + mv.getY());
        }
    }
    
with regards.
Karan Kapoor


__________________________________________________
Do You Yahoo!?
Make a great connection at Yahoo! Personals.
http://personals.yahoo.com


  • 2001 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the visad archives: