t3.portfolios.commonbehaviours
Class RNTWTORAndRegroup

java.lang.Object
  extended by t3.portfolios.commonbehaviours.RNTWTORAndRegroup
All Implemented Interfaces:
PortfolioCommonBehaviour

public class RNTWTORAndRegroup
extends java.lang.Object
implements PortfolioCommonBehaviour

This class is like RotateNTranslateWithTranslateOnlyRegion but additionally any portfolios in the set containers act as containers. Portfolios dragged into containers will become children of the containers until dragged out.

Author:
pjt40

Field Summary
 java.util.Set<Portfolio> containers
           
 boolean guessPORTdimensionsFromOurTile
           
 PointInputDeviceTypeAndButtonSet pidtbs
           
 double PORTh
           
 double PORTw
           
 double translateOnlyProportion
           
 
Constructor Summary
RNTWTORAndRegroup(PointInputDeviceTypeAndButtonSet pidtbs, boolean guessPORTdimensionsFromOurTile, double PORTw, double PORTh, double translateOnlyProportion, java.util.Set<Portfolio> containers)
           
RNTWTORAndRegroup(PointInputDeviceTypeAndButtonSet pidtbs, double translateOnlyProportion, java.util.Set<Portfolio> containers)
           
 
Method Summary
 boolean customProcessEndOfFDOPmode(Portfolio p, PointInputDevice pid, int button)
          Implement this method to be notified when a PID stops being in FDOP mode.
 boolean customProcessEventForThisPortfolioNotChildren(Portfolio p, PortfolioEvent e, boolean bubbled)
          Implement this method to receive events.
 boolean customProcessFDOPevent(Portfolio p, PortfolioEvent e, double PORTxWhenEnteredFDOPmode, double PORTyWhenEnteredFDOPmode)
          Implement this method to receive FDOP mode events.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PORTw

public final double PORTw

PORTh

public final double PORTh

translateOnlyProportion

public final double translateOnlyProportion

guessPORTdimensionsFromOurTile

public final boolean guessPORTdimensionsFromOurTile

containers

public final java.util.Set<Portfolio> containers

pidtbs

public final PointInputDeviceTypeAndButtonSet pidtbs
Constructor Detail

RNTWTORAndRegroup

public RNTWTORAndRegroup(PointInputDeviceTypeAndButtonSet pidtbs,
                         double translateOnlyProportion,
                         java.util.Set<Portfolio> containers)

RNTWTORAndRegroup

public RNTWTORAndRegroup(PointInputDeviceTypeAndButtonSet pidtbs,
                         boolean guessPORTdimensionsFromOurTile,
                         double PORTw,
                         double PORTh,
                         double translateOnlyProportion,
                         java.util.Set<Portfolio> containers)
Method Detail

customProcessEventForThisPortfolioNotChildren

public boolean customProcessEventForThisPortfolioNotChildren(Portfolio p,
                                                             PortfolioEvent e,
                                                             boolean bubbled)
Description copied from interface: PortfolioCommonBehaviour
Implement this method to receive events. See PortfolioServer for more information on the event model.

Specified by:
customProcessEventForThisPortfolioNotChildren in interface PortfolioCommonBehaviour
e - Event
bubbled - True iff the event did not occur on this portfolio's tile but has been bubbled from one of its children.
Returns:
True iff the event should not be passed to the portfolio.

customProcessFDOPevent

public boolean customProcessFDOPevent(Portfolio p,
                                      PortfolioEvent e,
                                      double PORTxWhenEnteredFDOPmode,
                                      double PORTyWhenEnteredFDOPmode)
Description copied from interface: PortfolioCommonBehaviour
Implement this method to receive FDOP mode events. See PortfolioServer for more information on the event model.

Specified by:
customProcessFDOPevent in interface PortfolioCommonBehaviour
e - Event
PORTxWhenEnteredFDOPmode - PORT space coordinate of the PID when it entered FDOP mode.
PORTyWhenEnteredFDOPmode - PORT space coordinate of the PID when it entered FDOP mode.
Returns:
True iff the event should not be passed to the portfolio.

customProcessEndOfFDOPmode

public boolean customProcessEndOfFDOPmode(Portfolio p,
                                          PointInputDevice pid,
                                          int button)
Description copied from interface: PortfolioCommonBehaviour
Implement this method to be notified when a PID stops being in FDOP mode. See PortfolioServer for more information on the event model.

Specified by:
customProcessEndOfFDOPmode in interface PortfolioCommonBehaviour
Returns:
True iff the event should not be passed to the portfolio.