Wiki :
XSelectionZoom
Sitemap
Contact Us
RSS
HomePage
::
Categories
::
PageIndex
::
RecentChanges
::
RecentlyCommented
::
Login/Register
XSelectionZoom
class com.xoetrope.svg.
XSelectionZoom
Used for zooming to a region in an SVG image by selecting the region using the 'CTRL' key in conjunction with the mouse.
1. Example
public
class
Welcome
extends
XPage
{
protected
XSvgImageMap svgImage;
public
void
pageCreated
(
)
{
svgImage =
(
XSvgImageMap
)
findComponent
(
"imageMap"
)
;
svgImage.
setURL
(
ClassLoader
.
getSystemResource
(
"images/image1.svg"
)
)
;
XSelectionZoom zoomSelection =
new
XSelectionZoom
(
svgImage
)
;
}
}
The above example shows how the
XSelectionZoom
component can be added to an application.
2. Constructor
public
XSelectionZoom
(
XSvgImageMap iMap
)
Creates a new instance of
XSelectionZoom
taking the
XSvgImageMap
instance that will be zoomed as a parameter.
3. Methods
1. mousePressed
public
void
mousePressed
(
MouseEvent
e
)
Initiates the zooming when the mouse is pressed in conjumction with the 'CTRL' key by displaying a box over the image, this box is used to select the region of the image that will be zoomed.
2. mouseDragged
public
void
mouseDragged
(
MouseEvent
e
)
Used to modify the width and height of the selection box using the mouse.
3. mouseReleased
public
void
mouseReleased
(
MouseEvent
e
)
Once the mouse is released the selected area is enlarged to fill the
XSvgImageMap
instance being used.
There are no comments on this page. [
Add comment
]
Page was generated in 0.5168 seconds
There are no comments on this page. [Add comment]