MetaDone
|
Classes | |
class | ConnectionDependency |
class | RotateAnchor |
class | RotateDependency |
Public Types | |
enum | RotateAnchorType { CENTER, LEFT, RIGHT, BOTTOM, TOP } |
Public Member Functions | |
RotateWidget (Scene scene) | |
double | getRotation () |
void | setRotation (double rotation) |
boolean | isHitAt (Point localLocation) |
final void | setControlPointFor (ConnectionWidget c) |
Protected Member Functions | |
void | paintChildren () |
AffineTransform | transform () |
Static Package Functions | |
static double | computeRotation (Collection<?extends Anchor > anchors, RotateAnchorType type) |
Private Member Functions | |
AffineTransform | buildTransform (boolean absolute) |
void | registerRotateDependency (boolean set, Dependency depend) |
Static Private Member Functions | |
static Point | getOtherPoint (Anchor.Entry entry) |
Private Attributes | |
double | rotation = 0.0d |
final ConnectionDependency | connectionDependency = new ConnectionDependency() |
Static Private Attributes | |
static final Logger | logger = Logger.getLogger(RotateWidget.class) |
Rotates all the children by a given rotation.
This widget is implemented by setting a circular background shape (see W_Shape), and then painting with a rotate transformation.
metadone.client.grasyla2.visuallibrary.widgets.RotateWidget.RotateWidget | ( | Scene | scene | ) |
Initializes this widget.
scene | The scene |
References metadone.client.grasyla2.visuallibrary.widgets.W_Shape.getBackgroundShape(), metadone.client.grasyla2.visuallibrary.widgets.backgrounds.AbstractWidgetShape.setStrokeColor(), and metadone.client.grasyla2.base.ColorEngine.TRANSPARENT.
AffineTransform metadone.client.grasyla2.visuallibrary.widgets.RotateWidget.buildTransform | ( | boolean | absolute | ) | [private] |
Build an affine transformation used by this instance.
absolute | Whether the absolute location should be used |
References metadone.client.grasyla2.visuallibrary.widgets.RotateWidget.getRotation().
Referenced by metadone.client.grasyla2.visuallibrary.widgets.RotateWidget.RotateAnchor.buildLineAnchor(), and metadone.client.grasyla2.visuallibrary.widgets.RotateWidget.isHitAt().
static double metadone.client.grasyla2.visuallibrary.widgets.RotateWidget.computeRotation | ( | Collection<?extends Anchor > | anchors, |
RotateAnchorType | type | ||
) | [static, package] |
Computes the rotation for a group of anchors and a RotateAnchorType.
anchors | The anchors |
type | The type |
References metadone.client.grasyla2.visuallibrary.widgets.RotateWidget.getOtherPoint().
Referenced by metadone.client.grasyla2.visuallibrary.widgets.RotateWidget.RotateAnchor.updateRotation().
static Point metadone.client.grasyla2.visuallibrary.widgets.RotateWidget.getOtherPoint | ( | Anchor.Entry | entry | ) | [static, private] |
double metadone.client.grasyla2.visuallibrary.widgets.RotateWidget.getRotation | ( | ) |
Gets the rotation.
References metadone.client.grasyla2.visuallibrary.widgets.RotateWidget.rotation.
Referenced by metadone.client.grasyla2.visuallibrary.widgets.RotateWidget.RotateAnchor.buildLineAnchor(), metadone.client.grasyla2.visuallibrary.widgets.RotateWidget.buildTransform(), metadone.client.grasyla2.visuallibrary.widgets.RotateWidget.transform(), and metadone.client.grasyla2.visuallibrary.widgets.RotateWidget.RotateAnchor.updateRotation().
boolean metadone.client.grasyla2.visuallibrary.widgets.RotateWidget.isHitAt | ( | Point | localLocation | ) |
Reimplemented from metadone.client.grasyla2.visuallibrary.widgets.W_Shape.
References metadone.client.grasyla2.visuallibrary.widgets.RotateWidget.buildTransform(), metadone.client.grasyla2.visuallibrary.widgets.W_Shape.getBackgroundShape(), metadone.client.grasyla2.visuallibrary.widgets.RotateWidget.logger, metadone.util.PointUtil.minus(), and metadone.client.grasyla2.visuallibrary.widgets.RotateWidget.transform().
void metadone.client.grasyla2.visuallibrary.widgets.RotateWidget.paintChildren | ( | ) | [protected] |
void metadone.client.grasyla2.visuallibrary.widgets.RotateWidget.registerRotateDependency | ( | boolean | set, |
Dependency | depend | ||
) | [private] |
References metadone.util.Objects.equal().
Referenced by metadone.client.grasyla2.visuallibrary.widgets.RotateWidget.RotateAnchor.notifyEntryAdded(), metadone.client.grasyla2.visuallibrary.widgets.RotateWidget.RotateAnchor.notifyEntryRemoved(), and metadone.client.grasyla2.visuallibrary.widgets.RotateWidget.ConnectionDependency.setConnection().
final void metadone.client.grasyla2.visuallibrary.widgets.RotateWidget.setControlPointFor | ( | ConnectionWidget | c | ) |
Sets a dependency for a connection widget.
This widget will turn automatically to adjust to the steep of the edge where it is located.
c | The connection or null |
IllegalStateException | when another dependency which controls the rotation is set |
References metadone.client.grasyla2.visuallibrary.widgets.RotateWidget.connectionDependency, and metadone.client.grasyla2.visuallibrary.widgets.RotateWidget.ConnectionDependency.setConnection().
void metadone.client.grasyla2.visuallibrary.widgets.RotateWidget.setRotation | ( | double | rotation | ) |
Sets the rotation.
rotation | The new rotation (in radians) |
References metadone.client.grasyla2.visuallibrary.widgets.RotateWidget.rotation.
Referenced by metadone.client.grasyla2.visuallibrary.widgets.RotateWidget.ConnectionDependency.revalidateDependency(), metadone.client.grasyla2.visuallibrary.widgets.RotateWidget.RotateAnchor.updateRotation(), and metadone.client.grasyla2.visuallibrary.VLRotateEngine.VLRotateEngine().
AffineTransform metadone.client.grasyla2.visuallibrary.widgets.RotateWidget.transform | ( | ) | [protected] |
Transforms the graphics for the paint.
References metadone.client.grasyla2.visuallibrary.widgets.RotateWidget.getRotation().
Referenced by metadone.client.grasyla2.visuallibrary.widgets.RotateWidget.RotateAnchor.buildLineAnchor(), metadone.client.grasyla2.visuallibrary.widgets.RotateWidget.isHitAt(), and metadone.client.grasyla2.visuallibrary.widgets.RotateWidget.paintChildren().
final Logger metadone.client.grasyla2.visuallibrary.widgets.RotateWidget.logger = Logger.getLogger(RotateWidget.class) [static, private] |
double metadone.client.grasyla2.visuallibrary.widgets.RotateWidget.rotation = 0.0d [private] |