void buildPropertiesPane(RenderedImage source) { HTMLBuilder hb = new HTMLBuilder(); hb.title("Properties"); String[] properties = source.getPropertyNames(); if (properties == null) { propertiesPanel.setText("No properties found in this image"); return; } Arrays.sort(properties); for (String propName : properties) { hb.dataLine(propName, source.getProperty(propName)); } propertiesPanel.setText(hb.getHtml()); operationPanel.setCaretPosition(0); }
public void dataLine(String label, Object value) { sb.append("<b>").append(label).append(":</b> ").append(render(value)).append("<br>"); }
void buildPropertiesPane(RenderedImage source) { HTMLBuilder hb = new HTMLBuilder(); hb.title("Properties"); String[] properties = source.getPropertyNames(); if (properties == null) { propertiesPanel.setText("No properties found in this image"); return; } Arrays.sort(properties); for (String propName : properties) { hb.dataLine(propName, source.getProperty(propName)); } propertiesPanel.setText(hb.getHtml()); operationPanel.setCaretPosition(0); }
public void dataLine(String label, Object value) { sb.append("<b>").append(label).append(":</b> ").append(render(value)).append("<br>"); }
void buildOpPane(RenderedOp image) final HTMLBuilder hb = new HTMLBuilder(); hb.title("Operation"); hb.dataLine("Name", image.getOperationName() + " (" + renderingName + ')'); hb.title("Parameters"); hb.dataLine(name, paramValues.get(i)); hb.title("Hints"); hb.dataLine(label, hints.get(key)); operationPanel.setText(hb.getHtml());
public String render(Object o) { int length = Array.getLength(o); StringBuilder sb = new StringBuilder(); sb.append('['); for (int i = 0; i < length; i++) { sb.append(HTMLBuilder.render(Array.get(o, i))); if (i < (length - 1)) { sb.append(", "); } else { sb.append(']'); } } return sb.toString(); }
void buildOpPane(RenderedOp image) final HTMLBuilder hb = new HTMLBuilder(); hb.title("Operation"); hb.dataLine("Name", image.getOperationName() + " (" + renderingName + ')'); hb.title("Parameters"); hb.dataLine(name, paramValues.get(i)); hb.title("Hints"); hb.dataLine(label, hints.get(key)); operationPanel.setText(hb.getHtml());
public String render(Object o) { int length = Array.getLength(o); StringBuilder sb = new StringBuilder(); sb.append('['); for (int i = 0; i < length; i++) { sb.append(HTMLBuilder.render(Array.get(o, i))); if (i < (length - 1)) { sb.append(", "); } else { sb.append(']'); } } return sb.toString(); }
HTMLBuilder hb = new HTMLBuilder(); hb.title("Abstract"); hb.dataLine("Name", getImageName(image)); hb.dataLine("Image class", image.getClass()); hb.dataLine("Image origin", image.getMinX() + " , " + image.getMinY()); hb.dataLine("Image size", image.getWidth() + " x " + image.getHeight()); hb.title("Tiles organisation"); int ytc = image.getNumYTiles(); int xtc = image.getNumXTiles(); hb.dataLine("Tile size", tw + " x " + th); hb.dataLine("Tile grid", xtc + " x " + ytc + // " (" + (tw * xtc) + " x " + (th * ytc) + ')'); hb.dataLine("Tile offsets x,y", image.getTileGridXOffset() + ", " + image.getTileGridYOffset()); hb.dataLine("Min tile x,y", image.getMinTileX() + ", " + image.getMinTileY()); hb.title("Sample model"); hb.dataLine("Sample model", sm.getClass()); hb.dataLine("Size", sm.getWidth() + " x " + sm.getHeight()); hb.dataLine("Bands", sm.getNumBands()); hb.dataLine("Bands", TYPE_MAP.get(sm.getDataType())); hb.title("Color model"); final ColorModel colorModel = image.getColorModel(); if (colorModel != null) {
public String render(Object o) { ImageReadParam param = (ImageReadParam) o; StringBuilder sb = new StringBuilder(); sb.append('[').append(o.getClass().toString()).append("\n"); int ssx = param.getSourceXSubsampling(); int ssy = param.getSourceYSubsampling(); Rectangle rect = param.getSourceRegion(); Point p = param.getDestinationOffset(); int[] bands = param.getSourceBands(); if (rect != null) { sb.append(String.format( " SourceRegion(Rectangle)[x:%d, y:%d, width:%d, height:%d]\n", rect.x, rect.y, rect.width, rect.height)); } sb.append(String.format(" SourceSubsampling[ssx:%d, ssy:%d]\n", ssx, ssy)); if (bands != null) { sb.append(" SourceBands[").append(HTMLBuilder.render(bands)).append("]\n"); } if (p != null) { sb.append(String.format(" DestinationOffset(Point)[x:%d, y:%d]", p.x, p.y)); } sb.append("]"); return sb.toString(); }
HTMLBuilder hb = new HTMLBuilder(); hb.title("Abstract"); hb.dataLine("Name", getImageName(image)); hb.dataLine("Image class", image.getClass()); hb.dataLine("Image origin", image.getMinX() + " , " + image.getMinY()); hb.dataLine("Image size", image.getWidth() + " x " + image.getHeight()); hb.title("Tiles organisation"); int ytc = image.getNumYTiles(); int xtc = image.getNumXTiles(); hb.dataLine("Tile size", tw + " x " + th); hb.dataLine("Tile grid", xtc + " x " + ytc + // " (" + (tw * xtc) + " x " + (th * ytc) + ')'); hb.dataLine("Tile offsets x,y", image.getTileGridXOffset() + ", " + image.getTileGridYOffset()); hb.dataLine("Min tile x,y", image.getMinTileX() + ", " + image.getMinTileY()); hb.title("Sample model"); hb.dataLine("Sample model", sm.getClass()); hb.dataLine("Size", sm.getWidth() + " x " + sm.getHeight()); hb.dataLine("Bands", sm.getNumBands()); hb.dataLine("Bands", TYPE_MAP.get(sm.getDataType())); hb.title("Color model"); final ColorModel colorModel = image.getColorModel(); if (colorModel != null) {
public String render(Object o) { ImageReadParam param = (ImageReadParam) o; StringBuilder sb = new StringBuilder(); sb.append('[').append(o.getClass().toString()).append("\n"); int ssx = param.getSourceXSubsampling(); int ssy = param.getSourceYSubsampling(); Rectangle rect = param.getSourceRegion(); Point p = param.getDestinationOffset(); int[] bands = param.getSourceBands(); if (rect != null) { sb.append(String.format( " SourceRegion(Rectangle)[x:%d, y:%d, width:%d, height:%d]\n", rect.x, rect.y, rect.width, rect.height)); } sb.append(String.format(" SourceSubsampling[ssx:%d, ssy:%d]\n", ssx, ssy)); if (bands != null) { sb.append(" SourceBands[").append(HTMLBuilder.render(bands)).append("]\n"); } if (p != null) { sb.append(String.format(" DestinationOffset(Point)[x:%d, y:%d]", p.x, p.y)); } sb.append("]"); return sb.toString(); }