public abstract class ScanPanel2<GS extends GenericScanner2,SC extends ScanController<GS>> extends AbstractPanel
Modifier and Type | Class and Description |
---|---|
protected static class |
ScanPanel2.Location |
JPanel.AccessibleJPanel
JComponent.AccessibleJComponent
Container.AccessibleAWTContainer
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor and Description |
---|
ScanPanel2(String prefix,
ImageIcon icon,
SC controller)
Constructs a
ScanPanel2 with the given message resources prefix, tab icon and scan
controller. |
ScanPanel2(String prefix,
ImageIcon icon,
SC controller,
AbstractParam scanParam)
Deprecated.
(2.6.0) Use
ScanPanel2(String, ImageIcon, ScanController) instead. |
Modifier and Type | Method and Description |
---|---|
protected int |
addToolBarElements(JToolBar toolBar,
ScanPanel2.Location location,
int gridX)
Adds elements to the tool bar.
|
void |
clearFinishedScans() |
protected SC |
getController() |
protected GridBagConstraints |
getGBC(int gridx,
int gridy) |
protected GridBagConstraints |
getGBC(int gridx,
int gridy,
double weightx,
Insets insets) |
protected abstract JButton |
getNewScanButton() |
protected abstract int |
getNumberOfScansToShow() |
protected JToggleButton |
getPauseScanButton() |
protected JProgressBar |
getProgressBar() |
protected JComboBox<org.zaproxy.zap.view.ScanPanel2.ScanEntry<GS>> |
getProgressSelect() |
GS |
getSelectedScanner() |
protected JButton |
getStopScanButton() |
protected abstract Component |
getWorkPanel() |
protected boolean |
hasOptionsButton()
Tells whether or not the tool bar should have a button to open the Options dialogue.
|
void |
reset() |
void |
scanFinshed(int id,
String host) |
void |
scannerStarted(GS scanner) |
void |
scanProgress(int id,
String host,
int progress,
int maximum) |
void |
sessionModeChanged(Control.Mode mode) |
void |
sessionScopeChanged(Session session) |
protected abstract void |
switchView(GS scanner) |
void |
trimProgressList() |
protected void |
unload() |
void |
updateScannerUI() |
getDefaultAccelerator, getIcon, getMnemonic, getTabIndex, isHideable, isLocked, isPinned, isShowByDefault, isTabVisible, setDefaultAccelerator, setHideable, setIcon, setLocked, setMnemonic, setParent, setPinned, setShowByDefault, setTabFocus, setTabIndex, tabSelected
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
@Deprecated public ScanPanel2(String prefix, ImageIcon icon, SC controller, AbstractParam scanParam)
ScanPanel2(String, ImageIcon, ScanController)
instead.ScanPanel2
with the given message resources prefix, tab icon and scan
controller.prefix
- the prefix for the resource messagesicon
- the icon for the tab of the panelcontroller
- the scan controllerscanParam
- unusedpublic ScanPanel2(String prefix, ImageIcon icon, SC controller)
ScanPanel2
with the given message resources prefix, tab icon and scan
controller.prefix
- the prefix for the resource messagesicon
- the icon for the tab of the panelcontroller
- the scan controllerprotected GridBagConstraints getGBC(int gridx, int gridy)
protected GridBagConstraints getGBC(int gridx, int gridy, double weightx, Insets insets)
protected boolean hasOptionsButton()
Returns true
by default.
true
if the panel's tool bar should have an options button, false
otherwise.addToolBarElements(JToolBar, Location, int)
protected int addToolBarElements(JToolBar toolBar, ScanPanel2.Location location, int gridX)
ScanPanel2.Location
enumeration. Should be overridden by all subclasses
that want to add new elements to the ScanPanel's tool bar.
The tool bar uses a GridBagLayout
, so elements have to be added with a GridBagConstraints
. For this, the getGBC
methods can be used. The gridX
parameter specifies the cell (as used in GridBagConstraints.gridx
) of the current row
where the elements can be added.
The method must return the new coordinates of the current cell, after the elements have been added.
Note: A button is added at the end of the tool bar to show the Options
dialogue, unless hasOptionsButton()
returns false
. The name of the options
panel to show is obtained from the resource message with the key prefix +
".options.title"
.
toolBar
- the tool barlocation
- the current location where elements will be addedgridX
- the x coordinates of the current cell in the GridBagLayout
getGBC(int, int)
,
getGBC(int, int, double, Insets)
,
GridBagConstraints
,
GridBagLayout
protected JProgressBar getProgressBar()
protected JButton getStopScanButton()
protected JToggleButton getPauseScanButton()
public void clearFinishedScans()
public GS getSelectedScanner()
protected JComboBox<org.zaproxy.zap.view.ScanPanel2.ScanEntry<GS>> getProgressSelect()
public void updateScannerUI()
public void scanFinshed(int id, String host)
public void scanProgress(int id, String host, int progress, int maximum)
public void scannerStarted(GS scanner)
public void trimProgressList()
public void reset()
public void sessionScopeChanged(Session session)
public void sessionModeChanged(Control.Mode mode)
protected void unload()
protected SC getController()
protected abstract Component getWorkPanel()
protected abstract void switchView(GS scanner)
protected abstract JButton getNewScanButton()
protected abstract int getNumberOfScansToShow()