Coverage Report - org.openpermis.editor.policy.gui.dock.EditorFactory
 
Classes in this File Line Coverage Branch Coverage Complexity
EditorFactory
0%
0/5
N/A
1
 
 1  
 /*
 2  
  * Copyright (c) 2009, Swiss Federal Department of Defence Civil Protection and Sport
 3  
  *                     (http://www.vbs.admin.ch)
 4  
  * Copyright (c) 2009, Ergon Informatik AG (http://www.ergon.ch)
 5  
  * All rights reserved.
 6  
  *
 7  
  * Licensed under the Open Permis License which accompanies this distribution,
 8  
  * and is available at http://www.openpermis.org/BSDlicenceKent.txt
 9  
  */
 10  
 package org.openpermis.editor.policy.gui.dock;
 11  
 
 12  
 
 13  
 import bibliothek.gui.dock.common.MultipleCDockableFactory;
 14  
 
 15  
 
 16  
 /**
 17  
  * Factory for {@link EditorDockable editor dockables}.
 18  
  * <p>This factory is used to restore editor dockables from an {@link EditorLayout}.</p>
 19  
  * <p>At the moment editor layouts are not stored and therefore the factory is only
 20  
  * used to create new anonymous editor dockables.</p>
 21  
  * @since 0.1.0
 22  
  */
 23  0
 public class EditorFactory
 24  
         implements MultipleCDockableFactory<EditorDockable, EditorLayout>
 25  
 {
 26  
 
 27  
         //---- Methods
 28  
         
 29  
         /**
 30  
          * Creates a new, uninitialized editor dockable.
 31  
          * @since 0.1.0
 32  
          */
 33  
         public EditorDockable createDockable () {
 34  0
                 return new EditorDockable(this, null);
 35  
         }
 36  
 
 37  
         
 38  
         //---- MultipleCDockableFactory
 39  
 
 40  
         /**
 41  
          * @since 0.1.0
 42  
          */
 43  
         public EditorLayout create () {
 44  0
                 return new EditorLayout();
 45  
         }
 46  
 
 47  
         /**
 48  
          * @since 0.1.0
 49  
          */
 50  
         public EditorDockable read (EditorLayout layout) {
 51  0
                 return createDockable();
 52  
         }
 53  
 
 54  
         /**
 55  
          * @since 0.1.0
 56  
          */
 57  
         public EditorLayout write (EditorDockable dockable) {
 58  0
                 return new EditorLayout();
 59  
         }
 60  
 
 61  
 }