d6bc3cf32ad07dde367a124025401544d0861563
1 /*******************************************************************************
2 * Copyright (c) 2011, 2012 Ericsson
4 * All rights reserved. This program and the accompanying materials are
5 * made available under the terms of the Eclipse Public License v1.0 which
6 * accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
10 * Mathieu Denis <mathieu.denis@polymtl.ca> - Initial API
11 *******************************************************************************/
13 package org
.eclipse
.linuxtools
.tmf
.ui
.viewers
.statistics
.model
;
15 import org
.eclipse
.jface
.viewers
.ITreeContentProvider
;
16 import org
.eclipse
.jface
.viewers
.Viewer
;
19 * Adapter TreeViewers can use to interact with StatisticsTreeNode objects.
23 * @author Mathieu Denis
24 * @see org.eclipse.jface.viewers.ITreeContentProvider
26 public class TmfTreeContentProvider
implements ITreeContentProvider
{
31 * @see org.eclipse.jface.viewers.ITreeContentProvider#getChildren(java.lang.Object)
34 public Object
[] getChildren(Object parentElement
) {
35 return ((TmfStatisticsTreeNode
) parentElement
).getChildren().toArray();
41 * @see org.eclipse.jface.viewers.ITreeContentProvider#getParent(java.lang.Object)
44 public Object
getParent(Object element
) {
45 return ((TmfStatisticsTreeNode
) element
).getParent();
51 * @see org.eclipse.jface.viewers.ITreeContentProvider#hasChildren(java.lang.Object)
54 public boolean hasChildren(Object element
) {
55 return ((TmfStatisticsTreeNode
) element
).hasChildren();
61 * @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object)
64 public Object
[] getElements(Object inputElement
) {
65 return getChildren(inputElement
);
71 * @see org.eclipse.jface.viewers.IContentProvider#dispose()
74 public void dispose() {
80 * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
83 public void inputChanged(Viewer viewer
, Object oldInput
, Object newInput
) {
This page took 0.033183 seconds and 5 git commands to generate.