KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > debug > internal > ui > memory > provisional > MemoryViewPresentationContext


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

11 package org.eclipse.debug.internal.ui.memory.provisional;
12
13 import org.eclipse.debug.internal.ui.viewers.PartPresentationContext;
14 import org.eclipse.debug.ui.memory.IMemoryRendering;
15 import org.eclipse.debug.ui.memory.IMemoryRenderingContainer;
16 import org.eclipse.debug.ui.memory.IMemoryRenderingSite;
17
18 /**
19  * Presentation context from the Memory View. This presentation provides additional
20  * information regarding the originator of the asynchronous request.
21  *
22  * Clients may reference or subclass from this class.
23  *
24  * @since 3.2
25  *
26  */

27 public class MemoryViewPresentationContext extends PartPresentationContext {
28
29     private IMemoryRenderingContainer fContainer;
30     private IMemoryRendering fRendering;
31     private IMemoryRenderingSite fMemoryView;
32     
33     /**
34      * Constructs MemoryViewPresentationContext
35      * @param site - the memory rendering site that this presentation context is for
36      * @param container - the memory rendering container that this presentation context is for, may be <code>null</code>
37      * @param rendering - - the memory rendering that this presentation context is for, may be <code>null</code>
38      */

39     public MemoryViewPresentationContext(IMemoryRenderingSite site, IMemoryRenderingContainer container, IMemoryRendering rendering) {
40         super(site.getSite().getPart());
41         
42         fMemoryView = site;
43         fContainer = container;
44         fRendering = rendering;
45     }
46     
47     /**
48      * Returns the memory rendering site that this presentation context is for
49      * @return the memory rendering site that this presentation context is for
50      */

51     public IMemoryRenderingSite getMemoryRenderingSite()
52     {
53         return fMemoryView;
54     }
55     
56     /**
57      * Returns the memory rendering container that this presentation context is for
58      * @return the memory rendering container that this presentation context is for, <code>null</code> if none.
59      */

60     public IMemoryRenderingContainer getMemoryRenderingContainer()
61     {
62         return fContainer;
63     }
64     
65     /**
66      * Returns the memory rendering that this presentation context is for
67      * @return the memory rendering that this presentation context is for, <code>null</code> if none.
68      */

69     public IMemoryRendering getRendering()
70     {
71         return fRendering;
72     }
73 }
74
Popular Tags