Update of /cvsroot/rails/18xx/rails/ui/swing/hexmap
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv29969/rails/ui/swing/hexmap
Modified Files:
EWHexMap.java HexMap.java NSHexMap.java
Log Message:
1856 CGR formation round
Index: NSHexMap.java
===================================================================
RCS file: /cvsroot/rails/18xx/rails/ui/swing/hexmap/NSHexMap.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** NSHexMap.java 4 Jun 2008 19:00:38 -0000 1.6
--- NSHexMap.java 4 May 2009 20:29:15 -0000 1.7
***************
*** 43,46 ****
--- 43,47 ----
hex.setHexModel(mh);
hex.originalTileId = hex.currentTileId;
+ hexesByName.put(mh.getName(), hex);
h[i][j] = hex;
Index: EWHexMap.java
===================================================================
RCS file: /cvsroot/rails/18xx/rails/ui/swing/hexmap/EWHexMap.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** EWHexMap.java 4 Jun 2008 19:00:38 -0000 1.7
--- EWHexMap.java 4 May 2009 20:29:15 -0000 1.8
***************
*** 40,43 ****
--- 40,44 ----
hex.setHexModel(mh);
hex.originalTileId = hex.currentTileId;
+ hexesByName.put(mh.getName(), hex);
h[i][j] = hex;
Index: HexMap.java
===================================================================
RCS file: /cvsroot/rails/18xx/rails/ui/swing/hexmap/HexMap.java,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** HexMap.java 4 Jun 2008 19:00:38 -0000 1.14
--- HexMap.java 4 May 2009 20:29:15 -0000 1.15
***************
*** 37,41 ****
protected GUIHex[][] h;
! MapHex[][] hexArray;
protected static ArrayList<GUIHex> hexes;
protected int scale = 2 * Scale.get();
--- 37,42 ----
protected GUIHex[][] h;
! protected MapHex[][] hexArray;
! protected Map<String, GUIHex> hexesByName = new HashMap<String, GUIHex>();
protected static ArrayList<GUIHex> hexes;
protected int scale = 2 * Scale.get();
***************
*** 94,97 ****
--- 95,102 ----
return null;
}
+
+ public GUIHex getHexByName (String hexName) {
+ return hexesByName.get (hexName);
+ }
public void paintComponent(Graphics g) {
|