KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > debug > ui > memory > MemoryRenderingElement


1 /*******************************************************************************
2  * Copyright (c) 2005 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
12 package org.eclipse.debug.ui.memory;
13
14 import java.math.BigInteger JavaDoc;
15
16 import org.eclipse.debug.core.model.MemoryByte;
17
18 /**
19  * A memory rendering element represents a set of memory bytes being
20  * rendered in a memory rendering. Instances of this class are passed
21  * to a rendering's label provider, color provider, and font provider
22  * to be rendered.
23  * <p>
24  * Clients may instantiate this class. Clients may subclass this class to add
25  * other members / settings as required by a rendering.
26  * </p>
27  * @since 3.1
28  */

29 public class MemoryRenderingElement {
30     private IMemoryRendering fRendering;
31     private BigInteger JavaDoc fAddress;
32     private MemoryByte[] fBytes;
33     
34     /**
35      * Constructs a new memory rendering element for the given rendering
36      * and specified bytes.
37      *
38      * @param rendering the rendering containing the memory block being rendered
39      * @param address the address at which the rendering is taking place
40      * @param bytes the memory bytes being rendered
41      */

42     public MemoryRenderingElement(IMemoryRendering rendering, BigInteger JavaDoc address, MemoryByte[] bytes)
43     {
44         fRendering = rendering;
45         fAddress = address;
46         fBytes = bytes;
47     }
48     
49     /**
50      * Returns the memory rendering in which bytes are being rendered.
51      *
52      * @return the memory rendering in which bytes are being rendered
53      */

54     public IMemoryRendering getRendering()
55     {
56         return fRendering;
57     }
58     
59     /**
60      * Returns the address at which bytes are being rendered.
61      *
62      * @return the address at which bytes are being rendered
63      */

64     public BigInteger JavaDoc getAddress() {
65         return fAddress;
66     }
67     
68
69     /**
70      * Returns the memory bytes being rendered.
71      *
72      * @return the memory bytes being rendered
73      */

74     public MemoryByte[] getBytes() {
75         return fBytes;
76     }
77 }
78
Popular Tags