public abstract class AbstractTextRendering extends AbstractTableRendering
Clients should subclass from this class if they wish to provide a table text rendering with a specific code page.
PROPERTY_COL_SIZE, PROPERTY_ROW_SIZE, PROPERTY_SELECTED_ADDRESS, PROPERTY_TOP_ADDRESS
Constructor and Description |
---|
AbstractTextRendering(String renderingId)
Constructs a text rendering of the specified type.
|
AbstractTextRendering(String renderingId,
String codePage)
Constructs a text rendering of the specified type on the given
code page.
|
Modifier and Type | Method and Description |
---|---|
byte[] |
getBytes(String dataType,
BigInteger address,
MemoryByte[] currentValues,
String data)
Returns bytes for the given text corresponding to bytes at the given
address for the specified rendering type.
|
String |
getCodePage()
Returns the current code page used by this rendering.
|
String |
getString(String dataType,
BigInteger address,
MemoryByte[] data)
Returns text for the given memory bytes at the specified address for the specified
rendering type.
|
void |
setCodePage(String codePage)
Sets the code page for this rendering.
|
becomesHidden, becomesVisible, createActions, createControl, createToolTipControl, displayError, displayTable, dispose, fillContextMenu, format, getAdapter, getAddressableSize, getAddressableUnitPerColumn, getAddressableUnitPerLine, getBytesPerColumn, getBytesPerLine, getColorProviderAdapter, getControl, getFontProviderAdapter, getLabel, getLabelProviderAdapter, getNumCharsPerByte, getSelectedAddress, getSelectedAsBytes, getSelectedAsString, getTablePresentationAdapter, getTableViewer, getToolTipText, goToAddress, isDisplayingError, propertyChange, refresh, reset, resetRendering, resizeColumnsToPreferredSize, toolTipAboutToShow, updateLabels, updateRenderingLabel
activated, addPropertyChangeListener, createPopupMenu, deactivated, decorateImage, decorateLabel, firePropertyChangedEvent, getImage, getMemoryBlock, getMemoryRenderingContainer, getPopupMenuManager, getRenderingId, init, isVisible, removePropertyChangeListener
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
activated, addPropertyChangeListener, deactivated, getImage, getMemoryBlock, getRenderingId, init, removePropertyChangeListener
public AbstractTextRendering(String renderingId)
renderingId
- memory rendering type identifierpublic void setCodePage(String codePage)
codePage
- the name of a supported
charset
, for
example CP1252
public String getCodePage()
public String getString(String dataType, BigInteger address, MemoryByte[] data)
AbstractTableRendering
getString
in class AbstractTableRendering
dataType
- rendering type identifieraddress
- address where the bytes belong todata
- the bytesnull
.
Returns a string to pad the cell if the memory cannot be converted
successfully.public byte[] getBytes(String dataType, BigInteger address, MemoryByte[] currentValues, String data)
AbstractTableRendering
null
if the bytes cannot be formatted properly.getBytes
in class AbstractTableRendering
dataType
- rendering type identifieraddress
- address the bytes begin atcurrentValues
- current values of the data in bytes formatdata
- the string to be converted to bytes
Copyright (c) 2000, 2015 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.