1 package prefuse.visual.expression; 2 3 import prefuse.data.expression.ColumnExpression; 4 import prefuse.data.expression.Expression; 5 import prefuse.data.expression.Function; 6 import prefuse.data.expression.NotPredicate; 7 import prefuse.data.expression.Predicate; 8 import prefuse.visual.VisualItem; 9 10 15 public class VisiblePredicate extends ColumnExpression 16 implements Predicate, Function 17 { 18 19 20 public static final Predicate TRUE = new VisiblePredicate(); 21 22 public static final Predicate FALSE = new NotPredicate(TRUE); 23 24 27 public VisiblePredicate() { 28 super(VisualItem.VISIBLE); 29 } 30 31 34 public String getName() { 35 return "VISIBLE"; 36 } 37 38 41 public void addParameter(Expression e) { 42 throw new IllegalStateException ("This function takes 0 parameters"); 43 } 44 45 48 public int getParameterCount() { 49 return 0; 50 } 51 52 55 public String toString() { 56 return getName()+"()"; 57 } 58 59 } | Popular Tags |