Project MVC architecture
version 0.1 - 010723

lib.gui.mvc
Class ViewTest

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--java.awt.Panel
                    |
                    +--java.applet.Applet
                          |
                          +--lib.gui.mvc.ViewTest
All Implemented Interfaces:
javax.accessibility.Accessible, CommandListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable

public class ViewTest
extends java.applet.Applet
implements CommandListener

ViewTest.
Synopsis

Test command: java -classpath classes lib.gui.mvc.ViewTest

See Also:
Serialized Form

Inner classes inherited from class java.applet.Applet
java.applet.Applet.AccessibleApplet
 
Inner classes inherited from class java.awt.Panel
java.awt.Panel.AccessibleAWTPanel
 
Inner classes inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Inner classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.AWTTreeLock
 
Field Summary
private  java.lang.String attributes_fileName
           
private static java.net.URL codeBase
           
private static java.lang.String CODEBASE_DEFAULT
          Instance members, // {{{
(package private)  java.lang.String[] component_subset_names
          The subset test component names.
private static java.lang.String image_directory
           
private static java.lang.String IMAGES_DIR
          Ressources.
private static java.lang.String QUIT
           
private static int quitCount
          parse_command - Handles Buttons activation.
private static java.lang.String SHIFTER
           
private static java.lang.String TEST1
           
private static java.lang.String TEST1_SUBSET
           
private static java.lang.String TEST2
           
