public abstract class FixedSizeLens extends Lens
Modifier and Type | Field and Description |
---|---|
static short |
CONSTANT |
protected int |
LR1 |
protected int |
LR2 |
static short |
SPEED_DEPENDENT_LINEAR |
h, lensHeight, lensWidth, lx, ly, magnifiedGraphics, mbh, mbi, mbw, MM, MM_FLOOR, mSwitchThreshold, owningView, sh, sw, w
Constructor and Description |
---|
FixedSizeLens() |
Modifier and Type | Method and Description |
---|---|
void |
drawBoundary(Graphics2D g2d)
for internal use
|
float |
getActualRingRadius() |
int |
getInnerRadius()
get the lens' inner radius (beyond which maximum magnification is applied - inward)
|
Color |
getInnerRadiusColor()
Get the color used to draw the lens' inner radius.
|
int |
getOuterRadius()
get the lens' outer radius (beyond which no magnification is applied - outward)
|
Color |
getOuterRadiusColor()
Get the color used to draw the lens' outer radius.
|
int |
getRadius()
outer radius
|
double[] |
getVisibleRegionInFocus(Camera c,
double[] res)
returns bounds of rectangle representing virtual space's region seen through focus of lens and camera c [west,north,east,south]
|
void |
moveLensBy(int dx,
int dy,
long currentTime) |
void |
setAbsolutePosition(int ax,
int ay)
set the position of the lens inside the view
|
void |
setFocusControlled(boolean isFocusControlled) |
void |
setFocusControlled(boolean isFocusControlled,
short speedBehavior) |
void |
setInnerRadius(int r)
set the lens' inner radius (beyond which maximum magnification is applied - inward)
|
void |
setInnerRadiusColor(Color c)
Set the color used to draw the lens' inner radius (default is black).
|
void |
setLensBuffer(ViewPanel p)
Should not be called directly ; used to update buffer image caracteristics when lens outer radius changes
|
void |
setMMandRadii(float mm,
int outerRadius,
int innerRadius)
set the lens' radii and maximum magnification
|
void |
setMMandRadii(float mm,
int outerRadius,
int innerRadius,
boolean forceRaster)
set the lens' radii and maximum magnification
|
void |
setOuterRadius(int r)
set the lens' outer radius (beyond which no magnification is applied - outward)
|
void |
setOuterRadiusColor(Color c)
Set the color used to draw the lens' outer radius (default is black).
|
void |
setRadii(int outerRadius,
int innerRadius)
set the lens' radii
|
void |
setRadii(int outerRadius,
int innerRadius,
boolean forceRaster)
set the lens' radii
|
dispose, getActualMaximumMagnification, getBufferThreshold, getMagnificationGraphics, getMaximumMagnification, getOwningView, getVisibleRegion, getXfocusOffset, getYfocusOffset, gf, isInitialized, resetMagnificationBuffer, setBufferThreshold, setMagRasterDimensions, setMagRasterDimensions, setMaximumMagnification, setMaximumMagnification, setXfocusOffset, setYfocusOffset, transform
protected int LR1
protected int LR2
public static short CONSTANT
public static short SPEED_DEPENDENT_LINEAR
public void setOuterRadius(int r)
r
- radius in pixelspublic void setInnerRadius(int r)
r
- radius in pixelspublic void setRadii(int outerRadius, int innerRadius)
outerRadius
- outer radius (beyond which no magnification is applied - outward)innerRadius
- inner radius (beyond which maximum magnification is applied - inward)public void setRadii(int outerRadius, int innerRadius, boolean forceRaster)
outerRadius
- outer radius (beyond which no magnification is applied - outward)innerRadius
- inner radius (beyond which maximum magnification is applied - inward)forceRaster
- true if the magnification raster size should be updated according to the new maximum magnification factor (default is true)public void setMMandRadii(float mm, int outerRadius, int innerRadius)
mm
- maximum magnification factor, mm in [0,+inf[outerRadius
- outer radius (beyond which no magnification is applied - outward)innerRadius
- inner radius (beyond which maximum magnification is applied - inward)public void setMMandRadii(float mm, int outerRadius, int innerRadius, boolean forceRaster)
mm
- maximum magnification factor, mm in [0,+inf[outerRadius
- outer radius (beyond which no magnification is applied - outward)innerRadius
- inner radius (beyond which maximum magnification is applied - inward)forceRaster
- true if the magnification raster size should be updated according to the new maximum magnification factor (default is true)public int getOuterRadius()
public int getRadius()
Lens
public int getInnerRadius()
public float getActualRingRadius()
public void setLensBuffer(ViewPanel p)
setLensBuffer
in class Lens
public void setAbsolutePosition(int ax, int ay)
setAbsolutePosition
in class Lens
ax
- lens's center horizontal coordinate expressed as an absolute position within the view (JPanel coordinate system)ay
- lens's center vertical coordinate expressed as an absolute position within the view (JPanel coordinate system)public void setFocusControlled(boolean isFocusControlled, short speedBehavior)
setFocusControlled
in class Lens
public void setFocusControlled(boolean isFocusControlled)
setFocusControlled
in class Lens
public void moveLensBy(int dx, int dy, long currentTime)
moveLensBy
in class Lens
public void setInnerRadiusColor(Color c)
c
- color of the boundary (set to null if you do not want to draw that border)public void setOuterRadiusColor(Color c)
c
- color of the boundary (set to null if you do not want to draw that border)public Color getInnerRadiusColor()
public Color getOuterRadiusColor()
public void drawBoundary(Graphics2D g2d)
drawBoundary
in class Lens
public double[] getVisibleRegionInFocus(Camera c, double[] res)
c
- camerares
- array which will contain the resultCopyright © 2000-2002 Xerox Corporation. All Rights Reserved
Copyright © 2003 World Wide Web Consortium. All Rights Reserved
Copyright © 2004-2015 INRIA. All Rights Reserved
Licensed under the GNU LGPL. For full terms see the file COPYING.