public abstract class ModuleWindow extends InternalWindow
JInternalFrame.AccessibleJInternalFrame, JInternalFrame.JDesktopIcon
JComponent.AccessibleJComponent
Container.AccessibleAWTContainer
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
Modifier and Type | Field and Description |
---|---|
private GridBagConstraints |
constraints
The GridBagConstraints for this window.
|
protected boolean |
isRNA
A boolean, true if the calculation handles RNA, false if not.
|
private GridBagLayout |
layout
The layout for this window.
|
protected JDialog |
progressBar
The progress bar dialog for this window.
|
private static long |
serialVersionUID |
backend, dialogHandler, menuBar
closable, CONTENT_PANE_PROPERTY, desktopIcon, FRAME_ICON_PROPERTY, frameIcon, GLASS_PANE_PROPERTY, iconable, IS_CLOSED_PROPERTY, IS_ICON_PROPERTY, IS_MAXIMUM_PROPERTY, IS_SELECTED_PROPERTY, isClosed, isIcon, isMaximum, isSelected, LAYERED_PANE_PROPERTY, maximizable, MENU_BAR_PROPERTY, resizable, ROOT_PANE_PROPERTY, rootPane, rootPaneCheckingEnabled, title, TITLE_PROPERTY
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Modifier | Constructor and Description |
---|---|
protected |
ModuleWindow(String acid,
String title)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected String |
combineFileNames(String file1,
String file2,
String ext)
Combine two file names into a new file name.
|
protected void |
doActions(String command)
Do any actions specific to this window.
|
protected abstract void |
executeModuleAction(String command)
Execute an action within a particular module.
|
protected void |
finishModule(String text)
Handle finishing of a module.
|
protected JComponent |
getInputControl(Container hold,
int index)
Get a particular input control from a given container.
|
protected JComponent |
getInputControl(int index)
Get a particular input control from the content pane.
|
protected abstract void |
makeInputControls()
Make any input controls necessary to get data from this window for a
calculation.
|
protected void |
makeStartButton(int x,
int y)
Create the "START" button.
|
protected boolean |
moduleInitialized(String result)
Check to see if the module was initialized correctly.
|
protected void |
placeComponent(int x,
int y,
JComponent component)
.
|
protected String |
replaceExtension(String file,
String extension)
Replace the extension on a file name.
|
protected abstract void |
runMainCalculation()
Run the module calculation in the back end.
|
protected void |
setAnchorCenter()
Set the anchoring area for the GridBagConstraints to CENTER.
|
protected void |
setAnchorNorth()
Set the anchoring area for the GridBagConstraints to NORTH.
|
protected void |
setFillCenter()
Set the fill for the GridBagConstraints as CENTER.
|
protected void |
setFillHorizontal()
Set the fill for the GridBagConstraints as HORIZONTAL.
|
protected void |
setGrid(int width,
int height)
Set the amount of space a component takes up in the grid.
|
protected void |
setInsets(int top,
int left,
int bottom,
int right)
Set the external padding of the constraints.
|
protected void |
setPad(int xPad,
int yPad)
Set the internal padding of the constraints.
|
private void |
showProgressBar(boolean determinate)
Create a progress bar.
|
protected void |
showProgressBarDeterminate()
Create a determinate progress bar.
|
protected void |
showProgressBarIndeterminate()
Create an indeterminate progress bar.
|
actionPerformed, setMenus, setTitles, viewWindow
addImpl, addInternalFrameListener, createRootPane, dispose, doDefaultCloseAction, fireInternalFrameEvent, getAccessibleContext, getContentPane, getDefaultCloseOperation, getDesktopIcon, getDesktopPane, getFocusCycleRootAncestor, getFocusOwner, getFrameIcon, getGlassPane, getInternalFrameListeners, getJMenuBar, getLastCursor, getLayer, getLayeredPane, getMenuBar, getMostRecentFocusOwner, getNormalBounds, getRootPane, getTitle, getUI, getUIClassID, getWarningString, hide, isClosable, isClosed, isFocusCycleRoot, isIcon, isIconifiable, isMaximizable, isMaximum, isResizable, isRootPaneCheckingEnabled, isSelected, moveToBack, moveToFront, pack, paintComponent, paramString, remove, removeInternalFrameListener, reshape, restoreSubcomponentFocus, setClosable, setClosed, setContentPane, setCursor, setDefaultCloseOperation, setDesktopIcon, setFocusCycleRoot, setFrameIcon, setGlassPane, setIcon, setIconifiable, setJMenuBar, setLayer, setLayer, setLayeredPane, setLayout, setMaximizable, setMaximum, setMenuBar, setNormalBounds, setResizable, setRootPane, setRootPaneCheckingEnabled, setSelected, setTitle, setUI, show, toBack, toFront, 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, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, 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, 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, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, 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, 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, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
private GridBagConstraints constraints
protected boolean isRNA
private GridBagLayout layout
protected final JDialog progressBar
private static final long serialVersionUID
protected final String combineFileNames(String file1, String file2, String ext)
file1
- The first file name.file2
- The second file name.ext
- The extension of the new file name.protected void doActions(String command)
InternalWindow
doActions
in class InternalWindow
command
- The command that signifies a particular action.protected abstract void executeModuleAction(String command)
command
- The command that signifies a particular action.protected final void finishModule(String text)
text
- The result of the calculation spawned by the module.protected final JComponent getInputControl(Container hold, int index)
hold
- The container that holds the input control.index
- The index of the control to get, one-indexed.protected final JComponent getInputControl(int index)
index
- The index of the control to get, one-indexed.protected abstract void makeInputControls()
protected final void makeStartButton(int x, int y)
x
- The X index at which to place the button in the layout.y
- The Y index at which to place the button in the layout.protected final boolean moduleInitialized(String result)
result
- The result of the data structure construction.protected final void placeComponent(int x, int y, JComponent component)
x
- The X coordinate of the grid.y
- The Y coordinate of the grid.component
- The component to set in place.protected final String replaceExtension(String file, String extension)
file
- The file name whose extension to replace.extension
- The new extension.protected abstract void runMainCalculation()
protected final void setAnchorCenter()
protected final void setAnchorNorth()
protected final void setFillCenter()
protected final void setFillHorizontal()
protected final void setGrid(int width, int height)
width
- The width of the component.height
- The height of the component.protected final void setInsets(int top, int left, int bottom, int right)
top
- The top padding.left
- The left padding.bottom
- The bottom padding.right
- The right padding.protected final void setPad(int xPad, int yPad)
xPad
- The padding in the X direction.yPad
- The padding in the Y direction.private void showProgressBar(boolean determinate)
determinate
- True if the progress bar is determinate,
false if not.protected void showProgressBarDeterminate()
protected void showProgressBarIndeterminate()