Examples of DetailsTreeSelectionEvent


Examples of com.cedarsoft.spring.rcp.events.DetailsTreeSelectionEvent

        updatingSelection = true;
        try {
          TreePath oldSelection = e.getOldLeadSelectionPath();
          if ( oldSelection != null ) {
            Object object = oldSelection.getLastPathComponent();
            notifyUnselect( new DetailsTreeSelectionEvent( DetailsTreeSelectionEvent.Type.UNSELECTED, object ) );
            SpringSupport.INSTANCE.publishEvent( new SelectionEvent( SelectionEvent.Type.UNSELECT, Lookups.dynamicLookupFromList( Arrays.asList( oldSelection.getPath() ) ) ) );
          }

          TreePath newSelection = e.getNewLeadSelectionPath();
          if ( newSelection != null ) {
            Object object = newSelection.getLastPathComponent();
            notifySelect( new DetailsTreeSelectionEvent( DetailsTreeSelectionEvent.Type.SELECTED, object ) );
            SpringSupport.INSTANCE.publishEvent( new SelectionEvent( SelectionEvent.Type.SELECT, Lookups.dynamicLookupFromList( Arrays.asList( newSelection.getPath() ) ) ) );
          }
        } finally {
          updatingSelection = false;
        }
View Full Code Here

Examples of com.cedarsoft.spring.rcp.events.DetailsTreeSelectionEvent

  }

  @NotNull
  public HierarchyDetailsModel createDetailsModel( @NotNull Object root ) {
    HierarchyDetailsModel model = new HierarchyDetailsModel( hierarchyLayerRegistry );
    model.select( new DetailsTreeSelectionEvent( DetailsTreeSelectionEvent.Type.SELECTED, root ) );
    detailModels.add( new WeakReference<HierarchyDetailsModel>( model ) );
    return model;
  }
View Full Code Here

Examples of com.cedarsoft.spring.rcp.events.DetailsTreeSelectionEvent

    //wire the models
    hierarchyTree = new HierarchyTree( treeModel );
    hierarchyTree.addSelectionListener( detailsModel );

    detailsModel.select( new DetailsTreeSelectionEvent( DetailsTreeSelectionEvent.Type.SELECTED, getEditorObject() ) );
    TreePath initialSelectionPath = getInitialSelectionPath();
    hierarchyTree.getSelectionModel().setSelectionPath( initialSelectionPath );
    hierarchyTree.addSelectionListener( detailsModel );

    splitPane.add( new JScrollPane( hierarchyTree ), JideBoxLayout.FLEXIBLE );
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.