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
-
ConstructCircle(EuWrapper, EuLab)
- This constructor tries, given tentative information from a user,
to find an input
mode.
-
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.
-
customAdjust(EuLab, EuWrapper)
- If there is no radius in the selection, try to add one
-
findAllConstructs(EuWrapper, EuLab)
- Constructs a circle and places it in the provided EuWrapper.
-
name()
-
-
number()
-
-
numberOfModes(int)
-
-
subTypeChecks(EuWrapper, int, int)
-
-
theMode(int, int)
-
-
undoCustomAdjust(EuWrapper)
- Undoes previous adjustments by customAdjust().
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
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
name
public String name()
- Returns:
- The LEA name of this command
- Overrides:
- name in class EuMove
number
public int number()
- Returns:
- A number representing this move internally
- Overrides:
- number in class EuMove
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
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
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
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
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
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