public class WorkflowApplet extends javax.swing.JApplet implements java.awt.event.ActionListener, java.awt.event.ItemListener, DiagramListener, WorkflowEditListener, DnDContainer, java.awt.event.MouseListener, java.awt.event.MouseMotionListener
This class is used to test the workflow diagram display and export code. The main program is invoked with a text file containing the nodes and relationships.
The files entries are comments preceeded by '#', nodes and realtionships. The format of these type of lines are
node,id,row,column,description,type,image resource The work 'node' identifies the line - for example node,1,0,0,Start,start,/psdi/webclient/applet/wfcanvas/resources/start.gif s relationship,fromID,toID The word 'relationship' identifies the line - for example relationship,1,2
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CONTEXTUAL_DIRECTION |
static java.lang.String |
LRE |
static java.lang.String |
LTR_DIRECTION |
static java.lang.String |
NONE |
static java.lang.String |
PDF |
static java.lang.String |
RLE |
static java.lang.String |
RTL_DIRECTION |
Constructor and Description |
---|
WorkflowApplet()
Constructs a display for the workflow test.
|
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent e)
Called when a button is pressed
|
void |
addAction(java.lang.String id,
java.lang.String row,
java.lang.String ownerrow,
java.lang.String ownerid,
java.lang.String memberid,
java.lang.String ispositive,
boolean tobedeleted) |
void |
addNode(java.lang.String id,
java.lang.String row,
java.lang.String type,
java.lang.String x,
java.lang.String y,
java.lang.String title,
boolean tobedeleted) |
void |
clearCursor()
Clears the container's cursor - this is necessary for the
re-written DnD which doesn't use the system handler
|
void |
deleteEntity() |
void |
diagramChanged(DiagramEvent e)
Called when the diagram state changes
|
void |
dropComplete(WorkflowNode sourceNode,
WorkflowNode dropNode)
Called when one node is dropped over another
|
java.lang.String |
enforceBidiDirection(java.lang.String str,
java.lang.String bidiDirection) |
java.lang.String |
getMaximoTextDirection() |
java.awt.datatransfer.Transferable |
getProxy(DiagramWorkflowNode node)
Constructs the correct proxy for dragging
|
void |
init() |
boolean |
isBidiEnabled() |
boolean |
isDropSupported()
Returns whether a node can be dropped on another in the container
|
void |
itemStateChanged(java.awt.event.ItemEvent e)
Called when the state of the zoom list changes.
|
void |
mouseClicked(java.awt.event.MouseEvent e) |
void |
mouseDragged(java.awt.event.MouseEvent e) |
void |
mouseEntered(java.awt.event.MouseEvent e) |
void |
mouseExited(java.awt.event.MouseEvent e) |
void |
mouseMoved(java.awt.event.MouseEvent e) |
void |
mousePressed(java.awt.event.MouseEvent e) |
void |
mouseReleased(java.awt.event.MouseEvent e) |
void |
moveaction() |
void |
movenode() |
void |
newaction(java.lang.String id,
int row) |
void |
newnode(java.lang.String id,
int row) |
void |
openWorkflow(int zoomLevel,
int nodeRow,
int actionRow,
java.lang.String selected,
boolean reload)
Opens current workflow
|
void |
select() |
void |
select(java.lang.Object ent) |
void |
sendEvent(java.lang.String event,
java.util.Hashtable values) |
void |
sendEvent(java.lang.String event,
java.lang.Object value) |
void |
sendEvent(java.lang.String event,
java.lang.String target,
java.util.Hashtable values) |
void |
sendEvent(java.lang.String event,
WorkflowEntity entity) |
void |
sendEvent(java.lang.String event,
WorkflowEntity entity,
java.util.Hashtable values) |
void |
setBidiEnabled(boolean enabled) |
void |
setCursor(boolean on) |
void |
setCursor(java.awt.Cursor cursor) |
void |
setMaximoTextDirection(java.lang.String dir) |
void |
setMaxvalueNodeTypes(java.lang.String types) |
void |
setTranslatedNodeTypes(java.lang.String types) |
void |
setupApplet() |
void |
setupProcess(java.lang.String id,
java.lang.String name,
boolean editable,
int zoomLevel) |
void |
showError(java.util.Hashtable appletResources)
Show the error for the current node
|
void |
showError(java.util.Hashtable appletResources,
java.lang.String errorText)
Show the error for the current node
|
void |
showError(java.lang.String errorText) |
void |
workflowChanged(WorkflowEditEvent e)
Called when the editor state changes
|
getAccessibleContext, getContentPane, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, remove, repaint, setContentPane, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setTransferHandler, update
destroy, getAppletContext, getAppletInfo, getAudioClip, getAudioClip, getCodeBase, getDocumentBase, getImage, getImage, getLocale, getParameter, getParameterInfo, isActive, isValidateRoot, newAudioClip, play, play, resize, resize, setStub, showStatus, start, stop
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, remove, removeAll, removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusDownCycle, validate
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, dispatchEvent, enable, enable, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocusInWindow, reshape, revalidate, setBackground, setBounds, setBounds, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
public static final java.lang.String LTR_DIRECTION
public static final java.lang.String RTL_DIRECTION
public static final java.lang.String CONTEXTUAL_DIRECTION
public static final java.lang.String NONE
public static final java.lang.String LRE
public static final java.lang.String RLE
public static final java.lang.String PDF
public WorkflowApplet()
workflow
- The workflowpublic void init()
init
in class java.applet.Applet
public void setMaxvalueNodeTypes(java.lang.String types)
public void setTranslatedNodeTypes(java.lang.String types)
public void setupProcess(java.lang.String id, java.lang.String name, boolean editable, int zoomLevel)
public void addNode(java.lang.String id, java.lang.String row, java.lang.String type, java.lang.String x, java.lang.String y, java.lang.String title, boolean tobedeleted)
public void addAction(java.lang.String id, java.lang.String row, java.lang.String ownerrow, java.lang.String ownerid, java.lang.String memberid, java.lang.String ispositive, boolean tobedeleted)
public void setupApplet()
public void diagramChanged(DiagramEvent e)
diagramChanged
in interface DiagramListener
e
- The DiagramEvent eventpublic void setCursor(boolean on)
public void movenode()
public void newnode(java.lang.String id, int row)
public void moveaction()
public void newaction(java.lang.String id, int row)
public void deleteEntity()
public void select(java.lang.Object ent)
public void select()
public void workflowChanged(WorkflowEditEvent e)
workflowChanged
in interface WorkflowEditListener
e
- The WorkflowEditEvent eventpublic void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed
in interface java.awt.event.ActionListener
e
- The ActionEventpublic void openWorkflow(int zoomLevel, int nodeRow, int actionRow, java.lang.String selected, boolean reload)
public void showError(java.lang.String errorText)
public void showError(java.util.Hashtable appletResources, java.lang.String errorText)
public void showError(java.util.Hashtable appletResources)
public void itemStateChanged(java.awt.event.ItemEvent e)
itemStateChanged
in interface java.awt.event.ItemListener
e
- The ItemEventpublic void setBidiEnabled(boolean enabled)
public boolean isBidiEnabled()
public void setMaximoTextDirection(java.lang.String dir)
public java.lang.String getMaximoTextDirection()
public java.lang.String enforceBidiDirection(java.lang.String str, java.lang.String bidiDirection)
public void sendEvent(java.lang.String event, WorkflowEntity entity)
public void sendEvent(java.lang.String event, WorkflowEntity entity, java.util.Hashtable values)
public void sendEvent(java.lang.String event, java.lang.Object value)
public void sendEvent(java.lang.String event, java.lang.String target, java.util.Hashtable values)
public void sendEvent(java.lang.String event, java.util.Hashtable values)
public java.awt.datatransfer.Transferable getProxy(DiagramWorkflowNode node)
getProxy
in interface DnDContainer
node
- The node to be draggedpublic boolean isDropSupported()
isDropSupported
in interface DnDContainer
public void dropComplete(WorkflowNode sourceNode, WorkflowNode dropNode)
dropComplete
in interface DnDContainer
sourceNode
- The Node being draggeddropNode
- The node dropped overpublic void clearCursor()
clearCursor
in interface DnDContainer
public void setCursor(java.awt.Cursor cursor)
setCursor
in class java.awt.Component
public void mouseMoved(java.awt.event.MouseEvent e)
mouseMoved
in interface java.awt.event.MouseMotionListener
public void mouseDragged(java.awt.event.MouseEvent e)
mouseDragged
in interface java.awt.event.MouseMotionListener
public void mouseClicked(java.awt.event.MouseEvent e)
mouseClicked
in interface java.awt.event.MouseListener
public void mouseEntered(java.awt.event.MouseEvent e)
mouseEntered
in interface java.awt.event.MouseListener
public void mouseExited(java.awt.event.MouseEvent e)
mouseExited
in interface java.awt.event.MouseListener
public void mousePressed(java.awt.event.MouseEvent e)
mousePressed
in interface java.awt.event.MouseListener
public void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased
in interface java.awt.event.MouseListener