public class StepVisual
extends javax.swing.JPanel
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
BASE_ICON_PATH
Standard base path for Step icons
|
TOOL_TIP_TEXT_KEY, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW| Modifier and Type | Method and Description |
|---|---|
static StepVisual |
createVisual(StepManagerImpl stepManager)
Create a visual for the step managed by the supplied step manager.
|
static StepVisual |
createVisual(StepManagerImpl stepManager,
javax.swing.ImageIcon icon)
Create a visual for the step managed by the supplied step manager using the
supplied icon.
|
java.awt.Point |
getClosestConnectorPoint(java.awt.Point pt)
Returns the coordinates of the closest "connector" point to the supplied
point.
|
java.lang.String |
getCustomEditorForStep()
Get the fully qualified name of the custom editor (if any) for the step
wrapped in this visual
|
boolean |
getDisplayStepLabel()
Returns true if the step label is to be displayed.
|
java.awt.Image |
getIcon(double scale)
Get the icon for this visual at the given scale factor
|
java.util.Set<java.lang.String> |
getStepInteractiveViewActionNames()
Get a set of fully qualified names of interactive viewers that the wrapped
step provides.
|
javax.swing.JComponent |
getStepInteractiveViewComponent(java.lang.String viewActionName)
Gets an instance of the named step interactive viewer component
|
StepManagerImpl |
getStepManager()
Get the step manager for this visual
|
java.lang.String |
getStepName()
Convenience method for getting the name of the step that this visual wraps
|
int |
getX()
Get the x coordinate of this step on the graphical layout
|
int |
getY()
Get the y coordinate of this step on the graphical layout
|
static javax.swing.ImageIcon |
iconForStep(Step step)
Gets the icon for the supplied
Step. |
static javax.swing.ImageIcon |
loadIcon(java.lang.String iconPath)
Load an icon from the supplied path
|
void |
paintComponent(java.awt.Graphics gx) |
static javax.swing.ImageIcon |
scaleIcon(javax.swing.ImageIcon icon,
double factor)
Scale the supplied icon by the given factor
|
void |
setDisplayConnectors(boolean dc)
Turn on/off the connector points
|
void |
setDisplayConnectors(boolean dc,
java.awt.Color c)
Turn on/off the connector points
|
void |
setStepManager(StepManagerImpl manager)
Set the step manager for this visual
|
void |
setStepName(java.lang.String name)
Convenience method for setting the name of the step that this visual wraps
|
void |
setX(int x)
Set the x coordinate of this step on the graphical layout
|
void |
setY(int y)
Set the y coordinate of this step on the graphical layout
|
getAccessibleContext, getUI, getUIClassID, setUI, updateUIaddAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, 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, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, 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, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, updateadd, add, add, add, add, addContainerListener, 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, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validateaction, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, enable, enableInputMethods, 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, 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, transferFocusUpCyclepublic static final java.lang.String BASE_ICON_PATH
public static StepVisual createVisual(StepManagerImpl stepManager)
KFStep annotation)stepManager - the step manager for the step to create a visual wrapper
forStepVisual that wraps the steppublic static StepVisual createVisual(StepManagerImpl stepManager, javax.swing.ImageIcon icon)
stepManager - the step manager for the step to create a visual wrapper
foricon - the icon to use in the visualStepVisual that wraps the steppublic static javax.swing.ImageIcon iconForStep(Step step)
Step.step - the step to get the icon forpublic static javax.swing.ImageIcon loadIcon(java.lang.String iconPath)
iconPath - the path to load frompublic static javax.swing.ImageIcon scaleIcon(javax.swing.ImageIcon icon,
double factor)
icon - the icon to scalefactor - the factor to scale bypublic java.awt.Image getIcon(double scale)
scale - the factor to scale the icon bypublic java.lang.String getStepName()
public void setStepName(java.lang.String name)
name - the name to set on the steppublic int getX()
getX in class javax.swing.JComponentpublic void setX(int x)
x - the x coordinate of this steppublic int getY()
getY in class javax.swing.JComponentpublic void setY(int y)
y - the y coordinate of this steppublic StepManagerImpl getStepManager()
public void setStepManager(StepManagerImpl manager)
manager - the step manager to wrappublic java.lang.String getCustomEditorForStep()
public java.util.Set<java.lang.String> getStepInteractiveViewActionNames()
public javax.swing.JComponent getStepInteractiveViewComponent(java.lang.String viewActionName)
throws WekaException
viewActionName - the action/name for the viewer to getWekaException - if the step does not have any interactive viewers, or
does not provide a viewer with the given action/namepublic java.awt.Point getClosestConnectorPoint(java.awt.Point pt)
pt - the reference pointpublic void setDisplayConnectors(boolean dc)
dc - a boolean valuepublic void setDisplayConnectors(boolean dc,
java.awt.Color c)
dc - a boolean valuec - the Color to usepublic boolean getDisplayStepLabel()
public void paintComponent(java.awt.Graphics gx)
paintComponent in class javax.swing.JComponent