sysperfana/perfinvestigator/com.nokia.carbide.cpp.pi.perfcounters/src/com/nokia/carbide/cpp/pi/internal/perfcounters/PecLegendContentProvider.java
changeset 5 844b047e260d
equal deleted inserted replaced
4:615035072f7e 5:844b047e260d
       
     1 /*
       
     2  * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
       
     3  * All rights reserved.
       
     4  * This component and the accompanying materials are made available
       
     5  * under the terms of the License "Eclipse Public License v1.0"
       
     6  * which accompanies this distribution, and is available
       
     7  * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8  *
       
     9  * Initial Contributors:
       
    10  * Nokia Corporation - initial contribution.
       
    11  *
       
    12  * Contributors:
       
    13  *
       
    14  * Description: 
       
    15  *
       
    16  */
       
    17 
       
    18 package com.nokia.carbide.cpp.pi.internal.perfcounters;
       
    19 
       
    20 import org.eclipse.jface.viewers.IStructuredContentProvider;
       
    21 import org.eclipse.jface.viewers.Viewer;
       
    22 
       
    23 /**
       
    24  * Performance Counter Legend: ContentProvider for TableViewer 
       
    25  */
       
    26 public class PecLegendContentProvider implements IStructuredContentProvider {
       
    27 
       
    28 	private PecTrace trace;
       
    29 
       
    30 
       
    31     /**
       
    32      * SimpleListContentProvider constructor comment.
       
    33      * @param trace The trace model
       
    34      */
       
    35     public PecLegendContentProvider(PecTrace trace) {
       
    36         super();
       
    37         this.trace = trace;
       
    38     }
       
    39 
       
    40     /* (non-Javadoc)
       
    41      * @see org.eclipse.jface.viewers.IContentProvider#dispose()
       
    42      */
       
    43     public void dispose() {
       
    44     	//Do nothing when disposing,
       
    45     }
       
    46 
       
    47     /* (non-Javadoc)
       
    48      * @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object)
       
    49      */
       
    50     public Object[] getElements(Object inputElement) {
       
    51         return trace.getLegendElements();
       
    52     }
       
    53 
       
    54 
       
    55     /* (non-Javadoc)
       
    56      * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
       
    57      */
       
    58     public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
       
    59     	//we don't expect the input to change during the lifetime of this object
       
    60     }
       
    61 
       
    62 	
       
    63 }
       
    64