Examples of pick()


Examples of edu.uci.ics.jung.visualization.PickedState.pick()

                        offsetx = (float) (gp.getX()-q.getX());
                        offsety = (float) (gp.getY()-q.getY());
                    }
                } else if(isPickingEdges() &&
                        (edge = pickSupport.getEdge(ip.getX(), ip.getY())) != null) {
                    pickedState.pick(edge, !pickedState.isPicked(edge));
                }
            }
        }
       if(vertex != null) e.consume();
View Full Code Here

Examples of edu.uci.ics.jung.visualization.PickedState.pick()

        for (Object o: verts) {
            if (o instanceof Vertex) {
                switch (searchtype) {
                    case 1:
                        if (getLabel((Vertex)o).endsWith(theHost))
                            pickedstate.pick((Vertex)o, true);
                        break;
                    case 2:
                        if (getLabel((Vertex)o).startsWith(theHost))
                            pickedstate.pick((Vertex)o, true);
                        break;
View Full Code Here

Examples of edu.uci.ics.jung.visualization.PickedState.pick()

                        if (getLabel((Vertex)o).endsWith(theHost))
                            pickedstate.pick((Vertex)o, true);
                        break;
                    case 2:
                        if (getLabel((Vertex)o).startsWith(theHost))
                            pickedstate.pick((Vertex)o, true);
                        break;
                    case 3:
                        if (getLabel((Vertex)o).contains(theHost))
                            pickedstate.pick((Vertex)o, true);                       
                        break;
View Full Code Here

Examples of edu.uci.ics.jung.visualization.PickedState.pick()

                        if (getLabel((Vertex)o).startsWith(theHost))
                            pickedstate.pick((Vertex)o, true);
                        break;
                    case 3:
                        if (getLabel((Vertex)o).contains(theHost))
                            pickedstate.pick((Vertex)o, true);                       
                        break;
                }
            }
        }
        pickedVertices = pickedstate.getPickedVertices();
View Full Code Here

Examples of edu.uci.ics.jung.visualization.PickedState.pick()

    public void selectAllVertices(String key) {
        PickedState pickedstate = getVV(key).getPickedState();
        Set vertices = _myGraph.getVertices();
        for (Object o: vertices) {
            if (o instanceof Vertex) {
                pickedstate.pick((Vertex)o, true);
            }
        }
    }
   
    public void hideSelectedVerticesOrEdges(String key) {
View Full Code Here

Examples of io.druid.client.selector.ServerSelector.pick()

      final Iterator<ServerSelector> selectorsIter = selectors.values().iterator();
      while (selectorsIter.hasNext()) {
        final ServerSelector selector = selectorsIter.next();
        selectorsIter.remove();
        while (!selector.isEmpty()) {
          final QueryableDruidServer pick = selector.pick();
          selector.removeServer(pick);
        }
      }
    }
  }
View Full Code Here

Examples of io.druid.client.selector.ServerSelector.pick()

    client2.run(query, context);
    client2.run(query, context);

    Assert.assertTrue(client2.getNumOpenConnections() == 2);

    Assert.assertTrue(serverSelector.pick() == queryableDruidServer2);

    EasyMock.verify(httpClient);
  }

  @Test
View Full Code Here

Examples of io.druid.curator.discovery.ServerDiscoverySelector.pick()

    }

    final String serviceName = selected == null ? hostSelector.getDefaultServiceName() : selected.lhs;
    final ServerDiscoverySelector selector = selected == null ? null : selected.rhs;

    Server server = selector == null ? null : selector.pick();
    if (server == null) {
      log.error(
          "WTF?! No server found for serviceName[%s]. Using backup",
          serviceName
      );
View Full Code Here

Examples of org.richfaces.fragment.common.picker.ChoicePickerHelper.ByIndexChoicePicker.pick()

    }

    @Test
    public void testPickNotExistingElement() {
        ByIndexChoicePicker picker = ChoicePickerHelper.byIndex().index(15);
        assertNull(picker.pick(myFragment.getDivs()));

        picker = ChoicePickerHelper.byIndex().fromRange(Range.<Integer>atLeast(15));
        assertNull(picker.pick(myFragment.getDivs()));
    }
View Full Code Here

Examples of org.richfaces.fragment.common.picker.ChoicePickerHelper.ByIndexChoicePicker.pick()

    public void testPickNotExistingElement() {
        ByIndexChoicePicker picker = ChoicePickerHelper.byIndex().index(15);
        assertNull(picker.pick(myFragment.getDivs()));

        picker = ChoicePickerHelper.byIndex().fromRange(Range.<Integer>atLeast(15));
        assertNull(picker.pick(myFragment.getDivs()));
    }

    @Test
    public void testPickingPreservesOrder() {
        ByIndexChoicePicker picker = ChoicePickerHelper.byIndex()
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.