public void addPicture(String url, int rh, int firsty, List<field> fields, int column, int row) { // int firstx = fields.get(0).getXcoord(); // int xwidth = fields.get(0).getWidth(); // // // comp = new ImageComponent(url, rh, firsty, firstx, xwidth); // add(comp, BorderLayout.CENTER); // //add(slider, BorderLayout.SOUTH); // revalidate(); int x = fields.get(column - 1).getXcoord(); int xwidth = fields.get(column - 1).getWidth(); int y = firsty + (rh * row); comp = new ImageComponent(url, rh, y, x, xwidth, bs); if (!bs.highlight) { comp.updateHighlight(x, y, 0, 0); } comp.setScale(bs.getScale()); add(comp); revalidate(); }
public void InvertPicture( String url, int rh, int firsty, List<field> fields, int column, int row, RescaleOp op) { int x = fields.get(column - 1).getXcoord(); int xwidth = fields.get(column - 1).getWidth(); int y = firsty + (rh * row); this.remove(comp); // System.out.print("inverting..."); comp = new ImageComponent(url, rh, y, x, xwidth, bs, op); comp.setScale(bs.getScale()); add(comp); revalidate(); }