sugr.GUI
Class RelationApplet

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjava.awt.Panel
              extended byjava.applet.Applet
                  extended byjavax.swing.JApplet
                      extended bysugr.GUI.RelationApplet
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.event.ActionListener, java.util.EventListener, java.awt.image.ImageObserver, java.awt.MenuContainer, javax.swing.RootPaneContainer, java.io.Serializable

public class RelationApplet
extends javax.swing.JApplet
implements java.awt.event.ActionListener

A little Applet to perform statistical tests withing SUGR. A statistical test between two entities can be made. Types of tests are equallity, orthogonality, parallelism and incidence.

Version:
1.0 initial version. just copied from SwingApplet.java, 1.1 introduced new methods Factory: simplifies very much!, 1.1.1 Design of result; Distance removed, 1.1.2 Fixed: changed result = Factory.getRelation(e1,e1,cmbR... into result = Factory.getRelation(e1,e2,cmbR, 1.2 The package lm.jar for formatting the doubles is not needed any more. Replaced it with simple toString().
Author:
Norbert Fischer
See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class javax.swing.JApplet
javax.swing.JApplet.AccessibleJApplet
 
Nested classes inherited from class java.applet.Applet
java.applet.Applet.AccessibleApplet
 
Nested classes inherited from class java.awt.Panel
java.awt.Panel.AccessibleAWTPanel
 
Nested classes inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
private  javax.swing.JRadioButton bttConfLeft
           
private  javax.swing.JRadioButton bttConfRight
           
private  javax.swing.JRadioButton bttCovLeft
           
private  javax.swing.JRadioButton bttCovRight
           
private  javax.swing.JButton bttGo
           
private  javax.swing.ButtonGroup bttGroupLeft
           
private  javax.swing.ButtonGroup bttGroupRight
           
private  javax.swing.JComboBox cmbLeft
           
private  javax.swing.JComboBox cmbPreBuild
           
private  javax.swing.JComboBox cmbRelation
           
private  javax.swing.JComboBox cmbRight
           
private  java.awt.Container contentPane
           
private static java.lang.Class[] entitytypes
          Mapping between index of GUI and entity types.
private  javax.swing.JLabel lblAlpha
           
private  javax.swing.JLabel[] lblArLeft
           
private  javax.swing.JLabel[] lblArRight
           
private  javax.swing.JLabel lblDecision
           
private  javax.swing.JLabel lblError
           
private  javax.swing.JLabel lblShowDecision
           
private  javax.swing.JLabel lblTestValue
           
private  javax.swing.JLabel lblThreshold
           
private  javax.swing.JLabel lblVecLeft
           
private  javax.swing.JLabel lblVecRight
           
private static int LEFT
           
private static int LINE_2D
           
private static int LINE_3D
           
private  javax.swing.JLabel mytext1
           
private static int PLANE_3D
           
private static int POINT_2D
           
private static int POINT_3D
           
private static java.lang.String preBldFile
           
private static java.lang.Class[] relationtypes
          Mapping between index of GUI and relation types.
private static int RIGHT
           
private  javax.swing.JScrollPane scPaneLeft
           
private  javax.swing.JScrollPane scPaneRight
           
private static long serialVersionUID
          Class version number for serialization
private  javax.swing.JTable tblLeft
           
private  javax.swing.JTable tblRight
           
private  javax.swing.JTextField tfAlpha
           
private  javax.swing.JTextField[] tfArrayLeft
           
private  javax.swing.JTextField[] tfArrayRight
           
private  javax.swing.JTextField tfStatus
           
private  javax.swing.JTextField tfTestValue
           
private  javax.swing.JTextField tfThreshold
           
 
Fields inherited from class javax.swing.JApplet
accessibleContext, rootPane, rootPaneCheckingEnabled
 
Fields inherited from class java.applet.Applet
 
Fields inherited from class java.awt.Panel
 
Fields inherited from class java.awt.Container
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
RelationApplet()
           
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
           
private  Matrix checkConfidence(Matrix confidence)
           
private  void createEntity(int whatSide, int startPosX, int startPosY, int dim)
           
private  void createSelection()
           
private  void fillElement(int whatSide, java.io.StreamTokenizer st, int startX, int startY)
           
private  Matrix getEntityCovMatrix(javax.swing.JTable table)
           
private  Vector getEntityVector(javax.swing.JTextField[] tfArray)
           
protected  java.net.URL getURL(java.lang.String filename)
          Get an URL out of a filename (to work across a network in a browser !
 void init()
           
private  void initComboBoxes()
           
private  void initComboPreBuild()
           
private  void initIcons()
          place icons on the screen
static void main(java.lang.String[] args)
          Start RelationApplet as standalone applet.
private  void removeOldResult()
           
private  javax.swing.JLabel[] setUpLabels(int whatEntity, int posX, int posY)
           
 
Methods inherited from class javax.swing.JApplet
addImpl, createRootPane, getAccessibleContext, getContentPane, getGlassPane, getJMenuBar, getLayeredPane, getRootPane, isRootPaneCheckingEnabled, paramString, remove, setContentPane, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, update
 
Methods inherited from class java.applet.Applet
destroy, getAppletContext, getAppletInfo, getAudioClip, getAudioClip, getCodeBase, getDocumentBase, getImage, getImage, getLocale, getParameter, getParameterInfo, isActive, newAudioClip, play, play, resize, resize, setStub, showStatus, start, stop
 
Methods inherited from class java.awt.Panel
addNotify
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, removeAll, removeContainerListener, removeNotify, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, 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, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isOpaque, 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, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
Class version number for serialization

See Also:
Constant Field Values

LEFT

private static final int LEFT
See Also:
Constant Field Values

RIGHT

private static final int RIGHT
See Also:
Constant Field Values

POINT_2D

private static final int POINT_2D
See Also:
Constant Field Values

LINE_2D

private static final int LINE_2D
See Also:
Constant Field Values

POINT_3D

private static final int POINT_3D
See Also:
Constant Field Values

LINE_3D

private static final int LINE_3D
See Also:
Constant Field Values

PLANE_3D

private static final int PLANE_3D
See Also:
Constant Field Values

tblLeft

private javax.swing.JTable tblLeft

tblRight

private javax.swing.JTable tblRight

scPaneLeft

private javax.swing.JScrollPane scPaneLeft

scPaneRight

private javax.swing.JScrollPane scPaneRight

contentPane

private java.awt.Container contentPane

cmbLeft

private javax.swing.JComboBox cmbLeft

cmbRight

private javax.swing.JComboBox cmbRight

cmbPreBuild

private javax.swing.JComboBox cmbPreBuild

tfArrayLeft

private javax.swing.JTextField[] tfArrayLeft

tfArrayRight

private javax.swing.JTextField[] tfArrayRight

bttCovLeft

private javax.swing.JRadioButton bttCovLeft

bttConfLeft

private javax.swing.JRadioButton bttConfLeft

bttGroupLeft

private javax.swing.ButtonGroup bttGroupLeft

bttCovRight

private javax.swing.JRadioButton bttCovRight

bttConfRight

private javax.swing.JRadioButton bttConfRight

bttGroupRight

private javax.swing.ButtonGroup bttGroupRight

cmbRelation

private javax.swing.JComboBox cmbRelation

mytext1

private javax.swing.JLabel mytext1

bttGo

private javax.swing.JButton bttGo

lblAlpha

private javax.swing.JLabel lblAlpha

tfAlpha

private javax.swing.JTextField tfAlpha

lblDecision

private javax.swing.JLabel lblDecision

lblShowDecision

private javax.swing.JLabel lblShowDecision

lblTestValue

private javax.swing.JLabel lblTestValue

tfTestValue

private javax.swing.JTextField tfTestValue

lblThreshold

private javax.swing.JLabel lblThreshold

tfThreshold

private javax.swing.JTextField tfThreshold

lblArLeft

private javax.swing.JLabel[] lblArLeft

lblArRight

private javax.swing.JLabel[] lblArRight

lblVecLeft

private javax.swing.JLabel lblVecLeft

lblVecRight

private javax.swing.JLabel lblVecRight

lblError

private javax.swing.JLabel lblError

tfStatus

private javax.swing.JTextField tfStatus

preBldFile

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

entitytypes

private static final java.lang.Class[] entitytypes
Mapping between index of GUI and entity types.


relationtypes

private static final java.lang.Class[] relationtypes
Mapping between index of GUI and relation types.

Constructor Detail

RelationApplet

public RelationApplet()
Method Detail

main

public static void main(java.lang.String[] args)
Start RelationApplet as standalone applet.


init

public void init()

initIcons

private void initIcons()
place icons on the screen


initComboBoxes

private void initComboBoxes()

initComboPreBuild

private void initComboPreBuild()

fillElement

private void fillElement(int whatSide,
                         java.io.StreamTokenizer st,
                         int startX,
                         int startY)

createEntity

private void createEntity(int whatSide,
                          int startPosX,
                          int startPosY,
                          int dim)

createSelection

private void createSelection()

getEntityVector

private Vector getEntityVector(javax.swing.JTextField[] tfArray)

getEntityCovMatrix

private Matrix getEntityCovMatrix(javax.swing.JTable table)

actionPerformed

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

removeOldResult

private void removeOldResult()

checkConfidence

private Matrix checkConfidence(Matrix confidence)

setUpLabels

private javax.swing.JLabel[] setUpLabels(int whatEntity,
                                         int posX,
                                         int posY)

getURL

protected java.net.URL getURL(java.lang.String filename)
Get an URL out of a filename (to work across a network in a browser !