Package org.springframework.richclient.application.docking.jide.editor

Examples of org.springframework.richclient.application.docking.jide.editor.EditorDescriptor


      }
    }

    private void processEditorObject(Object editorObject, boolean activateAfterOpen){
    JidePageDescriptor pageDescriptor = (JidePageDescriptor)getPageDescriptor();
      EditorDescriptor editorDescriptor =
      pageDescriptor.getEditorFactory().getEditorDescriptor(editorObject);
    if(editorDescriptor != null){
      PageComponent pageComponent = editorDescriptor.createPageComponent();
      AbstractEditor editor = (AbstractEditor)pageComponent;
      editor.setEditorInput(editorObject);
        EditorComponentPane editorPane = new EditorComponentPane(pageComponent);
        pageComponent.setContext(new DefaultViewContext(this, editorPane))
        WorkspaceView workspace = (WorkspaceView)workspaceComponent;
View Full Code Here


    return ( UiAccessBuilderConfiguration<T> ) super.getConfiguration();
  }

  @NotNull
  public EditorDescriptor getEditorDescriptor(@NotNull final ObservableObjectAccess<T> objectAccess) {
    EditorDescriptor editorDescriptor = new EditorDescriptor();

    editorDescriptor.setEditorClass( FormBasedEditor.class );
    //    editorDescriptor.setBeanName( getConfiguration().getIdStrategy().getBaseId() );

    Map<Object, Object> map = new HashMap<Object, Object>();
    map.put( FormBasedEditor.PROPERTY_ID_STRATEGY, getConfiguration().getIdStrategy() );
    map.put( FormBasedEditor.PROPERTY_FORM_FACTORY, getConfiguration().getFormFactory() );
    map.put( FormBasedEditor.PROPERTY_OBJECT_COMMIT, objectAccess );
    map.put( FormBasedEditor.PROPERTY_LABEL_PROVIDER, getLabelProvider() );

    FormBasedEditor.InitializerCallback<T> initializerCallback = new FormBasedEditor.InitializerCallback<T>() {
      @Override
      public void isInitializing( @NotNull final FormBasedEditor<T> editor ) {
        if ( objectAccess instanceof DelegatingObjectAccess ) {
          ObservableObjectAccess<T> currentDelegate = ( ( DelegatingObjectAccess<T> ) objectAccess ).getCurrentDelegate();
          if ( currentDelegate == null ) {
            throw new IllegalStateException( "No delegate available - impossible" );
          }
          currentDelegate.addElementListener( new EditorCloseListener<T>( editor ) );
        } else {
          objectAccess.addElementListener( new EditorCloseListener<T>( editor ) );
        }
      }
    };

    map.put( FormBasedEditor.PROPERTY_INITIALIZER_CALLBACK, initializerCallback );
    editorDescriptor.setEditorProperties( map );

    return editorDescriptor;
  }
View Full Code Here

TOP

Related Classes of org.springframework.richclient.application.docking.jide.editor.EditorDescriptor

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.