All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class moves.ConstructCircle

java.lang.Object
   |
   +----moves.EuMove
           |
           +----moves.constructFamily
                   |
                   +----moves.ConstructCircle

public class ConstructCircle
extends constructFamily
implements constants
Implements the LEA command ConstructCircle


Constructor Index

 o ConstructCircle(EuWrapper, EuLab)
This constructor tries, given tentative information from a user, to find an input mode.
 o ConstructCircle(EuWrapper, EuWrapper, EuArguments, int)
This constructor tries, given full information for a LEA program, to find an input and an output mode and checks that no arguments are passed.

Method Index

 o customAdjust(EuLab, EuWrapper)
If there is no radius in the selection, try to add one
 o findAllConstructs(EuWrapper, EuLab)
Constructs a circle and places it in the provided EuWrapper.
 o name()
 o number()
 o numberOfModes(int)
 o subTypeChecks(EuWrapper, int, int)
 o theMode(int, int)
 o undoCustomAdjust(EuWrapper)
Undoes previous adjustments by customAdjust().

Constructors

 o ConstructCircle
 public ConstructCircle(EuWrapper in,
                        EuWrapper out,
                        EuArguments args,
                        int beacon) throws LeaSyntaxException
This constructor tries, given full information for a LEA program, to find an input and an output mode and checks that no arguments are passed. Also checks that no beacons are passed.

Parameters:
in - the input @see EuWrapper
out - the output @see EuWrapper
args - arguments
beacon - a beacon, or 0 if no such was requested
 o ConstructCircle
 public ConstructCircle(EuWrapper sel,
                        EuLab lab) throws LeaSyntaxException
This constructor tries, given tentative information from a user, to find an input mode.

Parameters:
sel - the user selections in a @see EuWrapper
lab - the current EuLab

Methods

 o name
 public String name()
Returns:
The LEA name of this command
Overrides:
name in class EuMove
 o number
 public int number()
Returns:
A number representing this move internally
Overrides:
number in class EuMove
 o findAllConstructs
 protected void findAllConstructs(EuWrapper results,
                                  EuLab lab) throws LeaRuntimeException
Constructs a circle and places it in the provided EuWrapper.

Parameters:
results - a EuWrapper which must be in the DRIVE_E phase.
lab - the EuLab in which to get the objects with which to construct
Throws: LeaRuntimeException
if radius is not set
Overrides:
findAllConstructs in class constructFamily
 o numberOfModes
 protected int numberOfModes(int io)
Parameters:
io - either INPUT or OUTPUT (ignored)
Returns:
there is 1 input and 1 output mode
Overrides:
numberOfModes in class constructFamily
 o theMode
 protected int theMode(int i,
                       int io)
Parameters:
i - the number of the mode
io - either INPUT or OUTPUT
Returns:
a mask of the specified input or output mode
Overrides:
theMode in class constructFamily
 o subTypeChecks
 protected boolean subTypeChecks(EuWrapper sel,
                                 int i,
                                 int io)
Parameters:
sel - a EuWrapper in DRIVE_I or PARK mode
i - the number of the mode
io - either INPUT or OUTPUT
Returns:
true if subtype specifications are met
Overrides:
subTypeChecks in class constructFamily
 o customAdjust
 protected boolean customAdjust(EuLab lab,
                                EuWrapper sel)
If there is no radius in the selection, try to add one

Parameters:
sel - the selections to adjust
Returns:
true if a radius was added
Overrides:
customAdjust in class constructFamily
 o undoCustomAdjust
 protected void undoCustomAdjust(EuWrapper sel)
Undoes previous adjustments by customAdjust(). Works by removing the first radius, which should undo the previous selection as it is unique.

Parameters:
sel - the selections which were adjusted
Overrides:
undoCustomAdjust in class constructFamily

All Packages  Class Hierarchy  This Package  Previous  Next  Index