Revision 8794 org.gvsig.raster/branches/org.gvsig.raster.2.4/org.gvsig.raster/org.gvsig.fmap.mapcontext.raster.swing/org.gvsig.fmap.mapcontext.raster.swing.impl/src/main/java/org/gvsig/fmap/mapcontext/raster/swing/impl/bands/BandsTableModel.java
BandsTableModel.java | ||
---|---|---|
62 | 62 |
public static final List<String> YCBCRColorSpace = Arrays.asList(ColorInterpretation.YCBCR_CB_BAND, ColorInterpretation.YCBCR_CR_BAND, ColorInterpretation.YCBCR_Y_BAND); |
63 | 63 |
public static final List<List<String>> ColorSpaces = Arrays.asList(RGBColorSpace, CMYKColorSpace, HSLColorSpace, YCBCRColorSpace); |
64 | 64 |
|
65 |
public static final int COLUMN_COLOR = 0; |
|
66 |
public static final int COLUMN_NODATA = 1; |
|
67 |
public static final int COLUMN_DATA_TYPE = 2; |
|
68 |
public static final int COLUMN_STORE_NAME = 3; |
|
69 |
public static final int COLUMN_BAND = 4; |
|
70 |
public static final int COLUMN_BAND_NAME = 5; |
|
71 |
public static final int COLUMN_STORE_FULL_NAME = 6; |
|
72 |
|
|
73 |
|
|
65 | 74 |
/** |
66 | 75 |
* |
67 | 76 |
*/ |
... | ... | |
83 | 92 |
public Object getValueAt(int rowIndex, int columnIndex) { |
84 | 93 |
RasterStoreBand rasterStoreBand = rasterStoreBands.get(rowIndex); |
85 | 94 |
switch (columnIndex) { |
86 |
case 0:
|
|
95 |
case COLUMN_COLOR:
|
|
87 | 96 |
return rasterStoreBand.getBandColorInterpretation(); |
88 |
case 1:
|
|
97 |
case COLUMN_NODATA:
|
|
89 | 98 |
return rasterStoreBand.getNoDataNumber(); |
90 |
case 2:
|
|
99 |
case COLUMN_DATA_TYPE:
|
|
91 | 100 |
return rasterStoreBand.getDataType(); |
92 |
case 3:
|
|
101 |
case COLUMN_STORE_NAME:
|
|
93 | 102 |
return rasterStoreBand.getStore().getName(); |
94 |
case 4:
|
|
103 |
case COLUMN_BAND:
|
|
95 | 104 |
return rasterStoreBand.getBand(); |
96 |
case 5:
|
|
105 |
case COLUMN_BAND_NAME:
|
|
97 | 106 |
return rasterStoreBand.getBandName(); |
98 |
case 6:
|
|
107 |
case COLUMN_STORE_FULL_NAME:
|
|
99 | 108 |
return rasterStoreBand.getStore().getFullName(); |
100 | 109 |
} |
101 | 110 |
return null; |
... | ... | |
105 | 114 |
public String getColumnName(int column) { |
106 | 115 |
I18nManager i18nManager = ToolsLocator.getI18nManager(); |
107 | 116 |
switch (column) { |
108 |
case 0:
|
|
117 |
case COLUMN_COLOR:
|
|
109 | 118 |
return i18nManager.getTranslation("_color"); |
110 |
case 1:
|
|
119 |
case COLUMN_NODATA:
|
|
111 | 120 |
return i18nManager.getTranslation("_nodata"); |
112 |
case 2:
|
|
121 |
case COLUMN_DATA_TYPE:
|
|
113 | 122 |
return i18nManager.getTranslation("_data_type"); |
114 |
case 3:
|
|
123 |
case COLUMN_STORE_NAME:
|
|
115 | 124 |
return i18nManager.getTranslation("_store_name"); |
116 |
case 4:
|
|
125 |
case COLUMN_BAND:
|
|
117 | 126 |
return i18nManager.getTranslation("_band"); |
118 |
case 5:
|
|
127 |
case COLUMN_BAND_NAME:
|
|
119 | 128 |
return i18nManager.getTranslation("_band_name"); |
120 |
case 6:
|
|
129 |
case COLUMN_STORE_FULL_NAME:
|
|
121 | 130 |
return i18nManager.getTranslation("_store_full_name"); |
122 | 131 |
|
123 | 132 |
} |
Also available in: Unified diff