core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/extension/IPortalPageLayer.java
changeset 1734 bf670d38123a
parent 1721 18638adda547
equal deleted inserted replaced
1729:f77f2721ad5a 1734:bf670d38123a
    14 * Description: 
    14 * Description: 
    15 *
    15 *
    16 */
    16 */
    17 package com.nokia.carbide.internal.discovery.ui.extension;
    17 package com.nokia.carbide.internal.discovery.ui.extension;
    18 
    18 
    19 import org.eclipse.jface.action.IAction;
       
    20 import org.eclipse.swt.widgets.Composite;
    19 import org.eclipse.swt.widgets.Composite;
    21 import org.eclipse.swt.widgets.Control;
    20 import org.eclipse.swt.widgets.Control;
    22 import org.eclipse.ui.IEditorPart;
    21 import org.eclipse.ui.IEditorPart;
    23 
    22 
    24 /**
    23 /**
    25  * Interface to a portal page layer extension
    24  * Interface to a portal page layer extension
    26  */
    25  */
    27 public interface IPortalPageLayer {
    26 public interface IPortalPageLayer extends ICommandBarFactory {
    28 
       
    29 	/**
       
    30 	 * Interface to an action/navigation bar for the portal portal page layer
       
    31 	 */
       
    32 	public interface IActionBar {
       
    33 		
       
    34 		/**
       
    35 		 * Required title for the action bar
       
    36 		 * @return String
       
    37 		 */
       
    38 		String getTitle();
       
    39 		
       
    40 		/**
       
    41 		 * Actions shown in the action bar:
       
    42 		 * Required: text and run() methods
       
    43 		 * Optional: tool tip text
       
    44 		 * Unused: image/check
       
    45 		 * @return IAction
       
    46 		 */
       
    47 		IAction[] getActions();
       
    48 		
       
    49 		/**
       
    50 		 * Action ids for actions that should be emphasized in the action bar (e.g., bold font)
       
    51 		 * @return String[] or null
       
    52 		 */
       
    53 		String[] getHighlightedActionIds();
       
    54 
       
    55 	}
       
    56 	
       
    57 	/**
       
    58 	 * Interface allowing the UI for provided actions of an IActionBar to be updated (e.g., enabled state)
       
    59 	 */
       
    60 	public interface IActionUIUpdater {
       
    61 		
       
    62 		/**
       
    63 		 * Update the UI for a specific action by id
       
    64 		 * @param actionId
       
    65 		 */
       
    66 		void update(String actionId);
       
    67 		
       
    68 		/**
       
    69 		 * Update the UI for all actions in the IActionBar
       
    70 		 */
       
    71 		void updateAll();
       
    72 		
       
    73 	}
       
    74 
    27 
    75 	/**
    28 	/**
    76 	 * Called to create the control for the portal page layer
    29 	 * Called to create the control for the portal page layer
    77 	 * @param parent Composite
    30 	 * @param parent Composite
    78 	 * @param part IEditorPart
    31 	 * @param part IEditorPart
    84 	 * Called to initialize the portal page layer when shown for the first time
    37 	 * Called to initialize the portal page layer when shown for the first time
    85 	 */
    38 	 */
    86 	void init();
    39 	void init();
    87 	
    40 	
    88 	/**
    41 	/**
    89 	 * Return action bars for the portal page layer
       
    90 	 * @param part IEditorPart
       
    91 	 * @param updater IActionUIUpdater
       
    92 	 * @return IActionBar[]
       
    93 	 */
       
    94 	IActionBar[] createCommandBars(IEditorPart part, IActionUIUpdater updater);
       
    95 	
       
    96 	/**
       
    97 	 * Called to dispose internal resources of the portal page layer
    42 	 * Called to dispose internal resources of the portal page layer
    98 	 */
    43 	 */
    99 	void dispose();
    44 	void dispose();
   100 }
    45 }