net.sf.kernow.ui
Class TabbedView

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by java.awt.Window
              extended by java.awt.Frame
                  extended by javax.swing.JFrame
                      extended by net.sf.kernow.ui.TabbedView
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible, javax.swing.RootPaneContainer, javax.swing.WindowConstants, Cancellable, ProgressObserver, TimeObserver

public class TabbedView
extends javax.swing.JFrame
implements TimeObserver, ProgressObserver, Cancellable

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JFrame
javax.swing.JFrame.AccessibleJFrame
 
Nested classes/interfaces inherited from class java.awt.Frame
java.awt.Frame.AccessibleAWTFrame
 
Nested classes/interfaces inherited from class java.awt.Window
java.awt.Window.AccessibleAWTWindow
 
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
 
Fields inherited from class javax.swing.JFrame
accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled
 
Fields 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_CURSOR
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface javax.swing.WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
TabbedView()
          Construct a new main frame.
 
Method Summary
 void addCancelObserver(CancelObserver cancelObserver)
          Add cancelObserver as a CancelObserver.
 void clearBatchFileHistory()
          Clear the values in the combo boxes for Ant.
 void clearDirectoryFileHistory()
          Clear the values in the combo boxes for Directory Transform.
 void clearOutputWindow()
          Clear the text area (the middle low in the Kernow GUI).
 void clearSchemaFileHistory()
          Clear the values in the combo boxes for Validation.
 void clearSingleFileHistory()
          Clear the values in the combo boxes for Single File Transform.
 void clearStandaloneFileHistory()
          Clear the values in the combo boxes for Standalone Transform or Query.
 void endDeterminant(boolean success)
          TODO: ...
 void endIndeterminant(boolean success)
          TODO: ...
 java.util.concurrent.Future executeService(javax.swing.SwingWorker worker)
          Execute a task in a separate thread so the GUI remains responsive.
 Config getConfig()
          Return the Config used by this frame.
 ParamsDiag getParamsDiag()
          Return the ParamsDiag used by this frame.
 TransformController getTransformController()
          Return the TransformController used by this frame.
 void init(TransformController transformController)
          Initialise all component of the view.
 boolean isCancelButtonClicked()
          Return true iff the current action was canceled.
 void setProgressText(java.lang.String text)
          Set the text in the progress below the progress bar.
 void startDeterminant(java.lang.String text)
          TODO: ...
 void startIndeterminant(java.lang.String text)
          TODO: ...
 void updateProgress(ObservableProgress task)
          See ProgressObserver.updateProgress(ObservableProgress).
 void updateTimeTaken(TimedTransform transform)
          Update the text below the progress bar with the time transform took.
 
Methods 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, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update
 
Methods inherited from class java.awt.Frame
addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setResizable, setState, setTitle, setUndecorated
 
Methods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOwnedWindows, getOwner, getOwnerlessWindows, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isShowing, pack, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setVisible, show, toBack, toFront
 
Methods 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, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods 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, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, 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, isOpaque, 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, requestFocusInWindow, requestFocusInWindow, resize, resize, setBackground, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.awt.MenuContainer
getFont, postEvent
 

Constructor Detail

TabbedView

public TabbedView()

Construct a new main frame. It doesn't init its components (see #init()).

Construct a new TabbedView object, doesn't initialise all of its components. In order to be used, TabbedView#init() must be called.

Method Detail

init

public void init(TransformController transformController)

Initialise all component of the view.

This method must be called once and only once before to use the frame. Among other things, it initialise the various tabs in the tabbed pane.


getConfig

public Config getConfig()

Return the Config used by this frame.


getParamsDiag

public ParamsDiag getParamsDiag()

Return the ParamsDiag used by this frame.


getTransformController

public TransformController getTransformController()

Return the TransformController used by this frame.


executeService

public java.util.concurrent.Future executeService(javax.swing.SwingWorker worker)

Execute a task in a separate thread so the GUI remains responsive.

Parameters:
worker - The service to execute.

startIndeterminant

public void startIndeterminant(java.lang.String text)

TODO: ... I want to be sure what is exactly the semantic of this method before writing anything. Ask Andrew.


endIndeterminant

public void endIndeterminant(boolean success)

TODO: ... I want to be sure what is exactly the semantic of this method before writing anything. Ask Andrew.


startDeterminant

public void startDeterminant(java.lang.String text)

TODO: ... I want to be sure what is exactly the semantic of this method before writing anything. Ask Andrew.


endDeterminant

public void endDeterminant(boolean success)

TODO: ... I want to be sure what is exactly the semantic of this method before writing anything. Ask Andrew.


setProgressText

public void setProgressText(java.lang.String text)

Set the text in the progress below the progress bar.

TODO: This is only used by the Directory Transform Tab, in case of error. In addition, it doesn't (the tab) set the icon in front of this text as "failed" (the red bullet). -fg


clearOutputWindow

public void clearOutputWindow()

Clear the text area (the middle low in the Kernow GUI).


clearSingleFileHistory

public void clearSingleFileHistory()

Clear the values in the combo boxes for Single File Transform.


clearDirectoryFileHistory

public void clearDirectoryFileHistory()

Clear the values in the combo boxes for Directory Transform.


clearStandaloneFileHistory

public void clearStandaloneFileHistory()

Clear the values in the combo boxes for Standalone Transform or Query.


clearSchemaFileHistory

public void clearSchemaFileHistory()

Clear the values in the combo boxes for Validation.


clearBatchFileHistory

public void clearBatchFileHistory()

Clear the values in the combo boxes for Ant.


updateTimeTaken

public void updateTimeTaken(TimedTransform transform)

Update the text below the progress bar with the time transform took.

Specified by:
updateTimeTaken in interface TimeObserver

addCancelObserver

public void addCancelObserver(CancelObserver cancelObserver)

Add cancelObserver as a CancelObserver.


isCancelButtonClicked

public boolean isCancelButtonClicked()

Return true iff the current action was canceled.

An action can be canceled by clicking the cancel button in the GUI. This method returns true if and only if this button was clicked while the current action was running.

Specified by:
isCancelButtonClicked in interface Cancellable

updateProgress

public void updateProgress(ObservableProgress task)

See ProgressObserver.updateProgress(ObservableProgress).

Specified by:
updateProgress in interface ProgressObserver