Search this API

y.option
Class ConstraintManager.Condition

java.lang.Object
  extended by y.option.ConstraintManager.Condition
Enclosing class:
ConstraintManager

public static final class ConstraintManager.Condition
extends java.lang.Object

A Condition that can be used to trigger or control different behavior.

 

Method Summary
 ConstraintManager.Condition and(ConstraintManager.Condition other)
          Creates a new Condition object which determines whether this condition and the other one is met.
 ConstraintManager.Condition inverse()
          Creates a new Condition object which determines whether this condition is not met.
 boolean isTrue(Editor forEditor)
          Determines whether the condition is met for the given editor.
 ConstraintManager.Condition or(ConstraintManager.Condition other)
          Creates a new Condition object which determines whether this or the other condition is met.
 ConstraintManager.Condition xor(ConstraintManager.Condition other)
          Creates a new Condition object which determines whether either this condition or the other one is met.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

isTrue

public boolean isTrue(Editor forEditor)
Determines whether the condition is met for the given editor.

Parameters:
forEditor - the editor to inspect
Returns:
whether the condition is met

or

public ConstraintManager.Condition or(ConstraintManager.Condition other)
Creates a new Condition object which determines whether this or the other condition is met.

Parameters:
other - the other condition to check
Returns:
an object which behaves like a logical or of this and other

inverse

public ConstraintManager.Condition inverse()
Creates a new Condition object which determines whether this condition is not met.

Returns:
an object which behaves like the logical negation of this.

and

public ConstraintManager.Condition and(ConstraintManager.Condition other)
Creates a new Condition object which determines whether this condition and the other one is met.

Parameters:
other - the other condition to check
Returns:
an object which behaves like the logical and of this and other

xor

public ConstraintManager.Condition xor(ConstraintManager.Condition other)
Creates a new Condition object which determines whether either this condition or the other one is met.

Parameters:
other - the other condition to check
Returns:
an object which behaves like the logical 'exclusive or' of this and other

© Copyright 2000-2022,
yWorks GmbH.
All rights reserved.