private void updateScanLineValues() { final ProductData.UTC utcStartTime = currentProduct.getStartTime(); final ProductData.UTC utcEndTime = currentProduct.getEndTime(); if (utcStartTime == null || utcEndTime == null || !isSampleValueAvailable(0, levelZeroY, true)) { scanlineModel.updateValue("No date information", 0); scanlineModel.updateValue("No time information", 1); } else { final float pY = levelZeroY + pixelInfoView.getPixelOffsetY(); final ProductData.UTC utcCurrentLine = ProductUtils.getScanLineTime(currentProduct, pY); final Calendar currentLineTime = utcCurrentLine.getAsCalendar(); final String dateString = String.format("%1$tF", currentLineTime); final String timeString = String.format("%1$tI:%1$tM:%1$tS:%1$tL %1$Tp", currentLineTime); scanlineModel.updateValue(dateString, 0); scanlineModel.updateValue(timeString, 1); } }
private void updateBandPixelValues() { Band[] bands = currentProduct.getBands(); int rowIndex = 0; for (final Band band : bands) { if (shouldDisplayBand(band)) { bandModel.updateValue(getPixelString(band), rowIndex); rowIndex++; } } }
private void updateTiePointGridPixelValues() { final int numTiePointGrids = currentProduct.getNumTiePointGrids(); int rowIndex = 0; for (int i = 0; i < numTiePointGrids; i++) { final TiePointGrid grid = currentProduct.getTiePointGridAt(i); tiePointModel.updateValue(grid.getPixelString(levelZeroX, levelZeroY), rowIndex); rowIndex++; } }
geolocModel.updateValue(tix, 0); geolocModel.updateValue(tiy, 1); if (geoCoding != null) { geolocModel.updateValue(tgx, 2); geolocModel.updateValue(tgy, 3); if (geoCoding instanceof MapGeoCoding || geoCoding instanceof CrsGeoCoding) { geolocModel.updateValue(tmx, 4); geolocModel.updateValue(tmy, 5);
private void updateFlagPixelValues() { final boolean available = isSampleValueAvailable(levelZeroX, levelZeroY, _pixelPosValid); if (flagModel.getRowCount() != getFlagRowCount()) { resetFlagTableModel(); } int rowIndex = 0; for (Band band : currentFlagBands) { long pixelValue = available ? ProductUtils.getGeophysicalSampleLong(band, _pixelX, _pixelY, _level) : 0; for (int j = 0; j < band.getFlagCoding().getNumAttributes(); j++) { if (available) { MetadataAttribute attribute = band.getFlagCoding().getAttributeAt(j); int mask = attribute.getData().getElemInt(); flagModel.updateValue(String.valueOf((pixelValue & mask) == mask), rowIndex); } else { flagModel.updateValue(_INVALID_POS_TEXT, rowIndex); } rowIndex++; } } }