symplik.flower
Class GUI

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 symplik.flower.GUI
All Implemented Interfaces:
java.awt.event.ActionListener, java.awt.event.KeyListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible, javax.swing.RootPaneContainer, javax.swing.WindowConstants, Constants

public class GUI
extends javax.swing.JFrame
implements java.awt.event.ActionListener, java.awt.event.KeyListener, Constants

Main class to start the GUI vesrion of CALLA

Version:
$Revision: 7 $
Author:
$Author: Christopher Ho $
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
private static java.lang.String CHOICE_STYLE
           
private  javax.swing.text.Style choiceStyle
           
private  Question currentQuestion
           
private  javax.swing.JFileChooser dc
           
private  javax.swing.text.StyledDocument doc
           
private  javax.swing.JButton exitBTN
           
private static java.lang.String EXPLANATION_STYLE
           
private  javax.swing.text.Style explanationStyle
           
private  javax.swing.JFileChooser fc
           
private  javax.swing.JPasswordField passwordTF
           
private static java.lang.String QUESTION_STYLE
           
private  javax.swing.text.Style questionStyle
           
static java.lang.String RCS_ID
           
private  javax.swing.JLabel responseLBL
           
private  Response responses
           
private  javax.swing.JTextField responseTF
           
private  javax.swing.JScrollPane scrollPane
           
private  javax.swing.JButton selectBTN
           
private static long serialVersionUID
           
private  javax.swing.JButton submitBTN
           
private  CallaJTextPane textPane
           
 
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 symplik.flower.Constants
CLASS_DEFAULT_START, CLASS_DIR_BROWSER, CLASS_FILE_BROWSER, DISPLAY_MODE, DISPLAY_MODE_CONSOLE, DISPLAY_MODE_GUI, DISPLAY_MODE_SLIENT, FILE_BROWSER_CURR_DIR, FILE_BROWSER_DIR, FILE_BROWSER_FILE, FLOWER_CONFIG, FLOWER_CONFIG_FILE, FLOWER_LAST_QUESTION, FLOWER_LOG_FILE, FLOWER_LOG_LEVEL, FLOWER_LOG_OUTPUT, FLOWER_RESPONSES, FLOWER_RESPONSES_FILE, LOG_DEBUG, LOG_ERROR, LOG_INFO, LOG_OUTPUT_FILE, LOG_OUTPUT_SYSTEM_OUT, LOG_WARN, SORT_AS_IS, SORT_BY_DESC, SORT_BY_DESC_CI, SORT_BY_KEY, SORT_BY_KEY_CI
 
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
GUI()
          Constructor
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
           
private  void addText(java.lang.String str, java.lang.String style)
           
private  void createInputFields()
           
private  void createTextPane()
           
private  void exitProgram(int exitCode)
           
private  void inProgress(boolean flag)
           
private  boolean isRecordingMode()
           
 void keyPressed(java.awt.event.KeyEvent e)
           
 void keyReleased(java.awt.event.KeyEvent e)
           
 void keyTyped(java.awt.event.KeyEvent e)
           
protected static void main()
           
static void main(java.lang.String[] args)
          Main class of GUI - start this method directly if you want
private  java.lang.String pStr(java.lang.String key)
           
private  void render(java.lang.String classAlias)
           
private  void response()
           
private  void setProgramLookAndFeel()
           
private  void setStyles()
           
private  void showDirectoryDialog()
           
private  void showErrDialog(java.lang.String str)
           
private  void showFileDialog()
           
private  void showMsgDialog(Message msg)
           
private  void showSystemOut(boolean flag)
           
private  void start()
           
 
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, paint, 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, 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
 

Field Detail

RCS_ID

public static final java.lang.String RCS_ID
See Also:
Constant Field Values

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

textPane

private CallaJTextPane textPane

doc

private javax.swing.text.StyledDocument doc

submitBTN

private javax.swing.JButton submitBTN

selectBTN

private javax.swing.JButton selectBTN

exitBTN

private javax.swing.JButton exitBTN

responseTF

private javax.swing.JTextField responseTF

passwordTF

private javax.swing.JPasswordField passwordTF

responseLBL

private javax.swing.JLabel responseLBL

fc

private javax.swing.JFileChooser fc

dc

private javax.swing.JFileChooser dc

scrollPane

private javax.swing.JScrollPane scrollPane

currentQuestion

private Question currentQuestion

questionStyle

private javax.swing.text.Style questionStyle

explanationStyle

private javax.swing.text.Style explanationStyle

choiceStyle

private javax.swing.text.Style choiceStyle

QUESTION_STYLE

private static final java.lang.String QUESTION_STYLE
See Also:
Constant Field Values

EXPLANATION_STYLE

private static final java.lang.String EXPLANATION_STYLE
See Also:
Constant Field Values

CHOICE_STYLE

private static final java.lang.String CHOICE_STYLE
See Also:
Constant Field Values

responses

private Response responses
Constructor Detail

GUI

public GUI()
Constructor

Method Detail

main

public static void main(java.lang.String[] args)
Main class of GUI - start this method directly if you want


main

protected static void main()

start

private void start()

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Specified by:
actionPerformed in interface java.awt.event.ActionListener

keyPressed

public void keyPressed(java.awt.event.KeyEvent e)
Specified by:
keyPressed in interface java.awt.event.KeyListener

response

private void response()

render

private void render(java.lang.String classAlias)

keyReleased

public void keyReleased(java.awt.event.KeyEvent e)
Specified by:
keyReleased in interface java.awt.event.KeyListener

keyTyped

public void keyTyped(java.awt.event.KeyEvent e)
Specified by:
keyTyped in interface java.awt.event.KeyListener

setProgramLookAndFeel

private void setProgramLookAndFeel()

pStr

private java.lang.String pStr(java.lang.String key)

showMsgDialog

private void showMsgDialog(Message msg)

showErrDialog

private void showErrDialog(java.lang.String str)

showSystemOut

private void showSystemOut(boolean flag)

addText

private void addText(java.lang.String str,
                     java.lang.String style)

inProgress

private void inProgress(boolean flag)

createTextPane

private void createTextPane()

createInputFields

private void createInputFields()

showDirectoryDialog

private void showDirectoryDialog()

showFileDialog

private void showFileDialog()

setStyles

private void setStyles()

isRecordingMode

private boolean isRecordingMode()

exitProgram

private void exitProgram(int exitCode)


Copyright © 2010 Symplik Tech. Co. Ltd. All Rights Reserved.