net.sf.latexdraw.instruments
Class Zoomer

java.lang.Object
  extended by org.malai.instrument.Instrument
      extended by net.sf.latexdraw.instruments.Zoomer
All Implemented Interfaces:
ActionHandler, Preferenciable, Modifiable, Reinitialisable, UndoHandler

public class Zoomer
extends Instrument

This instrument allows to zoom on the canvas.

This file is part of LaTeXDraw
Copyright (c) 2005-2012 Arnaud BLOUIN

LaTeXDraw is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

LaTeXDraw is distributed without any warranty; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

05/20/10

Version:
3.0
Author:
Arnaud BLOUIN

Field Summary
protected  Zoomable zoomable
          The canvas to zoom in/out.
protected  MButton zoomDefaultButton
          This button allows to set the default zoom level.
protected  MSpinner zoomSpinner
          The spinner that helps to change the zoom.
 
Fields inherited from class org.malai.instrument.Instrument
activated, eventables, links, modified
 
Constructor Summary
Zoomer(Zoomable zoomable)
          Creates and initialises the zoomer.
 
Method Summary
 MButton getZoomDefaultButton()
           
 MSpinner getZoomSpinner()
           
protected  void initialiseLinks()
          Initialises the links of the instrument.
 void interimFeedback()
          Reinitialises the interim feedback of the instrument.
 void reinit()
          Reinitialises the object.
 void setActivated(boolean activated)
          Activates or deactivates the instrument.
 
Methods inherited from class org.malai.instrument.Instrument
addEventable, addLink, clearEvents, getLinks, getSizeLinks, hasLinks, isActivated, isModified, load, onActionAborted, onActionAdded, onActionCancelled, onActionDone, onActionExecuted, onUndoableAdded, onUndoableRedo, onUndoableUndo, removeLink, save, setModified
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

zoomSpinner

protected MSpinner zoomSpinner
The spinner that helps to change the zoom.


zoomDefaultButton

protected MButton zoomDefaultButton
This button allows to set the default zoom level.


zoomable

protected Zoomable zoomable
The canvas to zoom in/out.

Constructor Detail

Zoomer

public Zoomer(Zoomable zoomable)
Creates and initialises the zoomer.

Parameters:
zoomable - The zoomable object to zoom in/out.
Throws:
java.lang.IllegalArgumentException - If the given canvas is null;
Since:
3.0
Method Detail

reinit

public void reinit()
Description copied from interface: Reinitialisable
Reinitialises the object.

Specified by:
reinit in interface Reinitialisable
Overrides:
reinit in class Instrument

initialiseLinks

protected void initialiseLinks()
Description copied from class: Instrument
Initialises the links of the instrument.

Specified by:
initialiseLinks in class Instrument

interimFeedback

public void interimFeedback()
Description copied from class: Instrument
Reinitialises the interim feedback of the instrument. Must be overridden.

Overrides:
interimFeedback in class Instrument

getZoomDefaultButton

public MButton getZoomDefaultButton()
Returns:
The button that sets the zoom to its default value.
Since:
3.0

getZoomSpinner

public MSpinner getZoomSpinner()
Returns:
The spinner that modifies the zoom level.
Since:
3.0

setActivated

public void setActivated(boolean activated)
Description copied from class: Instrument
Activates or deactivates the instrument.

Overrides:
setActivated in class Instrument
Parameters:
activated - True = activation.