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
|
(package private) EastNorth |
startEN
World position of the mouse when the user started the command.
|
nodes, oldStates
Constructor and Description |
---|
ScaleCommand(Collection<OsmPrimitive> objects,
EastNorth currentEN)
Creates a ScaleCommand.
|
Modifier and Type | Method and Description |
---|---|
Icon |
getDescriptionIcon()
Provides a descriptive icon of this command.
|
String |
getDescriptionText()
Provides a description text representing this command.
|
void |
handleEvent(EastNorth currentEN)
Compute new scaling factor and transform nodes accordingly.
|
protected void |
transformNodes()
Scale nodes.
|
executeCommand, fillModifiedData, flagNodesAsModified, getNodesCenter, getParticipatingPrimitives, getTransformedNodes, storeOldState, undoCommand
checkAndConfirmOutlyingOperation, getLayer, getOrig, invalidBecauselayerRemoved
getChildren
private double scalingFactor
public ScaleCommand(Collection<OsmPrimitive> objects, EastNorth currentEN)
public void handleEvent(EastNorth currentEN)
handleEvent
in class TransformNodesCommand
currentEN
- the current world position of the mouseprotected void transformNodes()
transformNodes
in class TransformNodesCommand
public String getDescriptionText()
PseudoCommand
getDescriptionText
in class TransformNodesCommand
public Icon getDescriptionIcon()
PseudoCommand
getDescriptionIcon
in class TransformNodesCommand