Examples of mxIEventListener


Examples of com.mxgraph.util.mxEventSource.mxIEventListener

    this.graphComponent = graphComponent;
    marker = createMarker();
    movePreview = createMovePreview();

    // Installs the paint handler
    graphComponent.addListener(mxEvent.AFTER_PAINT, new mxIEventListener()
    {
      public void invoke(Object sender, mxEventObject evt)
      {
        Graphics g = (Graphics) evt.getProperty("g");
        paint(g);
View Full Code Here

Examples of com.mxgraph.util.mxEventSource.mxIEventListener

      }

    });

    // Installs the paint handler
    graphComponent.addListener(mxEvent.PAINT, new mxIEventListener()
    {
      public void invoke(Object sender, mxEventObject evt)
      {
        Graphics g = (Graphics) evt.getProperty("g");
        paintHandles(g);
View Full Code Here

Examples of com.mxgraph.util.mxEventSource.mxIEventListener

    this.graphComponent = graphComponent;
    graphComponent.addMouseListener(this);
    handle = createHandle();

    // Installs the paint handler
    graphComponent.addListener(mxEvent.AFTER_PAINT, new mxIEventListener()
    {
      public void invoke(Object sender, mxEventObject evt)
      {
        Graphics g = (Graphics) evt.getProperty("g");
        paint(g);
View Full Code Here

Examples of com.mxgraph.util.mxEventSource.mxIEventListener

    EditorPalette imagesPalette = insertPalette(mxResources.get("images"));
    EditorPalette symbolsPalette = insertPalette(mxResources.get("symbols"));

    // Sets the edge template to be used for creating new edges if an edge
    // is clicked in the shape palette
    shapesPalette.addListener(mxEvent.SELECT, new mxIEventListener()
    {
      public void invoke(Object sender, mxEventObject evt)
      {
        Object tmp = evt.getProperty("transferable");
View Full Code Here

Examples of com.mxgraph.util.mxEventSource.mxIEventListener

    new mxRubberband(graphComponent);
    new mxKeyboardHandler(graphComponent);

    // Installs automatic validation (use editor.validation = true
    // if you are using an mxEditor instance)
    graph.getModel().addListener(mxEvent.CHANGE, new mxIEventListener()
    {
      public void invoke(Object sender, mxEventObject evt)
      {
        graphComponent.validateGraph();
      }
View Full Code Here

Examples of com.mxgraph.util.mxEventSource.mxIEventListener

  public mxConnectionHandler(mxGraphComponent graphComponent)
  {
    this.graphComponent = graphComponent;

    // Installs the paint handler
    graphComponent.addListener(mxEvent.AFTER_PAINT, new mxIEventListener()
    {
      public void invoke(Object sender, mxEventObject evt)
      {
        Graphics g = (Graphics) evt.getProperty("g");
        paint(g);
View Full Code Here

Examples of com.mxgraph.util.mxEventSource.mxIEventListener

    // Adds the command history to the model and view
    graph.getModel().addListener(mxEvent.UNDO, undoHandler);
    graph.getView().addListener(mxEvent.UNDO, undoHandler);

    // Keeps the selection in sync with the command history
    mxIEventListener undoHandler = new mxIEventListener()
    {
      public void invoke(Object source, mxEventObject evt)
      {
        List<mxUndoableChange> changes = ((mxUndoableEdit) evt
            .getProperty("edit")).getChanges();
View Full Code Here

Examples of com.mxgraph.util.mxEventSource.mxIEventListener

   *
   */
  protected void installRepaintListener()
  {
    graphComponent.getGraph().addListener(mxEvent.REPAINT,
        new mxIEventListener()
        {
          public void invoke(Object source, mxEventObject evt)
          {
            String buffer = (graphComponent.getTripleBuffer() != null) ? ""
                : " (unbuffered)";
View Full Code Here

Examples of com.mxgraph.util.mxEventSource.mxIEventListener

          finally
          {
            mxMorphing morph = new mxMorphing(graphComponent, 20,
                1.2, 20);

            morph.addListener(mxEvent.DONE, new mxIEventListener()
            {

              public void invoke(Object sender, mxEventObject evt)
              {
                graph.getModel().endUpdate();
View Full Code Here

Examples of com.mxgraph.util.mxEventSource.mxIEventListener

            if(alreadyPaintedFlag==0){
              graph.insertVertex(parentVertex, null,Messages.getString("PetriNet.Resources.NoRolesDefined"),10,10,150,30, "rounded=1;opacity=0;fontStyle=1;fontColor=black");           
            }
           
            // Create Listener, first parameter in constructor is the observed graph
            mxIEventListener mySelectListener = new selectListener(graph);
            // add Listener as CHANGE-Listener
            graph.getSelectionModel().addListener(mxEvent.CHANGE, mySelectListener);
            graphComponent = new mxGraphComponent(graph);

            temp_Role_graph = graph;
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.