Class IfElse
Branches to two different
DrawObject depending on a predicate.- Author:
- Owen Feehan
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceInterface for the condition that is tested, to determine whichDrawObjectto use. -
Constructor Summary
ConstructorsConstructorDescriptionIfElse()IfElse(IfElse.Predicate predicate, DrawObject whenTrue, DrawObject whenFalse) Creates for a particular condition. -
Method Summary
Modifier and TypeMethodDescriptionvoiddrawSingle(ObjectWithProperties object, RGBStack stack, ObjectDrawAttributes attributes, int iteration, BoundingBox restrictTo) TheDrawObjectthat is used whencondition==false.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, 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.
-