MetaDone
metadone.client.grasyla2.visuallibrary.widgets.RotateWidget Class Reference
Inheritance diagram for metadone.client.grasyla2.visuallibrary.widgets.RotateWidget:
Collaboration diagram for metadone.client.grasyla2.visuallibrary.widgets.RotateWidget:

List of all members.

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)

Detailed Description

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.

Author:
kma

Member Enumeration Documentation

The anchor types.

Enumerator:
CENTER 

Attached to the center.

LEFT 

Attached vertically, outgoing left.

RIGHT 

Attached vertically, outgoing right.

BOTTOM 

Attached horizontally, outgoing bottom.

TOP 

Attached horizontally, outgoing top.


Constructor & Destructor Documentation

metadone.client.grasyla2.visuallibrary.widgets.RotateWidget.RotateWidget ( Scene  scene)

Member Function Documentation

AffineTransform metadone.client.grasyla2.visuallibrary.widgets.RotateWidget.buildTransform ( boolean  absolute) [private]

Build an affine transformation used by this instance.

Parameters:
absoluteWhether the absolute location should be used
Returns:
A new affine transformation

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.

Parameters:
anchorsThe anchors
typeThe type
Returns:
The proposed rotation angle

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]
void metadone.client.grasyla2.visuallibrary.widgets.RotateWidget.paintChildren ( ) [protected]
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.

Parameters:
cThe connection or null
Exceptions:
IllegalStateExceptionwhen 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().


Member Data Documentation


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations