public abstract class SimplePresentationArrayView extends PresentationView<PresentationView.Settings>
PresentationView.MainRoot, PresentationView.Settings, PresentationView.SizeLimitDialog
ANIMATE, CCW, REVERSIBLE, ROUND, VERTICAL
Constructor and Description |
---|
SimplePresentationArrayView(ViewerCreateData vcd,
boolean standAloneIn)
Creates a new SimplePresentationArrayView.
|
Modifier and Type | Method and Description |
---|---|
void |
build(ViewerInitData vid,
Element initDataIn)
Builds the viewer non-gui internals.
|
void |
changeSizeLimit()
Changes a structure size limit imposed by the PresentationView subclass.
|
void |
configure()
Called when settings that may affect the layout of nodes in the view
have changed.
|
PresentationView.Settings |
createGlobalSettings()
Creates a global settings object for the viewer.
|
JPanel |
createGui() |
void |
destroy()
Called when the viewer is closed or frozen.
|
boolean |
elementUsed(Value value,
Value elementValue,
int index,
DebugContext context)
Determines if an element is "used".
|
String |
getArrayField()
Gets the name of the field that contains the array, if there is one.
|
List<String> |
getDisplayFields()
Gets the names of fields that this view should display.
|
String |
getElementText(Value value,
Value elementValue,
int index,
DebugContext context)
Gets the display text for an element value.
|
List<IndexItem> |
getIndexes(Value value,
String indexExpressions,
List<IndexItem> previousIndexes,
ViewerUpdateData data,
DebugContext context)
Gets data on indexes to display.
|
int |
getPriority(ViewerPriorityData vpd)
Gets the viewer priority.
|
int |
getScrollableUnitIncrement(Rectangle visibleRect,
int orientation,
int direction)
Gets the unit increment when there is a scrollable main without a single
scrollable child.
|
PresentationView.Settings |
getSettingsCopy(PresentationView.Settings settingsIn)
Creates a copy of settings.
|
abstract int |
getSize(Value value,
DebugContext context)
Gets the number of elements.
|
abstract Value |
getValue(Value value,
int index,
DebugContext context)
Gets an element at a particular index.
|
String |
getViewName()
Gets the display name of the viewer.
|
boolean |
noSimpleForPrimitives()
Determines if the simple toggle should be shown when values are
primitives.
|
void |
paintMainView(Graphics graphics) |
boolean |
toXML(Document doc,
Element e)
Stores the state of the viewer in an XML dom element.
|
jgrasp.viewer.presentation.SimplePresentationArrayView.UpdateResult |
update(Value value,
Type declaredType,
String indexExpressions,
ViewerUpdateData data,
DebugContext context,
String expr,
jgrasp.viewer.presentation.SimplePresentationArrayView.UpdateResult previousData)
Gets the new structural data.
|
void |
update(ViewerValueData valueData,
ViewerUpdateData data,
DebugContext context)
Updates the viewer.
|
void |
updateGui() |
addToolBarButton, animate, getAnimateDelay, getCurrentSettings, getElementChars, getElementWidth, getNewSizeLimit, getPerClassSettings, getRefSettings, init, isEmbedded, isReversed, isRound, isSimple, isVertical, isViewerTransparent, scaleFont, setError, setLabelLocation, setSelectionViewValue, setSizeLabelText, setValuesAreObjects, showEmbedded, showReversed, showRound, showSimple, showVertical, sizeLimitExceeded, valuesAreObjects
public SimplePresentationArrayView(ViewerCreateData vcd, boolean standAloneIn)
vcd
- creation data.standAloneIn
- true if this viewer will be used alone, false if its
gui will be updated manually.public void build(ViewerInitData vid, Element initDataIn)
build
in interface Viewer
build
in class PresentationView<PresentationView.Settings>
vid
- initialization and control element for the viewer.initDataIn
- XML initialization data for the viewer.public void changeSizeLimit()
sizeLimitExceeded()
is called, this
method must be overridden.changeSizeLimit
in class PresentationView<PresentationView.Settings>
public void configure()
PresentationView
configure
in class PresentationView<PresentationView.Settings>
public PresentationView.Settings createGlobalSettings()
createGlobalSettings
in class PresentationView<PresentationView.Settings>
public JPanel createGui()
createGui
in class PresentationView<PresentationView.Settings>
public void destroy()
public boolean elementUsed(Value value, Value elementValue, int index, DebugContext context) throws ViewerException
value
- the current value being viewed.elementValue
- the element value of interest.index
- the index of the element of interest.context
- the current debugger context.ViewerException
- if any exceptions are occur and are not caught
while using jgrdi.public String getArrayField()
public List<String> getDisplayFields()
public String getElementText(Value value, Value elementValue, int index, DebugContext context) throws ViewerException
value
- the current value being viewed.elementValue
- the element value of interest.index
- index of the element value of interest.context
- the current debugger context.ViewerException
- if any exceptions are occur and are not caught
while using jgrdi.public List<IndexItem> getIndexes(Value value, String indexExpressions, List<IndexItem> previousIndexes, ViewerUpdateData data, DebugContext context) throws ViewerException
value
- the current value being viewed.indexExpressions
- the index expressions, separated by hashes (#),
or null if there are none.previousIndexes
- the previous indexes, or null if there were none.data
- the viewer update data.context
- the current debugger context.ViewerException
- if any exceptions are occur and are not caught
while using jgrdi.public int getPriority(ViewerPriorityData vpd)
vpd
- data about how the viewer will be used.Integer.MIN_VALUE
indicates that the viewer
dialog or canvas should change viewers.public int getScrollableUnitIncrement(Rectangle visibleRect, int orientation, int direction)
getScrollableUnitIncrement
in class PresentationView<PresentationView.Settings>
visibleRect
- the main panel visible rect.orientation
- the scroll direction, one of
SwingConstants.VERTICAL
and SwingConstants.HORIZONTAL
.direction
- negative for a left or up scroll, positive for a right
or down scroll.public PresentationView.Settings getSettingsCopy(PresentationView.Settings settingsIn)
getSettingsCopy
in class PresentationView<PresentationView.Settings>
settingsIn
- the settings to be copied.public abstract int getSize(Value value, DebugContext context) throws ViewerException
value
- the current value being viewed.context
- the current debugger context.ViewerException
- if any exceptions are occur and are not caught
while using jgrdi.public abstract Value getValue(Value value, int index, DebugContext context) throws ViewerException
value
- the current value being viewed.index
- the index of the element interest.context
- the current debugger context.index
.ViewerException
- if any exceptions are occur and are not caught
while using jgrdi.public String getViewName()
public boolean noSimpleForPrimitives()
Overridden to return true.
noSimpleForPrimitives
in class PresentationView<PresentationView.Settings>
public void paintMainView(Graphics graphics)
public boolean toXML(Document doc, Element e)
toXML
in interface Viewer
toXML
in class PresentationView<PresentationView.Settings>
doc
- the document to which the element applies.e
- the element to be populated.public jgrasp.viewer.presentation.SimplePresentationArrayView.UpdateResult update(Value value, Type declaredType, String indexExpressions, ViewerUpdateData data, DebugContext context, String expr, jgrasp.viewer.presentation.SimplePresentationArrayView.UpdateResult previousData) throws ViewerException
value
- the new value.declaredType
- the actual declared type of the value.indexExpressions
- index expressions separated by hashes (#), or
null if there are none.data
- the update data.context
- the current debugger context.expr
- the expression, if this is a by-name viewer, null otherwise.previousData
- data from the previous update, or null if there was
no previous update.ViewerException
- if an error is encountered.public void update(ViewerValueData valueData, ViewerUpdateData data, DebugContext context) throws ViewerException
Viewer
valueData
- the new value and associated information, such as
declared type. This will be null for animation updates.data
- information about this update, such as why it was triggered,
and if it was triggered by a flagged method entry, the method argument
values.context
- debugger context that is necessary for working with
values, and provides some global debugger access. This will be null for
animation updates.ViewerException
- if an exception is encountered.public void updateGui()
updateGui
in class PresentationView<PresentationView.Settings>