Package org.waveprotocol.wave.client.editor.content

Examples of org.waveprotocol.wave.client.editor.content.ContentElement$Action


    Map<String, Object> parameters = new HashMap<String, Object>();
    parameters.put(sb.toString(), "");
    parameters.put("huuhaa", "");

    Action action = new SimpleAction();
    parametersInterceptor.setParameters(action, stack, parameters);
    assertEquals(1, actual.size());
  }
View Full Code Here


    public void testNoParametersAction() throws Exception {
        ParametersInterceptor interceptor = new ParametersInterceptor();
        interceptor.init();

        MockActionInvocation mai = new MockActionInvocation();
        Action action = new NoParametersAction();
        mai.setAction(action);

        interceptor.doIntercept(mai);
        interceptor.destroy();
    }
View Full Code Here

        Map<String, Object> parameters = new HashMap<String, Object>();
        parameters.put("user.address.city", "London");
        parameters.put("user.name", "Superman");

        Action action = new SimpleAction();
        pi.setParameters(action, stack, parameters);

        assertEquals("ordered should be false by default", false, pi.isOrdered());
        assertEquals(2, actual.size());
        assertEquals("London", actual.get("user.address.city"));
View Full Code Here

    protected Object handleGetEffect()
    {
        // Effect is mapped to action, not activity
        // We return the first action encountered in the activity
        Action effectAction = null;
        Activity effect = this.metaObject.getEffect();
        if (effect != null)
        {
            Collection nodes = effect.getNodes();
            for (Iterator nodesIt = nodes.iterator(); nodesIt.hasNext() && effectAction == null;)
View Full Code Here


  public void testGetValidSelectionPointIfAvailable() {
    setupTest("<body><line></line></body>");
    Point<ContentNode> point = aggressiveSelectionHelper.getFirstValidSelectionPoint();
    ContentElement localP = doc.getDocumentElement().getFirstChild().getLastChild().asElement();
    assertEquals(Point.end(localP), point);

    setupTest("<body><line></line></body>");
    point = aggressiveSelectionHelper.getLastValidSelectionPoint();
    localP = doc.getDocumentElement().getFirstChild().getLastChild().asElement();
View Full Code Here

   */
  Line delete(int index) {
//    info("Deleting @" + index);

    assert index != 0 : "Code doesn't (yet) support killing the initial line";
    ContentElement e = getLineElement(index);
    Line line = Line.fromLineElement(e).next();
    doc.deleteNode(e);
    return line;
  }
View Full Code Here

   *        "decimal", but the type is "HEADING", the listyle attribute should
   *        normally be ignored and has no meaning. It won't make a difference
   *        if it is set or not. We want to test both scenarios.
   */
  void update(int index, Type type, int indent, boolean alwaysSetRedundant) {
    ContentElement e = getLineElement(index);
//    info("Making @" + ((doc.getLocation(e) - 1)/2) + " " +
//        type + " " + indent + " " + alwaysSetStyle);

    Map<String, String> updates = attributes(type, indent, alwaysSetRedundant, false);

View Full Code Here

      }
    }
  }

  private ContentElement newParaElement() {
    return new ContentElement("p", Document.get().createPElement(), null);
  }
View Full Code Here

    interactor.checkExpectations();
    subHandler.checkExpectations();
  }

  ContentElement newElement() {
    return new ContentElement("p", Document.get().createPElement(), null);
  }
View Full Code Here

  /**
   * Tests mouse event triggers on node.
   */
  public void testMouseEventsTriggeredOnNode() {
    EditorEvent mouseSignal = FakeSignalEvent.createClick(FakeEditorEvent.ED_FACTORY, null);
    ContentElement fakeContentElement = newElement();
    final Point<ContentNode> caret = Point.<ContentNode> end(fakeContentElement);

    FakeRouter router = new FakeRouter();
    FakeEditorEventsSubHandler subHandler = new FakeEditorEventsSubHandler();
    FakeEditorInteractor interactor = setupFakeEditorInteractor(new FocusedContentRange(caret));
View Full Code Here

TOP

Related Classes of org.waveprotocol.wave.client.editor.content.ContentElement$Action

Copyright © 2018 www.massapicom. 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.