public abstract class ElementListViewer extends ViewerRoot
ViewerRoot.CreationFlags
Constructor and Description |
---|
ElementListViewer(ViewerCreateData vcd)
Creates a new ElementListViewer.
|
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.
|
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.
|
boolean |
getScrollableTracksViewportWidth()
Determines if the width of the viewport should match the width of the
main panel when there is a scrollable main.
|
int |
getScrollableUnitIncrement(Rectangle visibleRect,
int orientation,
int direction)
Gets the unit increment when there is a scrollable main without a single
scrollable child.
|
void |
paintMainView(Graphics2D g,
JPanel paintPanel)
Paints the root viewer panel.
|
void |
setSelectionViewValue(DebugContext context,
boolean isReset)
Changes the value in the selection viewer based on the current selected
index.
|
void |
updateGui()
Updates the gui.
|
void |
updateState(ViewerValueData valueData,
ViewerUpdateData data,
DebugContext context)
Updates the view state.
|
createBorder, createBorder, createFixedBorder, createFixedBorder, getColumnHeader, getMainPanel, getRowHeader, getScrollableBlockIncrement, getScrollableTracksViewportHeight, getVIData, isViewerTransparent, toXML, update
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getInfo, getPriority, getViewName
public ElementListViewer(ViewerCreateData vcd)
vcd
- viewer creation data.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 Dimension getMainSize()
getMainSize
in class ViewerRoot
public String getMainToolTipText(MouseEvent e)
getMainToolTipText
in class ViewerRoot
e
- the event which triggered the tool tip.public boolean getScrollableTracksViewportWidth()
getScrollableTracksViewportWidth
in class ViewerRoot
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 g, JPanel paintPanel)
paintMainView
in class ViewerRoot
g
- the graphics to be used for painting.paintPanel
- the panel to be painted.public void setSelectionViewValue(DebugContext context, boolean isReset)
context
- the current debug context.isReset
- true if the current value should be considered a "new"
value, false otherwise.public void updateGui()
updateGui
in class ViewerRoot
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.