Package javax.swing.undo

Examples of javax.swing.undo.UndoableEditSupport


          Object oldValue=field.getValue(objectRef, context);
          if (field.isMoney())
            field.setText(objectRef,""+newValue,context);
          else   
            field.setValue(objectRef,source,newValue,context);
          UndoableEditSupport undoableEditSupport=objectRef.getDataFactory().getUndoController().getEditSupport();
          if (undoableEditSupport!=null){
            undoableEditSupport.postEdit(new FieldEdit(field,objectRef,value,oldValue,this,context));
          }
        }
       
      }
    } catch (FieldParseException e) {
View Full Code Here


  //protected transient UndoManager undoManager;
  /**
   *
   */
  public UndoController() {
    editSupport=new UndoableEditSupport();
    //undoManager=new UndoManager();
    editSupport.addUndoableEditListener(this);
  }
View Full Code Here

//    if (undoableEditSupport!=null&&undo){
//      undoableEditSupport.postEdit(new AssignmentDeletionEdit(assignment,eventSource));
//    }
  }
  public void remove(Collection assignments, Object eventSource,boolean undo) {
    UndoableEditSupport undoableEditSupport=null;
   
    try {
      for (Iterator i=assignments.iterator();i.hasNext();){
        Assignment assignment=(Assignment)i.next();
//        if (undoableEditSupport==null&&undo){
View Full Code Here

    if (eventSource != null) {
      dependency.fireCreateEvent(eventSource);
    }
    dependency.setDirty(true);

    UndoableEditSupport undoableEditSupport=getUndoableEditSupport(dependency);
    if (undoableEditSupport!=null&&eventSource!=null&&!(eventSource instanceof UndoableEdit)){
      undoableEditSupport.postEdit(new DependencyCreationEdit(dependency,eventSource));
    }
  }
View Full Code Here

    updateSentinels(dependency);

    if (eventSource != null)
      dependency.fireDeleteEvent(eventSource);

    UndoableEditSupport undoableEditSupport=getUndoableEditSupport(dependency);
    if (undo && undoableEditSupport!=null&&!(eventSource instanceof UndoableEdit)){
      undoableEditSupport.postEdit(new DependencyDeletionEdit(dependency,eventSource));
    }


  }
View Full Code Here

    int oldType=dependency.getDependencyType();
    dependency.setLag(lag);
    dependency.setDependencyType(type);
    dependency.setDirty(true);

    UndoableEditSupport undoableEditSupport=getUndoableEditSupport(dependency);
    if (undoableEditSupport!=null&&!(eventSource instanceof UndoableEdit)){
      undoableEditSupport.postEdit(new DependencySetFieldsEdit(dependency,oldLag,oldType,eventSource));
    }

  }
View Full Code Here

                break;
            }
            add(parent,child,position,EVENT);

            if ((objectEvent.getInfo()==null||(objectEvent.getInfo()!=null&&objectEvent.getInfo().isUndo()))&& dataFactory instanceof Project){
              UndoableEditSupport undoableEditSupport=getUndoableEditSupport();
              if (undoableEditSupport!=null){
                undoableEditSupport.postEdit(new AssignmentCreationEdit(child));
              }
            }

          }



        } else if (objectEvent.isDelete()) {
          Node node=search(assignment);
          if (node != null){
            remove(node,EVENT,false,false);
            if ((objectEvent.getInfo()==null||(objectEvent.getInfo()!=null&&objectEvent.getInfo().isUndo()))&& dataFactory instanceof Project){
              UndoableEditSupport undoableEditSupport=getUndoableEditSupport();
              if (undoableEditSupport!=null){
                undoableEditSupport.postEdit(new AssignmentDeletionEdit(node));
              }
            }
          }

View Full Code Here

  private void saveCalendar() {
    unsaved = false;
    CalendarService service=CalendarService.getInstance();
    WorkingCalendar wc=form.getCalendar();
    UndoableEditSupport undoableEditSupport=undoController.getEditSupport();
    if (undoableEditSupport!=null){
      undoableEditSupport.postEdit(new CalendarEdit(editedCalendar,wc));
    }

    service.assignCalendar(editedCalendar,wc);
    service.saveAndUpdate(editedCalendar);
View Full Code Here

TOP

Related Classes of javax.swing.undo.UndoableEditSupport

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.