public abstract class StringTableView extends ViewerRoot
ViewerRoot.CreationFlags
Constructor and Description |
---|
StringTableView()
Creates a new StringTableView.
|
Modifier and Type | Method and Description |
---|---|
void |
build(ViewerInitData vid,
Element initDataIn)
Builds the viewer non-gui internals.
|
void |
buildGui(JPanel mainPanel)
Builds the user interface.
|
void |
configure()
Configures the viewer.
|
boolean |
contains(JComponent comp,
int x,
int y)
Determines if a point on the view is clickable.
|
void |
destroy()
Called when the viewer is closed or frozen.
|
JComponent |
getColumnHeader()
Gets the column header.
|
Dimension |
getMainSize()
Gets the default size for the main panel when on the canvas, if this
needs to be different from the preferred size.
|
String |
getMainToolTipText(MouseEvent e)
Gets the tool tip text for the main window.
|
JComponent |
getRowHeader()
Gets the row header.
|
int |
getScrollableBlockIncrement(Rectangle visibleRect,
int orientation,
int direction)
Gets the block increment when there is a scrollable main without a
single scrollable child.
|
int |
getScrollableUnitIncrement(Rectangle visibleRect,
int orientation,
int direction)
Gets the unit increment when there is a scrollable main without a single
scrollable child.
|
protected void |
init(Element e)
Initializes the viewer.
|
void |
paintMainView(Graphics2D graphics,
JPanel paintPanel)
Paints the root viewer panel.
|
boolean |
toXML(Document doc,
Element e)
Stores the state of the viewer in an XML dom element.
|
abstract void |
update(ViewerValueData valueData,
ViewerUpdateData data,
DebugContext context,
int rowOffset,
int colOffset,
int numRowsShown,
int numColsShown,
int selectedRow,
int selectedCol,
String[][] textOut,
Value[][] valuesOut,
int[] rowsOut,
int[] colsOut,
String[] errorOut)
Updates the viewer.
|
void |
updateState(ViewerValueData valueData,
ViewerUpdateData data,
DebugContext context)
Updates the view state.
|
createBorder, createBorder, createFixedBorder, createFixedBorder, getMainPanel, getScrollableTracksViewportHeight, getScrollableTracksViewportWidth, getVIData, isViewerTransparent, update, updateGui
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getInfo, getPriority, getViewName
public void build(ViewerInitData vid, Element initDataIn)
build
in interface Viewer
build
in class ViewerRoot
vid
- initialization and control element for the viewer.initDataIn
- XML initialization data for the viewer.public void buildGui(JPanel mainPanel)
buildGui
in class ViewerRoot
mainPanel
- the root panel for the UI. This will be an empty JPanel with
no layout manager set.public void configure()
configure
in class ViewerRoot
public boolean contains(JComponent comp, int x, int y)
contains
in class ViewerRoot
comp
- the main panel. This method is only called if
comp.super.contains(x, y) returned true.x
- x position of the point of interest.y
- y position of the point of interest.public void destroy()
public JComponent getColumnHeader()
getColumnHeader
in class ViewerRoot
public Dimension getMainSize()
getMainSize
in class ViewerRoot
public String getMainToolTipText(MouseEvent e)
getMainToolTipText
in class ViewerRoot
e
- the event which triggered the tool tip.public JComponent getRowHeader()
getRowHeader
in class ViewerRoot
public int getScrollableBlockIncrement(Rectangle visibleRect, int orientation, int direction)
getScrollableBlockIncrement
in class ViewerRoot
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 int getScrollableUnitIncrement(Rectangle visibleRect, int orientation, int direction)
getScrollableUnitIncrement
in class ViewerRoot
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 void paintMainView(Graphics2D graphics, JPanel paintPanel)
paintMainView
in class ViewerRoot
graphics
- the graphics to be used for painting.paintPanel
- the panel to be painted.public boolean toXML(Document doc, Element e)
toXML
in interface Viewer
toXML
in class ViewerRoot
doc
- the document to which the element applies.e
- the element to be populated.public abstract void update(ViewerValueData valueData, ViewerUpdateData data, DebugContext context, int rowOffset, int colOffset, int numRowsShown, int numColsShown, int selectedRow, int selectedCol, String[][] textOut, Value[][] valuesOut, int[] rowsOut, int[] colsOut, String[] errorOut) throws ViewerException
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.rowOffset
- the current display row offset (first row shown).colOffset
- the current display column offset (first column shown).numRowsShown
- the number of rows shown.numColsShown
- the number of columns shown.selectedRow
- index of the selected row minus the row offset, or -1
if there is no selection.selectedCol
- index of the selected column minus the column offset,
or -1 if there is no selection.rowsOut
- the number of available rows must be returned in the first
element of this array.colsOut
- the number of available columns must be returned in the
first element of this array.textOut
- an array to be filled with the display text for each item
shown. Items that don't exist must be left null.valuesOut
- an array to be filled with the value for each item
shown. Items that don't exist should be left null.errorOut
- any error messages should be returned in the first
element of this array. If the first element is non-null after this call,
the error message will be displayed instead of the values.ViewerException
- if an exception is encountered.public void updateState(ViewerValueData valueData, ViewerUpdateData data, DebugContext context) throws ViewerException
updateState
in class ViewerRoot
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.protected void init(Element e)
e
- XML initialization data.