snap
to raster and multilevel raster scales.public class TLcdGXYCenterRasterController extends ALcdGXYSmartController
ILcdView
on an instance of ILcdRaster
.
The ILcdRaster
which contains the location of the MouseEvent
on the ILcdView
,
is the one on which to center. The location of the MouseEvent
will be the new center of the view.
If no raster contains the location, the last ILcdRaster
instance
will be centered upon.
In case of a ILcdMultilevelRaster
the second of its ILcdRaster
instances is considered.
Resulting from the center operation, the scale of the ILcdGXYView
is such that the
raster is depicted with a resolution of one. That is
one pixel of the original image that the tile represents corresponds to one screen pixel.
If necessary, the scale is clamped to lie within the scale range of the
ILcdGXYLayer
.
Constructor and Description |
---|
TLcdGXYCenterRasterController()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
protected void |
centerRaster(ILcdRaster aRaster,
ILcdModelXYWorldTransformation aMWT,
ILcdGXYLayer aGXYLayer,
ILcdGXYView aGXYView,
MouseEvent aMouseEvent)
Deprecated.
This method will center aRaster in aGXYView.
|
protected void |
centerRaster(MouseEvent aMouseEvent)
Deprecated.
|
protected boolean |
containsValidRaster(ILcdGXYLayer aGXYLayer,
ILcdPoint aModelPoint)
Deprecated.
|
void |
mouseClicked(MouseEvent e)
Deprecated.
This method doesn't perform any operation.
|
void |
mouseEntered(MouseEvent e)
Deprecated.
This method doesn't perform any operation.
|
void |
mouseExited(MouseEvent e)
Deprecated.
This method doesn't perform any operation.
|
void |
mousePressed(MouseEvent e)
Deprecated.
This method doesn't perform any operation.
|
void |
mouseReleased(MouseEvent e)
Deprecated.
This method triggers the centering of the view on a raster (see description above).
|
protected ILcdGXYLayer |
retrieveGXYLayer(ILcdGXYView aGXYView,
MouseEvent aMouseEvent)
Deprecated.
Retrieves the first
ILcdGXYLayer within the given ILcdGXYView
which model has an ILcdModelDescriptor that is a TLcdRasterModelDescriptor
or TLcdMultilevelRasterModelDescriptor and which contains the location of mouse event. |
protected ILcdRaster |
retrieveRaster(ILcdGXYLayer aGXYLayer,
ILcdPoint aModelPoint)
Deprecated.
This method returns the first instance of
ILcdRaster of the ILcdModel of
the given ILcdGXYLayer that contains the given ILcdPoint . |
addUndoableListener, doPanGXYView, doZoomGXYView, fireUndoableEvent, getDownPanChars, getDownPanCodes, getLeftPanChars, getLeftPanCodes, getPanAbsDelta, getPanAbsDelta, getRightPanChars, getRightPanCodes, getUndoableListenerCount, getUpPanChars, getUpPanCodes, getZoomInChars, getZoomInCodes, getZoomOutChars, getZoomOutCodes, isDragging, isPanOnMouseDragExit, isPanOnMouseMoveExit, isPanUndoable, isRequestFocusOnMouseEntered, isRequestFocusOnMousePressed, isTraceOn, isZoomUndoable, keyPressed, keyReleased, keyTyped, mouseDragged, mouseMoved, removeUndoableListener, setDownPanChars, setDownPanCodes, setIsDragging, setLeftPanChars, setLeftPanCodes, setPanAbsDelta, setPanOnMouseDragExit, setPanOnMouseMoveExit, setPanUndoable, setRequestFocusOnMouseEntered, setRequestFocusOnMousePressed, setRightPanChars, setRightPanCodes, setTraceOn, setUpPanChars, setUpPanCodes, setZoomInChars, setZoomInCodes, setZoomOutChars, setZoomOutCodes, setZoomUndoable, startInteraction, terminateInteraction, updateViewLocationAfterZoomSFCT
addStatusListener, asGXYController, fireStatusEvent, getCursor, getGXYView, getIcon, getName, getShortDescription, paint, registerInstance, removeStatusListener, retrieveGXYViewXYWorldTransformation, setClassTraceOn, setCursor, setGXYView, setIcon, setName, setShortDescription, viewRepaint
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getLayered
protected ILcdGXYLayer retrieveGXYLayer(ILcdGXYView aGXYView, MouseEvent aMouseEvent)
ILcdGXYLayer
within the given ILcdGXYView
which model has an ILcdModelDescriptor
that is a TLcdRasterModelDescriptor
or TLcdMultilevelRasterModelDescriptor
and which contains the location of mouse event.
If no layer contains the the location of the mouse event, the topmost raster layer is returned.
If no raster layers exists, null is returned.protected ILcdRaster retrieveRaster(ILcdGXYLayer aGXYLayer, ILcdPoint aModelPoint)
ILcdRaster
of the ILcdModel
of
the given ILcdGXYLayer
that contains the given ILcdPoint
.
In case of an ILcdMultilevelRaster
the second of its ILcdRaster
instances is chosen.
If aModelPoint is null, the last encountered single level raster is returned. If the
layer doesn't contain such a raster, the raster at the second level of the last
encountered multilevel raster is returned.protected boolean containsValidRaster(ILcdGXYLayer aGXYLayer, ILcdPoint aModelPoint)
protected void centerRaster(MouseEvent aMouseEvent)
TLcdGXYCenterRasterController
protected void centerRaster(ILcdRaster aRaster, ILcdModelXYWorldTransformation aMWT, ILcdGXYLayer aGXYLayer, ILcdGXYView aGXYView, MouseEvent aMouseEvent)
ILcdRaster
is represented
in the given ILcdGXYLayer
which is drawn in the ILcdGXYView
.
If the location of the MouseEvent is within the raster, the raster is center on that point, else
the middle of the raster will be the central point in the view.public void mouseClicked(MouseEvent e)
mouseClicked
in interface MouseListener
mouseClicked
in class ALcdGXYSmartController
public void mousePressed(MouseEvent e)
mousePressed
in interface MouseListener
mousePressed
in class ALcdGXYSmartController
public void mouseReleased(MouseEvent e)
mouseReleased
in interface MouseListener
mouseReleased
in class ALcdGXYSmartController
public void mouseEntered(MouseEvent e)
mouseEntered
in interface MouseListener
mouseEntered
in class ALcdGXYSmartController
public void mouseExited(MouseEvent e)
mouseExited
in interface MouseListener
mouseExited
in class ALcdGXYSmartController