(String name)
| 63 | } |
| 64 | |
| 65 | public int getTransportIndex(String name){ |
| 66 | if (transports == null) return 0; |
| 67 | Object o=transports.get(name); |
| 68 | if (o instanceof String) { |
| 69 | if (o == "none") return 0; |
| 70 | int index=(transpSkins.size()+1)<<24; |
| 71 | // loading additional skin |
| 72 | ImageList customTransp=new ImageList((String) o, 1, ICONS_IN_ROW); |
| 73 | // customTransp loading success? |
| 74 | if (customTransp.getHeight()==0) customTransp=this; |
| 75 | |
| 76 | transpSkins.addElement( customTransp ); |
| 77 | transports.put(name, new Integer(index) ); |
| 78 | |
| 79 | return index; |
| 80 | } else { |
| 81 | return (o==null)?0:((Integer)o).intValue(); |
| 82 | } |
| 83 | } |
| 84 | |
| 85 | |
| 86 | public void drawImage(Graphics g, int index, int x, int y) { |
no test coverage detected