sugr.GUI
Class ConstructionApplet

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.ConstructionApplet
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 ConstructionApplet
extends javax.swing.JApplet
implements java.awt.event.ActionListener

An applet which demonstrates the construction of new geomtric elements out of two given ones.

Version:
1.0 initial version.,

2.0

Changes to work with jdk1.3: color names updated

Changes to work with jdk1.2.2: name of StreamTokenizer st changed to stok and Reader r to reader. (?)

Formating doubles with lm.text.StringFormat (external package lm.jar

Slightly changing position of fields.

ipblogo inserted

reading example file with URL, so that it works across the network

Confidence Matrix named Sigma-Rho-Matrix

T. Laebe, 30-01-2003

,

2.01

FullGrayBackgroundTableCellRenderer and GrayBackgroundTableCellRenderer are removed into own files

,

2.1

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.JRadioButton bttIntersect
           
private  javax.swing.JRadioButton bttJoin
           
private  javax.swing.JComboBox cmbLeft
           
private  javax.swing.JComboBox cmbPreBuild
           
private  javax.swing.JComboBox cmbRight
           
private  java.awt.Container contentPane
           
private  javax.swing.JLabel[] lblArLeft
           
private  javax.swing.JLabel[] lblArResult
           
private  javax.swing.JLabel[] lblArRight
           
private  javax.swing.JLabel lblCovResult
           
private  javax.swing.JLabel lblError
           
private  javax.swing.JLabel lblResult
           
private  javax.swing.JLabel lblVecLeft
           
private  javax.swing.JLabel lblVecResult
           
private  javax.swing.JLabel lblVecRight
           
private static int LEFT
           
private static int LINE_2D
           
private static int LINE_3D
           
private static int PLANE_3D
           
private static int POINT_2D
           
private static int POINT_3D
           
private static java.lang.String preBldFile
           
private static int RIGHT
           
private  javax.swing.JScrollPane scPaneLeft
           
private  javax.swing.JScrollPane scPaneResult
           
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[] tfArrayLeft
           
private  javax.swing.JTextField[] tfArrayResult
           
private  javax.swing.JTextField[] tfArrayRight
           
private  javax.swing.JTextField tfStatus
           
 
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
ConstructionApplet()
           
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
          is only registered with the GO!
private  Matrix checkConfidence(Matrix confidence)
           
private  void createEntity(int whatSide, int startPosX, int startPosY, int dim)
          version 1.0 initial version version 1.1 slightly changed position of text. lae 03-02-2002.
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 ConstructionApplet 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

scPaneResult

private javax.swing.JScrollPane scPaneResult

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

tfArrayResult

private javax.swing.JTextField[] tfArrayResult

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

bttJoin

private javax.swing.JRadioButton bttJoin

bttIntersect

private javax.swing.JRadioButton bttIntersect

bttGo

private javax.swing.JButton bttGo

lblResult

private javax.swing.JLabel lblResult

lblArLeft

private javax.swing.JLabel[] lblArLeft

lblArRight

private javax.swing.JLabel[] lblArRight

lblArResult

private javax.swing.JLabel[] lblArResult

lblCovResult

private javax.swing.JLabel lblCovResult

lblVecLeft

private javax.swing.JLabel lblVecLeft

lblVecRight

private javax.swing.JLabel lblVecRight

lblVecResult

private javax.swing.JLabel lblVecResult

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
Constructor Detail

ConstructionApplet

public ConstructionApplet()
Method Detail

main

public static void main(java.lang.String[] args)
Start ConstructionApplet 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)
version 1.0 initial version version 1.1 slightly changed position of text. lae 03-02-2002.


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)
is only registered with the GO!-Button (Selection).

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 !