From: James M. <jma...@us...> - 2001-11-23 18:52:19
|
Update of /cvsroot/geotools/geotools/src/uk/ac/leeds/ccg/widgets In directory usw-pr-cvs1:/tmp/cvs-serv3079/uk/ac/leeds/ccg/widgets Modified Files: ThemePanel.java Log Message: removed more Java2 specific method calls Index: ThemePanel.java =================================================================== RCS file: /cvsroot/geotools/geotools/src/uk/ac/leeds/ccg/widgets/ThemePanel.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** ThemePanel.java 2001/11/15 13:49:07 1.6 --- ThemePanel.java 2001/11/23 18:52:17 1.7 *************** *** 170,174 **** class MouseRelease extends java.awt.event.MouseAdapter{ public void mouseReleased(MouseEvent e){ ! e.translatePoint(0,e.getComponent().getY()); Component c = p.getComponentAt(e.getX(),e.getY()); Theme t2 = (Theme)switches.get(e.getSource()); --- 170,174 ---- class MouseRelease extends java.awt.event.MouseAdapter{ public void mouseReleased(MouseEvent e){ ! e.translatePoint(0,(int)e.getComponent().getLocation().y); Component c = p.getComponentAt(e.getX(),e.getY()); Theme t2 = (Theme)switches.get(e.getSource()); *************** *** 180,189 **** Theme t1 = (Theme)switches.get(c); - ! Graphics g = getGraphics(); g.setColor(getBackground()); ! g.fillRect(0,0,getWidth(),getHeight()); if(t1!=null && t2!=null && t1!=t2){ --- 180,188 ---- Theme t1 = (Theme)switches.get(c); ! Graphics g = getGraphics(); g.setColor(getBackground()); ! g.fillRect(0,0,getSize().width,getSize().height); if(t1!=null && t2!=null && t1!=t2){ *************** *** 196,205 **** public void mouseDragged(MouseEvent e){ //System.out.println(e.getComponent()); ! e.translatePoint(0,e.getComponent().getY()); Component c = p.getComponentAt(e.getX(),e.getY()); int y; ! if(c==null) y = p.getHeight(); else{ ! y = c.getY(); } if(c==p) y = e.getY(); --- 195,204 ---- public void mouseDragged(MouseEvent e){ //System.out.println(e.getComponent()); ! e.translatePoint(0,e.getComponent().getLocation().y); Component c = p.getComponentAt(e.getX(),e.getY()); int y; ! if(c==null) y = p.getSize().height; else{ ! y = c.getLocation().y; } if(c==p) y = e.getY(); *************** *** 208,216 **** Graphics g = getGraphics(); g.setColor(getBackground()); ! g.fillRect(0,0,getWidth(),getHeight()); g.setColor(Color.red); ! g.fillRect(0,y,getWidth(),4); --- 207,215 ---- Graphics g = getGraphics(); g.setColor(getBackground()); ! g.fillRect(0,0,getSize().width,getSize().width); g.setColor(Color.red); ! g.fillRect(0,y,getSize().width,4); |