Revision 62f7a90a
Added by Leszek Koltunski over 8 years ago
src/main/java/org/distorted/library/DistortedGridFactory.java | ||
---|---|---|
36 | 36 |
static synchronized DistortedObjectGrid getGrid(int cols, String desc, boolean frontOnly) |
37 | 37 |
{ |
38 | 38 |
String d = desc+("_"+cols+"_"+(frontOnly?"1":"0")); |
39 |
|
|
40 | 39 |
Object o = mGrids.get(d); |
41 | 40 |
|
42 |
if( o!=null ) return (DistortedObjectGrid)o; |
|
43 |
|
|
44 |
DistortedCubesGrid grid = new DistortedCubesGrid(cols,desc,frontOnly); |
|
45 |
|
|
46 |
mGrids.put(d,grid); |
|
47 |
|
|
48 |
return grid; |
|
41 |
if( o!=null ) |
|
42 |
{ |
|
43 |
return (DistortedObjectGrid)o; |
|
44 |
} |
|
45 |
else |
|
46 |
{ |
|
47 |
DistortedObjectGrid grid = new DistortedCubesGrid(cols,desc,frontOnly); |
|
48 |
mGrids.put(d,grid); |
|
49 |
return grid; |
|
50 |
} |
|
49 | 51 |
} |
50 | 52 |
|
51 | 53 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
54 | 56 |
static synchronized DistortedObjectGrid getGrid(int cols, int rows) |
55 | 57 |
{ |
56 | 58 |
String d = cols+"+"+rows; |
57 |
|
|
58 | 59 |
Object o = mGrids.get(d); |
59 | 60 |
|
60 |
if( o!=null ) return (DistortedObjectGrid)o; |
|
61 |
|
|
62 |
DistortedBitmapGrid grid = new DistortedBitmapGrid(cols,rows); |
|
63 |
|
|
64 |
mGrids.put(d,grid); |
|
65 |
|
|
66 |
return grid; |
|
61 |
if( o!=null ) |
|
62 |
{ |
|
63 |
return (DistortedObjectGrid)o; |
|
64 |
} |
|
65 |
else |
|
66 |
{ |
|
67 |
DistortedObjectGrid grid = new DistortedBitmapGrid(cols,rows); |
|
68 |
mGrids.put(d,grid); |
|
69 |
return grid; |
|
70 |
} |
|
67 | 71 |
} |
68 | 72 |
|
69 | 73 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
Also available in: Unified diff
Revert the Cubes App.