Examples of OrPredicate


Examples of prefuse.data.expression.OrPredicate

   
    private class Listener implements ListSelectionListener {

        public void valueChanged(ListSelectionEvent e) {
            ListModel model = (ListModel)e.getSource();
            OrPredicate orP = (OrPredicate)m_query;
           
            if ( model.isSelectionEmpty() )
            {
                orP.clear();
            }
            else if ( m_includeAll && model.isSelectedIndex(0) )
            {
                orP.set(BooleanLiteral.TRUE);
            }
            else
            {
                int min   = model.getMinSelectionIndex();
                int max   = model.getMaxSelectionIndex();
                int count = 0;
                for ( int i=min; i<=max; ++i ) {
                    if ( model.isSelectedIndex(i) )
                        ++count;
                }
           
                if ( count == model.getSize() ) {
                    orP.set(BooleanLiteral.TRUE);
                } else if ( count == 1 ) {
                    orP.set(getComparison(model.getElementAt(min)));
                } else {
                    Predicate[] p = new Predicate[count];
                    for ( int i=min, j=0; i<=max; ++i ) {
                        if ( model.isSelectedIndex(i) )
                            p[j++] = getComparison(model.getElementAt(i));
                    }
                    orP.set(p);
                }
            }
        }
View Full Code Here

Examples of prefuse.data.expression.OrPredicate

      jj_consume_token(OR);
      r = XorExpression();
      if ( l instanceof OrPredicate ) {
          ((OrPredicate)l).add((Predicate)r);
      } else {
          l = new OrPredicate((Predicate)l,(Predicate)r);
      }
    }
       {if (true) return l;}
    throw new Error("Missing return statement in function");
  }
View Full Code Here

Examples of prefuse.data.expression.OrPredicate

     * Set the test predicate used to determine visibility.
     * @param p the test predicate to set
     */
    protected void setPredicate(Predicate p) {
        m_predicate = p;
        m_filter = new OrPredicate(p, VisiblePredicate.TRUE);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.