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

List of all members.

Public Member Functions

 RotateAnchor (boolean updateRotation, RotateAnchorType type)
Result compute (Entry entry)

Protected Member Functions

void notifyEntryAdded (Entry entry)
void notifyEntryRemoved (Entry entry)
void notifyRevalidate ()

Private Member Functions

void recalculate ()
void buildCenterAnchor (Point center)
void buildLineAnchor (final Point center, final RotateAnchorType type)
void buildLineAnchor (ArrayList< Entry > entries, Point center, double space, boolean horizontal, AffineTransform transform)
double[] findPoints (double space, ArrayList< Entry > entries)
double updateRotation ()

Private Attributes

final boolean updateRotation
final RotateAnchorType type
HashMap< Entry, Result > results = new HashMap<Entry, Result>()
boolean recalculate = true
final Dependency dependency

Detailed Description

A rotate anchor for this widget.

Author:
kma

Constructor & Destructor Documentation

metadone.client.grasyla2.visuallibrary.widgets.RotateWidget.RotateAnchor.RotateAnchor ( boolean  updateRotation,
RotateAnchorType  type 
)

Initializes this widget.

Parameters:
updateRotationWhether to update the rotation when the slope of the connected edges change
typeThe type of the anchor
Exceptions:
IllegalStateExceptionwhen another dependency that controls the rotation is set.

References metadone.client.grasyla2.visuallibrary.widgets.RotateWidget.RotateAnchor.type, and metadone.client.grasyla2.visuallibrary.widgets.RotateWidget.RotateAnchor.updateRotation().


Member Function Documentation

void metadone.client.grasyla2.visuallibrary.widgets.RotateWidget.RotateAnchor.buildCenterAnchor ( Point  center) [private]
void metadone.client.grasyla2.visuallibrary.widgets.RotateWidget.RotateAnchor.buildLineAnchor ( ArrayList< Entry >  entries,
Point  center,
double  space,
boolean  horizontal,
AffineTransform  transform 
) [private]
Result metadone.client.grasyla2.visuallibrary.widgets.RotateWidget.RotateAnchor.compute ( Entry  entry)
double [] metadone.client.grasyla2.visuallibrary.widgets.RotateWidget.RotateAnchor.findPoints ( double  space,
ArrayList< Entry >  entries 
) [private]
void metadone.client.grasyla2.visuallibrary.widgets.RotateWidget.RotateAnchor.notifyRevalidate ( ) [protected]

Member Data Documentation

Initial value:
 new Dependency() {
            private boolean validating = false;

            @Override
            public void revalidateDependency() {
                if (validating) {
                    return;
                } else {
                    validating = true;
                    try {
                        recalculate = true;
                        getScene().revalidate();
                    } finally {
                        validating = false;
                    }
                }
            }
        }

Referenced by metadone.client.grasyla2.visuallibrary.widgets.RotateWidget.RotateAnchor.notifyEntryAdded(), and metadone.client.grasyla2.visuallibrary.widgets.RotateWidget.RotateAnchor.notifyEntryRemoved().


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