|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openstreetmap.josm.command.PseudoCommand
org.openstreetmap.josm.command.Command
org.openstreetmap.josm.command.TransformNodesCommand
org.openstreetmap.josm.command.RotateCommand
public class RotateCommand
RotateCommand rotates a number of objects around their centre.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.openstreetmap.josm.command.TransformNodesCommand |
---|
TransformNodesCommand.OldState |
Field Summary | |
---|---|
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 |
(package private) EastNorth |
startEN
World position of the mouse when the user started the command. |
Fields inherited from class org.openstreetmap.josm.command.TransformNodesCommand |
---|
nodes, oldStates |
Constructor Summary | |
---|---|
RotateCommand(java.util.Collection<OsmPrimitive> objects,
EastNorth currentEN)
Creates a RotateCommand. |
Method Summary | |
---|---|
protected double |
getAngle(EastNorth currentEN)
Get angle between the horizontal axis and the line formed by the pivot and give points. |
javax.swing.Icon |
getDescriptionIcon()
Provides a descriptive icon of this command. |
java.lang.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. |
Methods inherited from class org.openstreetmap.josm.command.TransformNodesCommand |
---|
executeCommand, fillModifiedData, flagNodesAsModified, getNodesCenter, getParticipatingPrimitives, getTransformedNodes, storeOldState, undoCommand |
Methods inherited from class org.openstreetmap.josm.command.Command |
---|
checkAndConfirmOutlyingOperation, getLayer, getOrig, invalidBecauselayerRemoved |
Methods inherited from class org.openstreetmap.josm.command.PseudoCommand |
---|
getChildren |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private EastNorth pivot
EastNorth startEN
private double startAngle
private double rotationAngle
Constructor Detail |
---|
public RotateCommand(java.util.Collection<OsmPrimitive> objects, EastNorth currentEN)
Method Detail |
---|
protected double getAngle(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 java.lang.String getDescriptionText()
PseudoCommand
getDescriptionText
in class TransformNodesCommand
public javax.swing.Icon getDescriptionIcon()
PseudoCommand
getDescriptionIcon
in class TransformNodesCommand
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |