public class MenuCanvas
extends javax.swing.JPanel
implements java.awt.dnd.DropTargetListener
javax.swing.JPanel.AccessibleJPanel
javax.swing.JComponent.AccessibleJComponent
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
exec
The exec string for the PCD menu.
|
protected java.lang.String |
icon
The icon for the PCD menu.
|
protected javax.swing.JPanel |
mainPanel
The main JPanel for the canvas.
|
protected java.lang.String |
name
The name of the PCD menu.
|
protected javax.swing.JFrame |
parent
The parent window of the menu canvas.
|
protected java.util.Set<org.biopcd.parser.SystemToken> |
systems
The systems and architectures supported by the command.
|
protected java.lang.String |
tip
The tool-tip for the PCD menu.
|
protected java.util.ArrayList<org.biopcd.widgets.Widget> |
widgetList
The list of widgets associated with the command.
|
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Constructor and Description |
---|
MenuCanvas(javax.swing.JFrame parent)
Create a new menu canvas.
|
Modifier and Type | Method and Description |
---|---|
void |
addWidget(org.biopcd.widgets.Widget widget)
Adds a widget to the PCD menu canvas.
|
void |
clear()
Clears the canvas of all widgets (thereby making it blank).
|
void |
dragEnter(java.awt.dnd.DropTargetDragEvent dtde)
Handles when the drop action has changed (DOES NOTHING AT THIS MOMENT!)
|
void |
dragExit(java.awt.dnd.DropTargetEvent dte)
Handles when a drag cursor leaves the drop target area.
|
void |
dragOver(java.awt.dnd.DropTargetDragEvent dtde)
Handles when a drag cursor enters the drop target area.
|
void |
drop(java.awt.dnd.DropTargetDropEvent dtde)
The user drops the item.
|
void |
dropActionChanged(java.awt.dnd.DropTargetDragEvent dtde)
Handles when the drop action has changed (DOES NOTHING AT THIS MOMENT!)
|
void |
pcdOut(int scope,
java.lang.Appendable out)
Writes the BioPCD representation of the run window to a writer object
(see BioLegato's BioPCD editor for more details)
|
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
protected javax.swing.JFrame parent
protected java.lang.String name
protected java.lang.String icon
protected java.lang.String tip
protected java.lang.String exec
The exec string for the PCD menu. If this string is not blank and not null, when the PCD menu is clicked on by the user (in BioLegato, NOT the editor), the command in the exec string will be run without prompting the user to enter values for running the command.
NOTE: The usual behaviour (when 'exec' is left blank) is for a "Run" command button the be added to the menu. The "Run" command button, when clicked, will run the command. This allows the user to set the parameters for the command via the menu's widgets.
protected java.util.Set<org.biopcd.parser.SystemToken> systems
protected java.util.ArrayList<org.biopcd.widgets.Widget> widgetList
protected javax.swing.JPanel mainPanel
public MenuCanvas(javax.swing.JFrame parent)
parent
- the parent window to house the canvas. This is important
for creating modal dialog boxes.public void dragEnter(java.awt.dnd.DropTargetDragEvent dtde)
dragEnter
in interface java.awt.dnd.DropTargetListener
dtde
- Ignored, because this method currently does nothing.public void dragOver(java.awt.dnd.DropTargetDragEvent dtde)
dragOver
in interface java.awt.dnd.DropTargetListener
dtde
- Ignored, because this method changes the cursor regardless
of whatever extraneous information about the event is
available.public void dropActionChanged(java.awt.dnd.DropTargetDragEvent dtde)
dropActionChanged
in interface java.awt.dnd.DropTargetListener
dtde
- Ignored, because this method currently does nothing.public void dragExit(java.awt.dnd.DropTargetEvent dte)
dragExit
in interface java.awt.dnd.DropTargetListener
dte
- Ignored, because this method changes the cursor regardless
of whatever extraneous information about the event is
available.public void drop(java.awt.dnd.DropTargetDropEvent dtde)
The user drops the item. Performs the drag and drop calculations and layout.
drop
in interface java.awt.dnd.DropTargetListener
dtde
- The event object containing all of the information necessary
and available for the drag-and-drop procedure.public void pcdOut(int scope, java.lang.Appendable out) throws java.io.IOException
scope
- the level of scope to write the run window.out
- the writer object to output the BioPCD code.java.io.IOException
public void addWidget(org.biopcd.widgets.Widget widget)
widget
- the widget to add to the canvas.public void clear()
Copyright © 2008-2022 University of Manitoba.