public class ScaleCommand extends TransformNodesCommand
Command.OldNodeState
Modifier and Type | Field and Description |
---|---|
private EastNorth |
pivot
Pivot point
|
private double |
scalingFactor
Current scaling factor applied
|
private EastNorth |
startEN
World position of the mouse when the user started the command.
|
nodes, oldStates
IS_INCOMPLETE, IS_OK, IS_OUTSIDE
Constructor and Description |
---|
ScaleCommand(java.util.Collection<? extends OsmPrimitive> objects,
EastNorth currentEN)
Creates a ScaleCommand.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getDescriptionText()
Provides a description text representing this command.
|
void |
handleEvent(EastNorth currentEN)
Compute new scaling factor and transform nodes accordingly.
|
int |
hashCode() |
protected void |
setScalingFactor(double scalingFactor)
Set the scaling factor
|
protected void |
transformNodes()
Scale nodes.
|
executeCommand, fillModifiedData, flagNodesAsModified, getDescriptionIcon, getNodesCenter, getParticipatingPrimitives, getTransformedNodes, storeOldState, undoCommand
checkAndConfirmOutlyingOperation, checkOutlyingOrIncompleteOperation, getAffectedDataSet, getLayer, getOrig, invalidateAffectedLayers, invalidBecauselayerRemoved
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
getChildren
private double scalingFactor
public ScaleCommand(java.util.Collection<? extends OsmPrimitive> objects, EastNorth currentEN)
objects
- objects to fetch nodes fromcurrentEN
- cuurent eats/northpublic final void handleEvent(EastNorth currentEN)
handleEvent
in class TransformNodesCommand
currentEN
- the current world position of the mouseprotected void setScalingFactor(double scalingFactor)
scalingFactor
- The scaling factor.protected void transformNodes()
transformNodes
in class TransformNodesCommand
public java.lang.String getDescriptionText()
PseudoCommand
getDescriptionText
in interface PseudoCommand
getDescriptionText
in class TransformNodesCommand
public int hashCode()
hashCode
in class TransformNodesCommand
public boolean equals(java.lang.Object obj)
equals
in class TransformNodesCommand