Projector hp = tile.getHorizontalProjector(); Projector vp = tile.getVerticalProjector(); DRectangle r = tile.getViewRectangle(); double ffsize = frame.getFont().getSize(); double fwidth = frame.getWidth();
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); } } });
void update() { DRectangle vr = tile.getViewRectangle(); if (getOrientation()==HORIZONTAL) { setV(vr.x); setE(vr.width); } else { setV(vr.y); setE(vr.height); } } private boolean _settingInternal;
if (irow!=jrow) { Tile ti = _tiles[irow][jcol]; DRectangle dr = ti.getViewRectangle(); dr.x = tr.x; dr.width = tr.width; if (icol!=jcol) { Tile ti = _tiles[jrow][icol]; DRectangle dr = ti.getViewRectangle(); dr.y = tr.y; dr.height = tr.height;
public void adjustmentValueChanged(AdjustmentEvent ae) { if (_settingInternal) return; DRectangle vr = tile.getViewRectangle(); if (getOrientation()==HORIZONTAL) { vr.x = getV(); vr.width = getE(); } else { vr.y = getV(); vr.height = getE(); } tile.setViewRectangle(vr); } });
int ymax = max(_ybegin,_ydraw); Transcaler ts = tile.getTranscaler(); DRectangle vr = tile.getViewRectangle();
DRectangle vr = tile.getViewRectangle(); int w = ts.width(vr.width); int h = ts.height(vr.height);