Revision 17400 trunk/extensions/extRemoteSensing/src/org/gvsig/remotesensing/scatterplot/chart/ROIChartList.java
ROIChartList.java | ||
---|---|---|
40 | 40 |
|
41 | 41 |
package org.gvsig.remotesensing.scatterplot.chart; |
42 | 42 |
|
43 |
import java.awt.Color; |
|
43 | 44 |
import java.util.ArrayList; |
44 | 45 |
import java.util.Collection; |
45 | 46 |
import java.util.HashMap; |
46 | 47 |
import java.util.Iterator; |
47 | 48 |
|
49 |
import org.omg.CORBA.INITIALIZE; |
|
50 |
|
|
51 |
import com.iver.andami.PluginServices; |
|
52 |
|
|
48 | 53 |
/** |
49 | 54 |
* Clase que representa la lista de regiones asociadas a un grafico. |
50 | 55 |
* |
... | ... | |
55 | 60 |
public class ROIChartList { |
56 | 61 |
|
57 | 62 |
private HashMap listRois = null; |
63 |
private Color arrayColor[]= new Color[10]; |
|
64 |
private int nextColor=0; |
|
65 |
private int defaultName=-1; |
|
58 | 66 |
|
59 | 67 |
public ROIChartList() { |
60 | 68 |
listRois= new HashMap(); |
69 |
initialize(); |
|
61 | 70 |
} |
62 | 71 |
|
63 | 72 |
|
73 |
|
|
74 |
private void initialize(){ |
|
75 |
nextColor= 0; |
|
76 |
arrayColor[0]=Color.GREEN; |
|
77 |
arrayColor[1]=Color.BLUE; |
|
78 |
arrayColor[2]=Color.ORANGE; |
|
79 |
arrayColor[3]= Color.YELLOW; |
|
80 |
arrayColor[4]= Color.BLACK; |
|
81 |
arrayColor[5]=Color.MAGENTA; |
|
82 |
arrayColor[6]=Color.GRAY; |
|
83 |
arrayColor[2]=Color.ORANGE; |
|
84 |
arrayColor[3]= Color.YELLOW; |
|
85 |
arrayColor[4]= Color.BLACK; |
|
86 |
} |
|
87 |
|
|
88 |
|
|
64 | 89 |
public HashMap getListRois(){ |
65 | 90 |
return listRois; |
66 | 91 |
} |
... | ... | |
88 | 113 |
return list; |
89 | 114 |
|
90 | 115 |
} |
116 |
|
|
117 |
|
|
118 |
|
|
119 |
public Color getNexColor(){ |
|
91 | 120 |
|
121 |
if(nextColor>9) |
|
122 |
return arrayColor[nextColor]; |
|
123 |
else |
|
124 |
return new Color((float)Math.random(),(float)Math.random(),(float)Math.random()); |
|
125 |
} |
|
126 |
|
|
92 | 127 |
|
128 |
/**Nombre por defecto para la siguiente roichart de la lista*/ |
|
129 |
public String getdefaultName(){ |
|
130 |
defaultName++; |
|
131 |
return PluginServices.getText(this,"roi_chart")+defaultName; |
|
132 |
} |
|
133 |
|
|
93 | 134 |
} |
Also available in: Unified diff