Class IfElse
Object
org.anchoranalysis.bean.AnchorBean<DrawObject>
org.anchoranalysis.overlay.bean.DrawObject
org.anchoranalysis.image.io.bean.object.draw.IfElse
public class IfElse extends DrawObject
Branches to two different
DrawObject depending on a predicate.- Author:
- Owen Feehan
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceIfElse.PredicateInterface for the condition that is tested, to determine whichDrawObjectto use. -
Constructor Summary
Constructors Constructor Description IfElse()IfElse(IfElse.Predicate predicate, DrawObject whenTrue, DrawObject whenFalse)Creates for a particular condition. -
Method Summary
Modifier and Type Method Description voiddrawSingle(ObjectWithProperties object, RGBStack stack, ObjectDrawAttributes attributes, int iteration, org.anchoranalysis.spatial.box.BoundingBox restrictTo)DrawObjectgetWhenFalse()TheDrawObjectthat is used whencondition==false.DrawObjectgetWhenTrue()TheDrawObjectthat is used whencondition==true.voidsetWhenFalse(DrawObject whenFalse)TheDrawObjectthat is used whencondition==false.voidsetWhenTrue(DrawObject whenTrue)TheDrawObjectthat is used whencondition==true.Methods inherited from class org.anchoranalysis.overlay.bean.DrawObject
drawCollection, drawCollectionMethods inherited from class org.anchoranalysis.bean.AnchorBean
checkMisconfigured, describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString
-
Constructor Details
-
IfElse
Creates for a particular condition.- Parameters:
predicate- the condition that is tested, to determine whichDrawObjectto use.whenTrue- theDrawObjectthat is used whencondition==true.whenFalse- theDrawObjectthat is used whencondition==false.
-
IfElse
public IfElse()
-
-
Method Details
-
drawSingle
public void drawSingle(ObjectWithProperties object, RGBStack stack, ObjectDrawAttributes attributes, int iteration, org.anchoranalysis.spatial.box.BoundingBox restrictTo) throws OperationFailedException- Specified by:
drawSinglein classDrawObject- Throws:
OperationFailedException
-
getWhenTrue
TheDrawObjectthat is used whencondition==true. -
setWhenTrue
TheDrawObjectthat is used whencondition==true. -
getWhenFalse
TheDrawObjectthat is used whencondition==false. -
setWhenFalse
TheDrawObjectthat is used whencondition==false.
-