Package org.eclipse.gef.examples.logicdesigner.model

Examples of org.eclipse.gef.examples.logicdesigner.model.Circuit


  return getCircuitBoardFigure().getContentsPane();
}

public void performRequest(Request request){
  if (request.getType() == RequestConstants.REQ_OPEN) {
    Circuit circuit = (Circuit) this.getModel();
    circuit.setName("doubleClicked");
  }
}
View Full Code Here


  public void doubleClick() throws Exception {
    editor.activateTool(TOOL_CIRCUIT);
    editor.click(10, 10);

    SWTBotGefEditPart circuitEditPart = editor.editParts(instanceOf(CircuitEditPart.class)).get(0);
    Circuit circuit = (Circuit) circuitEditPart.part().getModel();
    final String nameBeforeDoubleClick = circuit.getName();
    editor.select(circuitEditPart).doubleClick(15, 15);   
   
    /* we need to wait that double click  have been executed */
    syncWithUIThread();
   
    final String nameAfterDoubleClick = circuit.getName();
    assertFalse("circuit name was not modified by double click", nameBeforeDoubleClick.equals(nameAfterDoubleClick));
  }
View Full Code Here

  LogicSubpart newPart = null;
 
  if (oldPart instanceof AndGate) {
    newPart = new AndGate();
  } else if (oldPart instanceof Circuit) {
    newPart = new Circuit();
  } else if (oldPart instanceof GroundOutput) {
    newPart = new GroundOutput();
  } else if (oldPart instanceof LED) {
    newPart = new LED();
    newPart.setPropertyValue(LED.P_VALUE, oldPart.getPropertyValue(LED.P_VALUE));
View Full Code Here

TOP

Related Classes of org.eclipse.gef.examples.logicdesigner.model.Circuit

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.