org.openbp.cockpit.modeler.figures.spline
Class ChangeConnectionHandle.CanConnectDecorator

java.lang.Object
  extended by org.openbp.jaspira.decoration.FilteredDecorator
      extended by org.openbp.cockpit.modeler.figures.spline.ChangeConnectionHandle.CanConnectDecorator
All Implemented Interfaces:
Decorator
Enclosing class:
ChangeConnectionHandle

public class ChangeConnectionHandle.CanConnectDecorator
extends FilteredDecorator

Decorator that decorates a figure if the source of the connection can connect to it with a transparent green overlay rectangle.


Constructor Summary
ChangeConnectionHandle.CanConnectDecorator()
           
 
Method Summary
 java.lang.Object doDecorate(java.lang.Object owner, java.lang.String key, java.lang.Object value)
          Performs the actual decoration.
 boolean qualifies(java.lang.Object owner)
          The actual filter method.
 
Methods inherited from class org.openbp.jaspira.decoration.FilteredDecorator
decorate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChangeConnectionHandle.CanConnectDecorator

public ChangeConnectionHandle.CanConnectDecorator()
Method Detail

doDecorate

public java.lang.Object doDecorate(java.lang.Object owner,
                                   java.lang.String key,
                                   java.lang.Object value)
Description copied from class: FilteredDecorator
Performs the actual decoration.

Specified by:
doDecorate in class FilteredDecorator
Parameters:
owner - Owner of the object
key - Key under which the decorator is accessed
value - Object to decorate (also passed to the DecorationMgr.decorate(java.lang.Object, java.lang.String, java.lang.Object) method)
Returns:
The decorated object. The decorator may either modify the original object and return it or return a new object. The returned object will be passed to the next decorator.
See Also:
FilteredDecorator.doDecorate(Object, String, Object)

qualifies

public boolean qualifies(java.lang.Object owner)
Description copied from class: FilteredDecorator
The actual filter method.

Specified by:
qualifies in class FilteredDecorator
Parameters:
owner - Owner of the object. This parameter is passed to the DecorationMgr.decorate(java.lang.Object, java.lang.String, java.lang.Object) method.
Returns:
true If owner qualifies as source for decoration.
false If the decoration should not be applied.
See Also:
FilteredDecorator.qualifies(Object)


Copyright © 2011. All Rights Reserved.