/** * Sets default limits for the vertical axis. This method may be used * to restore default limits after they have been set explicitly. */ public void setVLimitsDefault() { _svp=null; alignProjectors(); }
/** * Sets default limits for the horizontal axis. This method may be used * to restore default limits after they have been set explicitly. */ public void setHLimitsDefault() { _shp=null; alignProjectors(); }
/** * Sets default limits for horizontal and vertical axes. This method may * be used to restore default limits after they have been set explicitly. */ public void setLimitsDefault() { _svp=null; _shp=null; alignProjectors(); }
/** * Sets the best vertical projector for this tile. If null, this * tile will compute its best vertical projector by merging those * of its tiled views. If not null, the specified projector is best. * In either case, this tile's vertical projector may be adjusted by * it's mosaic during alignment with other tiles in the same row. * @param bvp the best vertical projector. */ @Deprecated public void setBestVerticalProjector(Projector bvp) { _svp = bvp; alignProjectors(); }
/** * Sets the best horizontal projector for this tile. If null, this * tile will compute its best horizontal projector by merging those * of its tiled views. If not null, the specified projector is best. * In either case, this tile's horizontal projector may be adjusted by * it's mosaic during alignment with other tiles in the same column. * @param bhp the best horizontal projector. */ @Deprecated public void setBestHorizontalProjector(Projector bhp) { _shp = bhp; alignProjectors(); }
/** * Adds the specified tiled view to this tile. If the tiled view is * already in this tile, it is first removed, before adding it again. * @param tv the tiled view. * @return true, if this tile did not already contain the specified * tiled view; false, otherwise. */ public boolean addTiledView(TiledView tv) { boolean removed = _tvs.remove(tv); _tvs.add(tv); tv.setTile(this); alignProjectors(); return !removed; }
/** * Removes the specified tiled view from this tile. If the tiled view * is not in this tile, this method does nothing. * @param tv the tiled view. * @return true, if this tile contained the specified tiled view; * false, otherwise. */ public boolean removeTiledView(TiledView tv) { if (_tvs.remove(tv)) { tv.setTile(null); alignProjectors(); return true; } return false; }
/** * Called by this tile or by a tiled view when this tile needs alignment. */ void alignProjectors() { alignProjectors(_hp.getScale(),_vp.getScale()); }
/** * Sets limits for the horizontal axis. * By default, limits are computed automatically by tiled graphical views. * This method can be used to override those default limits. * @param hmin the minimum value. * @param hmax the maximum value. */ public void setHLimits(double hmin, double hmax) { Check.argument(hmin<hmax,"hmin<hmax"); if(_bhp!=null &&_bhp.isLog()) Check.argument(hmin>0,"hmin>0 for LOG scales"); _shp = new Projector(hmin,hmax); alignProjectors(); }
/** * Sets limits for the vertical axis. * By default, limits are computed automatically by tiled graphical views. * This method can be used to override those default limits. * @param vmin the minimum value. * @param vmax the maximum value. */ public void setVLimits(double vmin, double vmax) { Check.argument(vmin<vmax,"vmin<vmax"); if(_bvp!=null && _bvp.isLog()) Check.argument(vmin>0,"vmin>0 for LOG scales"); if(_bvp.v0()<_bvp.v1()) _svp = new Projector(vmin,vmax); else _svp = new Projector(vmax,vmin); alignProjectors(); }
/** * Sets the best projectors for this tiled view. Classes that extend * this class call this method when their best projectors change. * @param bhp a horizontal projector. * @param bvp a vertical projector. */ protected void setBestProjectors(Projector bhp, Projector bvp) { if (!equal(_bhp,bhp) || !equal(_bvp,bvp)) { _bhp = (bhp!=null)?new Projector(bhp):null; _bvp = (bvp!=null)?new Projector(bvp):null; // protect against setting unsupported TiledViews to non-linear scales if(setScales(bhp.getScale(),bvp.getScale())==null){ _bhp.setScale(AxisScale.LINEAR); _bvp.setScale(AxisScale.LINEAR); } if (_tile!=null) _tile.alignProjectors(_bhp.getScale(),_bvp.getScale()); } }