net.sf.latexdraw.mapping
Class Unit2ScaleRuler
java.lang.Object
org.malai.mapping.Object2ObjectMapping<IUnary<ScaleRuler.Unit>,ScaleRuler>
net.sf.latexdraw.mapping.Unit2ScaleRuler
- All Implemented Interfaces:
- IMapping
public class Unit2ScaleRuler
- extends Object2ObjectMapping<IUnary<ScaleRuler.Unit>,ScaleRuler>
Creates a mapping between the unit value and a scale ruler.
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.
11/13/2010
- Since:
- 3.0
- Author:
- Arnaud BLOUIN
Method Summary |
void |
onObjectModified(java.lang.Object object)
Executes the mapping for the modification of an object. |
void |
onObjectReplaced(IUnary<?> object,
java.lang.Object replacedObject)
Executes the mapping when an object has been replaced by an other one. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Unit2ScaleRuler
public Unit2ScaleRuler(IUnary<ScaleRuler.Unit> source,
ScaleRuler target)
- Creates the mapping.
- Parameters:
source
- The unit value.target
- The scale ruler to update.
- Throws:
java.lang.IllegalArgumentException
- If one of the given arguments is null or if they are the same object.- Since:
- 3.0
onObjectReplaced
public void onObjectReplaced(IUnary<?> object,
java.lang.Object replacedObject)
- Description copied from interface:
IMapping
- Executes the mapping when an object has been replaced by an other one.
- Specified by:
onObjectReplaced
in interface IMapping
- Overrides:
onObjectReplaced
in class Object2ObjectMapping<IUnary<ScaleRuler.Unit>,ScaleRuler>
- Parameters:
object
- The singleton that contains the new object.replacedObject
- The old object contained in the singleton that has been replaced.
onObjectModified
public void onObjectModified(java.lang.Object object)
- Description copied from interface:
IMapping
- Executes the mapping for the modification of an object.
- Parameters:
object
- The modified object.