private static java.lang.String USAGE
          Usage syntax message. {{{
private static java.lang.String VIEWTEST
          Constant members, // {{{
 
Fields inherited from class java.applet.Applet
accessibleContext, serialVersionUID, stub
 
Fields inherited from class java.awt.Panel
base, nameCounter
 
Fields inherited from class java.awt.Container
component, containerListener, containerSerializedDataVersion, dbg, dispatcher, layoutMgr, listeningBoundsChildren, listeningChildren, maxSize, ncomponents, printing, printingThreads
 
Fields inherited from class java.awt.Component
actionListenerK, adjustmentListenerK, appContext, background, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, changeSupport, componentListener, componentListenerK, componentOrientation, componentSerializedDataVersion, containerListenerK, cursor, dropTarget, enabled, eventMask, focusListener, focusListenerK, font, foreground, graphicsConfig, hasFocus, height, hierarchyBoundsListener, hierarchyBoundsListenerK, hierarchyListener, hierarchyListenerK, incRate, inputMethodListener, inputMethodListenerK, isInc, isPacked, itemListenerK, keyListener, keyListenerK, LEFT_ALIGNMENT, locale, LOCK, metrics, minSize, mouseListener, mouseListenerK, mouseMotionListener, mouseMotionListenerK, name, nameExplicitlySet, newEventsOnly, ownedWindowK, parent, peer, peerFont, popups, prefSize, privateKey, RIGHT_ALIGNMENT, textListenerK, TOP_ALIGNMENT, valid, visible, width, windowClosingException, windowListenerK, x, y
 
Fields inherited from interface lib.gui.mvc.CommandListener
MESSAGE_CANCEL, MESSAGE_OK, NEXT, NO_CALLBACK_REASON, PREV, PRINT, START, STOP
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
ViewTest()
           
 
Method Summary
 boolean componentValueChanged(Controler controler, java.awt.Component component)
          componentValueChanged.
private  java.lang.String get_stop_message()
          get_stop_message - Return the message associated to the stop button activation.
static void main(java.lang.String[] args)
          main - Instanciate test MVC samples.
 boolean parse_command(Controler controler, java.awt.Component src, java.lang.String cmd)
          Parses the user selected action command received by the Model instance.
 boolean parse_TextField(Controler controler, java.awt.TextField t)
          parse_TextField.
 boolean quit(Controler controler)
          quit.
 void start()
          start - Applet instanciate test MVC samples.
private  void test_no_Model(java.lang.String name)
          test_no_Model.
private  void test_subset_no_CommandListener(java.lang.String name)
          test_subset_no_CommandListener.
private  void testMVCL(java.lang.String name)
          testMVCL.
private  void viewTest_MVC()
          viewTest_MVC - The ViewTest own MVC.
 
Methods inherited from class java.applet.Applet
destroy, getAccessibleContext, getAppletContext, getAppletInfo, getAudioClip, getAudioClip, getCodeBase, getDocumentBase, getImage, getImage, getLocale, getParameter, getParameterInfo, init, isActive, newAudioClip, play, play, resize, resize, setStub, showStatus, stop
 
Methods inherited from class java.awt.Panel
, addNotify, constructComponentName
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, adjustListeningChildren, applyOrientation, checkGD, countComponents, createChildHierarchyEvents, createHierarchyEvents, deliverEvent, dispatchEventImpl, dispatchEventToSelf, doLayout, eventEnabled, findComponentAt, findComponentAt, findComponentAt, getAccessibleAt, getAccessibleChild, getAccessibleChildrenCount, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents_NoClientCode, getComponents, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getMouseEventTarget, getPreferredSize, getWindow, initIDs, insets, invalidate, invalidateTree, isAncestorOf, layout, lightweightPaint, lightweightPrint, list, list, locate, minimumSize, nextFocus, numListening, paint, paintComponents, paintHeavyweightComponents, paramString, postProcessKeyEvent, postsOldMouseEvents, preferredSize, preProcessKeyEvent, print, printComponents, printHeavyweightComponents, processContainerEvent, processEvent, proxyEnableEvents, proxyRequestFocus, readObject, remove, remove, removeAll, removeContainerListener, removeNotify, setFocusOwner, setFont, setLayout, transferFocus, update, validate, validateTree, writeObject
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, areInputMethodsEnabled, bounds, checkImage, checkImage, checkWindowClosingException, coalesceEvents, contains, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getAccessibleIndexInParent, getAccessibleStateSet, getBackground, getBounds, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont_NoClientCode, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getInputContext, getInputMethodRequests, getLocation, getLocation, getLocationOnScreen_NoTreeLock, getLocationOnScreen, getName, getNativeContainer, getParent_NoClientCode, getParent, getPeer, getSize, getSize, getToolkit, getToolkitImpl, getTreeLock, getWidth, getWindowForObject, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isDisplayable, isDoubleBuffered, isEnabled, isEnabledImpl, isFocusTraversable, isLightweight, isOpaque, isRecursivelyVisible, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, resetGC, reshape, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

IMAGES_DIR

private static final java.lang.String IMAGES_DIR
Ressources.

VIEWTEST

private static final java.lang.String VIEWTEST
Constant members, // {{{

image_directory

private static java.lang.String image_directory

QUIT

private static java.lang.String QUIT

TEST1

private static java.lang.String TEST1

SHIFTER

private static java.lang.String SHIFTER

TEST1_SUBSET

private static java.lang.String TEST1_SUBSET

TEST2

private static java.lang.String TEST2

USAGE

private static final java.lang.String USAGE
Usage syntax message. {{{

component_subset_names

java.lang.String[] component_subset_names
The subset test component names. // {{{

CODEBASE_DEFAULT

private static final java.lang.String CODEBASE_DEFAULT
Instance members, // {{{

codeBase

private static java.net.URL codeBase

attributes_fileName

private java.lang.String attributes_fileName

quitCount

private static int quitCount
parse_command - Handles Buttons activation. // {{{
Constructor Detail

ViewTest

public ViewTest()
Method Detail

main

public static void main(java.lang.String[] args)
main - Instanciate test MVC samples. // {{{

start

public void start()
start - Applet instanciate test MVC samples. // {{{
Overrides:
start in class java.applet.Applet

viewTest_MVC

private void viewTest_MVC()
viewTest_MVC - The ViewTest own MVC. // {{{

testMVCL

private void testMVCL(java.lang.String name)
testMVCL. // {{{

test_no_Model

private void test_no_Model(java.lang.String name)
test_no_Model. // {{{

test_subset_no_CommandListener

private void test_subset_no_CommandListener(java.lang.String name)
test_subset_no_CommandListener. // {{{

parse_command

public boolean parse_command(Controler controler,
                             java.awt.Component src,
                             java.lang.String cmd)
Description copied from interface: CommandListener
Parses the user selected action command received by the Model instance.
Specified by:
parse_command in interface CommandListener
Following copied from interface: lib.gui.mvc.CommandListener
Parameters:
controler - the controler instance that may be used to access MVC elements
src - the event source Component instance that triggered the event
cmd - the command associated to the source Component instance
Returns:
whether the command has been handled or if it should be further processed by the caller

componentValueChanged

public boolean componentValueChanged(Controler controler,
                                     java.awt.Component component)
componentValueChanged. // {{{
Specified by:
componentValueChanged in interface CommandListener
Following copied from interface: lib.gui.mvc.CommandListener
Parameters:
controler - the controler instance that may be used to access MVC elements
component - the event source Component instance that triggered the event
Returns:
whether the command has been handled or if it should be further processed by the caller

parse_TextField

public boolean parse_TextField(Controler controler,
                               java.awt.TextField t)
parse_TextField. // {{{
Specified by:
parse_TextField in interface CommandListener
Following copied from interface: lib.gui.mvc.CommandListener
Parameters:
controler - the controler instance that may be used to access MVC elements
textField - the event source Component instance that triggered the event
Returns:
whether the command has been handled or if it should be further processed by the caller

quit

public boolean quit(Controler controler)
quit. // {{{
Specified by:
quit in interface CommandListener
Following copied from interface: lib.gui.mvc.CommandListener
Parameters:
controler - the controler instance that may be used to access MVC elements
textField - the event source Component instance that triggered the event
Returns:
whether the command has been handled or if it should be further processed by the caller. The default handling will be a call to System.exit( 0 );

get_stop_message

private java.lang.String get_stop_message()
get_stop_message - Return the message associated to the stop button activation. // {{{

MVC architecture

Document Tech Infos - Ivan Wellesz