Coverage Report - org.openpermis.editor.policy.view.Tool
 
Classes in this File Line Coverage Branch Coverage Complexity
Tool
N/A
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.view;
 11  
 
 12  
 import javax.swing.JToolBar;
 13  
 
 14  
 import bibliothek.gui.dock.common.CLocation;
 15  
 
 16  
 import org.openpermis.editor.policy.presenter.PolicyContext;
 17  
 import org.openpermis.policy.bean.PolicyBean;
 18  
 
 19  
 /**
 20  
  * Extended view interface for tool views.
 21  
  * <p>Tool views are unique views that are typically displayed at the side of the
 22  
  * working area and display generic information like search results, filtered trees
 23  
  * and other non-editable information.</p>
 24  
  * @since 0.1.0
 25  
  */
 26  
 public interface Tool
 27  
         extends View
 28  
 {
 29  
 
 30  
         /**
 31  
          * Instructs the tool to refresh itself with the specified policy.
 32  
          * <p>Called whenever the policy that this view renders changes.</p>
 33  
          * @param policy the policy to refresh with.
 34  
          * @param context the policy context to use.
 35  
          * @since 0.1.0
 36  
          */
 37  
         public void refresh (PolicyBean policy, PolicyContext context);
 38  
 
 39  
         /**
 40  
          * Returns a unique identifier for this tool view.
 41  
          * @return a unique identifier for this tool view.
 42  
          * @since 0.1.0
 43  
          */
 44  
         public String getToolIdentifier ();
 45  
 
 46  
         /**
 47  
          * Returns the tool bar of this tool view.
 48  
          * @return the tool bar of this tool view.
 49  
          * @since 0.1.0
 50  
          */
 51  
         public JToolBar getToolBar ();
 52  
 
 53  
         /**
 54  
          * Returns the desired default location relative to the working area for this tool view.
 55  
          * @return the desired default location of this tool view.
 56  
          * @since 0.1.0
 57  
          */
 58  
         public CLocation getDefaultLocation ();
 59  
 
 60  
 }