Package org.tinyuml.draw

Examples of org.tinyuml.draw.Selection


 
  /**
   * Tests the selection.
   */
  public void testSelection() {
    Selection selection = connection.getSelection(operations);
    assertEquals(connection, selection.getElement());
  }
View Full Code Here


  /**
   * Tests the methods of the NullSelection object.
   */
  public void testState() {
    double x = 1, y = 2;
    Selection selection = NullSelection.getInstance();
    assertEquals(NullElement.getInstance(), selection.getElement());
    assertEquals(0, selection.getElements().size());
    assertFalse(selection.isDragging());
    assertFalse(selection.contains(x, y));
    assertEquals(Cursor.getDefaultCursor(),
      selection.getCursorForPosition(x, y));
    // These methods have no effect, just check they don't throw
    // exceptions
    selection.startDragging(x, y);
    selection.stopDragging(x, y);
    selection.cancelDragging();
    selection.updatePosition(x, y);
    selection.draw(drawingContext);
    selection.updateDimensions();
  }
View Full Code Here

    node.setParent(parent);
    mockParent.expects(atLeastOnce()).method("getAbsoluteX1").
      will(returnValue(0.0));
    mockParent.expects(atLeastOnce()).method("getAbsoluteY1").
      will(returnValue(0.0));
    Selection selection =
      node.getSelection((DiagramOperations) mockOperations.proxy());
    assertEquals(node, selection.getElement());
    node.setSize(3.0, 4.0); // we should in fact   
  }
View Full Code Here

 
  /**
   * Tests the selection.
   */
  public void testSelection() {
    Selection selection = connection.getSelection(operations);
    assertEquals(connection, selection.getElement());
  }
View Full Code Here

 
  /**
   * Tests the selection.
   */
  public void testSelection() {
    Selection selection = connection.getSelection(operations);
    assertEquals(connection, selection.getElement());
  }
View Full Code Here

 
  /**
   * Tests the selection.
   */
  public void testSelection() {
    Selection selection = connection.getSelection(operations);
    assertEquals(connection, selection.getElement());
  }
View Full Code Here

  /**
   * Tests the methods of the NullSelection object.
   */
  public void testState() {
    double x = 1, y = 2;
    Selection selection = NullSelection.getInstance();
    assertEquals(NullElement.getInstance(), selection.getElement());
    assertFalse(selection.isDragging());
    assertFalse(selection.contains(x, y));
    assertEquals(Cursor.getDefaultCursor(),
      selection.getCursorForPosition(x, y));
    // These methods have no effect, just check they don't throw
    // exceptions
    selection.startDragging(x, y);
    selection.stopDragging(x, y);
    selection.cancelDragging();
    selection.updatePosition(x, y);
    selection.draw(drawingContext);
    selection.updateDimensions();
  }
View Full Code Here

    node.setParent(parent);
    mockParent.expects(atLeastOnce()).method("getAbsoluteX1").
      will(returnValue(0.0));
    mockParent.expects(atLeastOnce()).method("getAbsoluteY1").
      will(returnValue(0.0));
    Selection selection =
      node.getSelection((DiagramOperations) mockOperations.proxy());
    assertEquals(node, selection.getElement());
    node.setSize(3.0, 4.0); // we should in fact   
  }
View Full Code Here

    node.setParent(parent);
    mockParent.expects(atLeastOnce()).method("getAbsoluteX").
      will(returnValue(0.0));
    mockParent.expects(atLeastOnce()).method("getAbsoluteY").
      will(returnValue(0.0));
    Selection selection =
      node.getSelection((DiagramOperations) mockOperations.proxy());
    assertEquals(node, selection.getElement());
    node.setSize(3.0, 4.0); // we should in fact   
  }
View Full Code Here

  /**
   * Tests the methods of the NullSelection object.
   */
  public void testState() {
    double x = 1, y = 2;
    Selection selection = NullSelection.getInstance();
    assertEquals(NullElement.getInstance(), selection.getElement());
    assertFalse(selection.isDragging());
    assertFalse(selection.contains(x, y));
    assertEquals(Cursor.getDefaultCursor(),
      selection.getCursorForPosition(x, y));
    // These methods have no effect, just check they don't throw
    // exceptions
    selection.startDragging(x, y);
    selection.stopDragging(x, y);
    selection.cancelDragging();
    selection.updatePosition(x, y);
    selection.draw(drawingContext);
    selection.updateDimensions();
  }
View Full Code Here

TOP

Related Classes of org.tinyuml.draw.Selection

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.