public class RotateCommand extends TransformNodesCommand
Command.OldNodeState
Modifier and Type | Field and Description |
---|---|
private EastNorth |
pivot
Pivot point
|
private double |
rotationAngle
computed rotation angle between starting click and current mouse pos
|
private double |
startAngle
angle of rotation starting click to pivot
|
nodes, oldStates
Constructor and Description |
---|
RotateCommand(Collection<OsmPrimitive> objects,
EastNorth currentEN)
Creates a RotateCommand.
|
Modifier and Type | Method and Description |
---|---|
protected double |
getAngle(EastNorth currentEN)
Get angle between the horizontal axis and the line formed by the pivot and give points.
|
Icon |
getDescriptionIcon()
Provides a descriptive icon of this command.
|
String |
getDescriptionText()
Provides a description text representing this command.
|
void |
handleEvent(EastNorth currentEN)
Compute new rotation angle and transform nodes accordingly.
|
protected void |
transformNodes()
Rotate nodes.
|
executeCommand, fillModifiedData, flagNodesAsModified, getNodesCenter, getParticipatingPrimitives, getTransformedNodes, storeOldState, undoCommand
checkAndConfirmOutlyingOperation, getLayer, getOrig, invalidBecauselayerRemoved
getChildren
private double startAngle
private double rotationAngle
public RotateCommand(Collection<OsmPrimitive> objects, EastNorth currentEN)
protected final double getAngle(EastNorth currentEN)
public final 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