KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > debug > internal > ui > views > memory > MemoryRenderingViewTabFactory


1 /*******************************************************************************
2  * Copyright (c) 2004 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Common Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/cpl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.debug.internal.ui.views.memory;
12
13 import org.eclipse.debug.core.model.IMemoryBlock;
14 import org.eclipse.debug.internal.core.memory.IMemoryRendering;
15 import org.eclipse.jface.action.MenuManager;
16 import org.eclipse.swt.widgets.TabItem;
17
18 /**
19  * Implementation of IMemoryViewTabFactory for default
20  * renderings.
21  * For plugins that wishes to make use of this factory to create a new rendering and display
22  * data in table format, a renderer must be defined for the new rendering.
23  * MemoryViewTab's label provider will make use of the renderer to convert bytes to string
24  * and vice versa. MemoryViewTab does not work without having a renderer defined.
25  *
26  * @since 3.0
27  */

28 public class MemoryRenderingViewTabFactory
29     implements IMemoryViewTabFactory {
30
31     /* (non-Javadoc)
32      * @see org.eclipse.debug.ui.IMemoryViewTabFactory#createViewTab(org.eclipse.debug.core.model.IMemoryBlock, org.eclipse.swt.widgets.TabItem, org.eclipse.jface.action.MenuManager, java.lang.String)
33      */

34     public IMemoryViewTab createViewTab(
35         IMemoryBlock newMemory,
36         TabItem newTab,
37         MenuManager menuMgr,
38         IMemoryRendering rendering, AbstractMemoryRenderer renderer) {
39         return new MemoryViewTab(newMemory, newTab, menuMgr, rendering, renderer);
40     }
41
42 }
43
Popular Tags