public class ScriptDlg
extends javax.swing.JDialog
| Modifier and Type | Field and Description |
|---|---|
int |
EXECUTE_OPTION
returned by display() if user selected 'execute'
|
int |
QUIT_OPTION
returned by display() if user selected 'quit'
|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT| Constructor and Description |
|---|
ScriptDlg(java.awt.Frame parent,
java.lang.String title,
java.lang.String author)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addVariable(java.lang.String name,
java.lang.String value,
java.lang.String description)
Add a variable that might be modified by the user.
|
int |
display()
Displays the dialog on screen.
|
boolean |
getAsBoolean(java.lang.String name)
Return the value of the variable 'name' as boolean.
|
double |
getAsDouble(java.lang.String name)
Return the value of the variable 'name' as a Double.
|
int |
getAsInt(java.lang.String name)
Return the value of the variable 'name' as an Integer.
|
java.lang.String |
getAsString(java.lang.String name)
Return the value of the variable 'name' as a String.
|
int |
getSelectedRow()
Get the index of the currently selected row
|
void |
setComment(java.lang.String comment)
Add additional information about your script.
|
void |
setDate(java.lang.String date)
Add the date when the script was changed the last time.
|
void |
setDependencies(java.lang.String dependencies)
Does the script require some external resources or programs?
|
void |
setOs(java.lang.String os)
Does the script require a particular operating system?
|
getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setTransferHandler, updateaddNotify, getModalityType, getTitle, hide, isModal, isResizable, isUndecorated, setBackground, setModal, setModalityType, setOpacity, setResizable, setShape, setTitle, setUndecorated, setVisible, show, toBackaddPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBackground, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOpacity, getOwnedWindows, getOwner, getOwnerlessWindows, getShape, getToolkit, getType, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isAutoRequestFocus, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isOpaque, isShowing, isValidateRoot, pack, paint, postEvent, removeNotify, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setAutoRequestFocus, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImage, setIconImages, setLocation, setLocation, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setType, toFrontadd, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusDownCycle, validateaction, 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, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocusInWindow, resize, resize, revalidate, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCyclepublic final int EXECUTE_OPTION
public final int QUIT_OPTION
public ScriptDlg(java.awt.Frame parent,
java.lang.String title,
java.lang.String author)
parent - The parent frame (within a script this is usually 'jpiv';title - The name of your script.author - Your name or e-mail address.CmdInterpreterpublic int display()
public void setDate(java.lang.String date)
date - The date.public void setOs(java.lang.String os)
os - The operating system (e.g. "linux", "win32").public void setDependencies(java.lang.String dependencies)
dependencies - The resource (e.g. matlab, PivWare).public void setComment(java.lang.String comment)
comment - The comment.public void addVariable(java.lang.String name,
java.lang.String value,
java.lang.String description)
name - The variable name. Use this name to refere to the variable.value - A default value. This value might be changed by the user.description - A description of the variable.public java.lang.String getAsString(java.lang.String name)
name - The name of the variable (key).public boolean getAsBoolean(java.lang.String name)
name - A string "true" (returns true) or something else (returns
false)public int getAsInt(java.lang.String name)
name - The name of the variable (key).public double getAsDouble(java.lang.String name)
name - The name of the variable (key).public int getSelectedRow()