public void mouseWheelMoved(MouseWheelEvent event) { double u = event.getWheelRotation(); //double u = event.getPreciseWheelRotation(); // JDK 1.7 only Tile tile = (Tile)event.getSource(); DRectangle vr = tile.getViewRectangle(); if (event.isShiftDown() && vr.width<1.0) { // horizontal HScrollBar hsb = _hsb[tile.getColumnIndex()]; vr.x += u*hsb.getUnitIncrement(1)*SCROLL_SCL; vr.x = max(0.0,min(1.0-vr.width,vr.x)); tile.setViewRectangle(vr); } else if (!event.isShiftDown() && vr.height<1.0) { // vertical VScrollBar vsb = _vsb[tile.getRowIndex()]; vr.y += u*vsb.getUnitIncrement(1)*SCROLL_SCL; vr.y = max(0.0,min(1.0-vr.height,vr.y)); tile.setViewRectangle(vr); } } });
private boolean[] checkTileScales(final Tile tile) { final int jrow = tile.getRowIndex(); final int jcol = tile.getColumnIndex(); final AxisScale hscale = tile.getHScale(); final AxisScale vscale = tile.getVScale(); boolean hcompat = true; for (int irow=0; irow<_nrow; ++irow){ final Tile t = _tiles[irow][jcol]; hcompat &= t.getHScale()==hscale; } boolean vcompat = true; for (int icol=0; icol<_ncol; ++icol){ final Tile t = _tiles[jrow][icol]; vcompat &= t.getVScale()==vscale; } return new boolean[] { hcompat, vcompat }; }
tile.setViewRect(tr); int jrow = tile.getRowIndex(); int jcol = tile.getColumnIndex(); for (int irow=0; irow<_nrow; ++irow) { if (irow!=jrow) {
int jcol = tile.getColumnIndex(); int nrow = mosaic.countRows(); int ncol = mosaic.countColumns();
void alignProjectors(Tile tile) { int jrow = tile.getRowIndex(); int jcol = tile.getColumnIndex(); Projector bhp = tile.getBestHorizontalProjector(); if (bhp!=null) {