xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From BUFFET Philippe <philippe.buf...@airbus.com>
Subject RE: Interactors
Date Fri, 03 Oct 2003 09:45:13 GMT
You can try this  :
private void zoomInButtonActionPerformed(ActionEvent evt) {
     * An interactor to perform a zoom.
     * <p>Binding: BUTTON1</p>
    protected Interactor zoomInteractor = new AbstractZoomInteractor() {
        public boolean startInteraction(InputEvent ie) {
            int mods = ie.getModifiers();
                ie.getID() == MouseEvent.MOUSE_PRESSED;
It works but perhaps there is a better way to do this.
But you will have to clear all interactors if you want to stop this
(You can also use the ActionMap to perform a zoom in...)
hope this helps

-----Message d'origine-----
De : Jamie [mailto:jamie.browning@exponent.co.uk]
Envoyé : vendredi 3 octobre 2003 11:23
À : Batik Users
Objet : Interactors

Forgive me for yet again asking this question: Interactors - what and how?
Specifically, I am constructing a UI with JSVGCanvas as my main component. I
have a button on the toolbar which I want to use as a 'Zoom In'. When the
user fires the event ...
private void zoomInButtonActionPerformed(ActionEvent evt) {
    // telll Interactor to Zoom In ??
Am I wrong in assuming that interactors can be called like this. Or do I
'manually' set the viewbox/currentTransform. I vaguely understand that
Interactors are there and work just from the fact I can use the mouse and
CTRL keys to perform actions.
I noted that the Batik guys were giving a presentation at SVG Open 2003
where they explained the use of Interactors. I can view the abstarct but the
presentation does not seem to be available. Is it available? This would be
most useful to me ;-). The documentation (website/API) is relatively sketchy
for an 'absolute beginner'.

View raw message