Class NodeWizard
java.lang.Object
java.awt.Component
java.awt.Container
java.awt.Window
java.awt.Frame
javax.swing.JFrame
ca.phon.ui.CommonModuleFrame
ca.phon.ui.wizard.WizardFrame
ca.phon.ui.wizard.BreadcrumbWizardFrame
ca.phon.app.opgraph.wizard.NodeWizard
- All Implemented Interfaces:
IExtendable,ImageObserver,MenuContainer,Serializable,Accessible,RootPaneContainer,WindowConstants
- Direct Known Subclasses:
AnalysisWizard,ITRWizard,QueryAndReportWizard,ReportWizard,SessionCheckWizard
The Node wizard servers as the UI layer for opgraph
analysis and reports. It provides the following steps
by default:
- Introduction (if supplied in the
WizardExtension) - Optional Nodes (if any are defined in the
WizardExtension) - Settings for Nodes (if any are defined as 'required' in the
WizardExtension) - Report data generation
- Report
WizardExtension are displayed
during the last step of the wizard. Reports utilize data generated during the
report data step. Reports are written using Apache velocity syntax. Table data may be
accessed from the $tables map variable, buffer text data may be
accessed from the $buffers map varaible. The map keys are the names
of the buffers generated during the report data step.
Other variables available to the velocity context are:
$Class- static access to java.lang.Class$FormatterUtil- access to Phon object formatters$project- the project$graph- the opgraph used
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class javax.swing.JFrame
JFrame.AccessibleJFrameNested classes/interfaces inherited from class java.awt.Frame
Frame.AccessibleAWTFrameNested classes/interfaces inherited from class java.awt.Window
Window.AccessibleAWTWindow, Window.TypeNested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainerNested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected JCheckBoxprotected ca.phon.ui.jbreadcrumb.BreadcrumbButtonprotected ca.phon.ui.jbreadcrumb.BreadcrumbButtonstatic final Stringprotected OverrideParameterPanelstatic final Stringprotected booleanstatic final Stringstatic final Stringprotected WizardStepprotected DropDownButtonprotected WizardStepprotected TitledPanelprotected ReportTreeDockingPanelprotected JToolBarstatic final StringFields inherited from class ca.phon.ui.wizard.BreadcrumbWizardFrame
breadcrumbScroller, breadCrumbViewer, nextButtonFields inherited from class ca.phon.ui.wizard.WizardFrame
btnBack, btnCancel, btnFinish, btnNext, buttonPanel, stepPanelFields inherited from class ca.phon.ui.CommonModuleFrame
DEFAULT_MACOS_ENABLE_FULLSCREEN, MACOS_ENABLE_FULLSCREEN, titleFields inherited from class javax.swing.JFrame
accessibleContext, rootPane, rootPaneCheckingEnabledFields inherited from class java.awt.Frame
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSORFields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTFields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTHFields inherited from interface javax.swing.WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE -
Constructor Summary
ConstructorsConstructorDescriptionNodeWizard(String title) NodeWizard(String title, ca.phon.opgraph.Processor processor, ca.phon.opgraph.OpGraph graph) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcancel()voidclose()protected voidprotected WizardStepcreateIntroStep(String title, String message) protected WizardStepprotected NodeWizardReportGeneratorcreateReportGenerator(ReportTree reportTree, String reportTemplate, OutputStream fout) protected WizardStepprotected WizardStepcreateStep(WizardExtension ext, ca.phon.opgraph.OpNode node) voidExecutes graph.protected voidCalled when the processor endsprotected voidCalled when the processors beginsprotected voidgenerateHTML(ReportTree reportTree, OutputStream out) generateHTMLReport(ReportTree reportTree) protected FilegenerateHTMLReport(ReportTree reportTree, File reportFile) ca.phon.opgraph.OpGraphgetGraph()getNoun()Return the noun associated with the type of graph executed in the wizard.ca.phon.opgraph.Processorprotected JComponentvoidvoidgotoReportSection(String htmlId) voidgotoStep(int step) protected booleanvoidloadGraph(ca.phon.opgraph.OpGraph graph) voidprotected voidloadHTMLReport(File reportFile) protected voidThis method is called during graph execution when a NewReport node is executed and a report tree is available.protected voidnext()voidvoidonStop()voidonZoomIn()voidvoidprotected voidvoidsearchForTables(ReportTreeNode node, Map<String, DefaultTableDataSource> tableMap) voidsetJMenuBar(JMenuBar menuBar) voidsetProcessor(ca.phon.opgraph.Processor processor) protected voidsetupContext(ca.phon.opgraph.OpContext ctx) voidsetupExportTablesMenu(MenuBuilder builder) protected voidsetupGlobalOptions(ca.phon.opgraph.OpContext ctx) protected voidsetupOptionals(ca.phon.opgraph.OpContext ctx) voidSetup report context variables for velocity graph, buffers, etc.protected JToolBarprotected voidvoidvoidButton state diagram:Methods inherited from class ca.phon.ui.wizard.BreadcrumbWizardFrame
removeAllSteps, removeWizardStep, setBoundsMethods inherited from class ca.phon.ui.wizard.WizardFrame
addListener, addWizardStep, addWizardStep, addWizardStep, finish, fireWizardEvent, getCurrentStep, getCurrentStepIndex, getStepIndex, getWizardStep, numberOfSteps, prev, removeListener, setupButtons, setVisible, showBusyLabel, showWizard, stopBusyLabelMethods inherited from class ca.phon.ui.CommonModuleFrame
addNewWindowListener, cascadeWindow, centerWindow, display, getCurrentFrame, getExtension, getExtensions, getOpenWindows, getParentFrame, getProjectWindows, getTitle, getUnsavedChangesMessage, getUnsavedChangesTitle, getWindowName, hasUnsavedChanges, hideStatusComponent, isShowInWindowMenu, placeTopRight, positionRelativeTo, putExtension, removeExtension, resetStatusComponent, saveAndClose, saveData, setModified, setParentFrame, setShowInWindowMenu, setUnsavedChangesMessage, setUnsavedChangesTitle, setWindowName, showErrorMessage, showMessageDialog, showOkCancelDialog, showOkDialog, showStatusMessage, showYesNoCancelDialog, showYesNoDialogMethods inherited from class javax.swing.JFrame
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, updateMethods inherited from class java.awt.Frame
addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, isResizable, isUndecorated, remove, removeNotify, setBackground, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setOpacity, setResizable, setShape, setState, setTitle, setUndecoratedMethods inherited from class java.awt.Window
addPropertyChangeListener, 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, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isAutoRequestFocus, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isOpaque, isShowing, isValidateRoot, pack, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setAutoRequestFocus, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocation, setLocation, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setType, show, toBack, toFrontMethods inherited from class java.awt.Container
add, 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, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusDownCycle, validate, validateTreeMethods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, 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, 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, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, requestFocusInWindow, resize, resize, revalidate, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setMixingCutoutShape, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycleMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.awt.MenuContainer
getFont, postEvent
-
Field Details
-
reportTitledPanel
-
reportDataStep
-
reportTreeDockingPanel
-
reportTreeViewToolbar
-
autoGenHTMLBox
-
optionalsStep
-
globalOptionsPanel
-
CASE_SENSITIVE_GLOBAL_OPTION
-
INVENTORY_GROUPING_GLOBAL_OPTION
-
IGNORE_DIACRITICS_GLOBAL_OPTION
-
ONLYOREXCEPT_GLOBAL_OPTION
-
SELECTED_DIACRITICS_GLOBAL_OPTION
-
overridesButton
-
inInit
protected boolean inInit -
btnStop
protected ca.phon.ui.jbreadcrumb.BreadcrumbButton btnStop -
btnRunAgain
protected ca.phon.ui.jbreadcrumb.BreadcrumbButton btnRunAgain
-
-
Constructor Details
-
NodeWizard
-
NodeWizard
-
-
Method Details
-
loadGraph
public void loadGraph(ca.phon.opgraph.OpGraph graph) -
loadGraph
- Throws:
IOException
-
setJMenuBar
- Overrides:
setJMenuBarin classJFrame
-
onPrintReport
public void onPrintReport() -
onZoomIn
public void onZoomIn() -
onZoomOut
public void onZoomOut() -
onZoomReset
public void onZoomReset() -
gotoReportSection
-
onStop
public void onStop() -
close
public void close()- Overrides:
closein classCommonModuleFrame
-
getCurrentReportTree
-
setupWizardSteps
protected void setupWizardSteps() -
updateBreadcrumbButtons
public void updateBreadcrumbButtons()Button state diagram:+-----------------+ Yes +-------------+ Yes +----------------------+ | Is report step? +------->+ Is running? +------->+ Button State | +-------+---------+ +------+------+ +----------------------+ | | | | | | | btnStop: visible | | | | btnNext: hidden | | No | No | btnRunAgain: hidden | | | | | | | +----------------------+ v v +-------+--------------+ +------+-------+ Yes +----------------------+ | Button State | | Has report? +------>+ Button State | +----------------------+ +------+-------+ +----------------------+ | | | | | | btnStop: hidden | | | btnStop: visible | | btnNext: visible | | | btnNext: hidden | | btnRunAgain: hidden | | No | btnRunAgain: hidden | | | | | | +----------------------+ | +----------------------+ | v +------+---------------+ | Button State | +----------------------+ | | | btnStop: hidden | | btnNext: hidden | | btnRunAgain: visible | | | +----------------------+- Overrides:
updateBreadcrumbButtonsin classBreadcrumbWizardFrame
-
getNoun
Return the noun associated with the type of graph executed in the wizard. The first element of theTupleis the singleton version, while the second element is the plural. String should be returned as all lower case.- Returns:
- Tupleinvalid input: '<'String, String>
-
getBufferPanel
-
getGraph
public ca.phon.opgraph.OpGraph getGraph() -
getProcessor
public ca.phon.opgraph.Processor getProcessor() -
setProcessor
public void setProcessor(ca.phon.opgraph.Processor processor) -
getWizardExtension
-
executionStarted
protected void executionStarted()Called when the processors begins -
executionEnded
protected void executionEnded()Called when the processor ends -
stopExecution
public void stopExecution() -
executeGraph
public void executeGraph() throws ca.phon.opgraph.exceptions.ProcessingExceptionExecutes graph. During execution, data generated may be printed to buffers which are displayed during this stage. If there is a buffer named 'Report Template' at the end of execution, a HTML report is generated using the contents of 'Report Template' which should be a velocity template.- Throws:
ca.phon.opgraph.exceptions.ProcessingException
-
generateHTML
protected void generateHTML(ReportTree reportTree, OutputStream out) throws NodeWizardReportException - Throws:
NodeWizardReportException
-
generateHTMLReport
- Throws:
NodeWizardReportExceptionIOException
-
generateHTMLReport
protected File generateHTMLReport(ReportTree reportTree, File reportFile) throws NodeWizardReportException, IOException - Throws:
NodeWizardReportExceptionIOException
-
htmlReportAvailable
protected boolean htmlReportAvailable() -
closeHTMLReport
protected void closeHTMLReport() -
loadHTMLReport
-
createReportGenerator
protected NodeWizardReportGenerator createReportGenerator(ReportTree reportTree, String reportTemplate, OutputStream fout) -
loadDefaultReport
-
setupReportContext
Setup report context variables for velocity graph, buffers, etc.- Parameters:
ctx-
-
searchForTables
-
getOptionalsTree
-
setupContext
protected void setupContext(ca.phon.opgraph.OpContext ctx) -
setupOptionals
protected void setupOptionals(ca.phon.opgraph.OpContext ctx) -
setupGlobalOptions
protected void setupGlobalOptions(ca.phon.opgraph.OpContext ctx) -
createStep
-
createIntroStep
-
createOptionalsStep
-
createReportStep
-
resetReportStep
protected void resetReportStep() -
loadReportTreeDockingPanel
protected void loadReportTreeDockingPanel()This method is called during graph execution when a NewReport node is executed and a report tree is available. The bufferPanel will be removed from the report panel and replaced with a tab view contaning both the report view and the bufferPanel. -
setupReportTreeViewToolbar
-
getReportTreeContentView
-
gotoStep
public void gotoStep(int step) - Overrides:
gotoStepin classBreadcrumbWizardFrame
-
gotoReport
public void gotoReport() -
next
protected void next()- Overrides:
nextin classWizardFrame
-
cancel
protected void cancel()- Overrides:
cancelin classWizardFrame
-