erkka
Class Line

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--erkka.BaseObject
                          |
                          +--erkka.Line
All Implemented Interfaces:
java.awt.event.ComponentListener, ErkkaListener, java.util.EventListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.io.Serializable
Direct Known Subclasses:
RelLine

public class Line
extends BaseObject

Title: Erkka-Projekti Description: This class defines how line will be drawn. Copyright: Copyright (c) 2002

Version:
1.0
See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
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
protected  erkka.Symbol Target_1
          Target symbol.
protected  erkka.Symbol Target_2
           
 
Fields inherited from class erkka.BaseObject
color, drawYourself, erkkaListener, hotspots, obj_focus
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
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
Line()
           
 
Method Summary
 boolean getHotSpotStatus()
          returns information if hotspot is drawn or not
 boolean getObjectFocus()
          returns line focus
 erkka.Symbol GetTarget1()
           
 erkka.Symbol GetTarget2()
           
 void isHotSpotShown(boolean b)
           
 void keyType(java.awt.event.KeyEvent e)
           
 void mousePressed(java.awt.event.MouseEvent e)
          Invokes when mouse is pressed over line
 void paint(java.awt.Graphics g)
          Defines and draws object color
 void PaintThis(java.awt.Graphics g)
          this function draws line
 void setLineColor(java.awt.Color newcol)
          set the color of the line
 void SetObjectFocus(boolean focus)
          Function sets object focus either true or false
 void SetTarget1(erkka.Symbol T_1)
           
 void SetTarget2(erkka.Symbol T_2)
           
 void updateLines()
          this fuction updates the place of the line
 
Methods inherited from class erkka.BaseObject
addErkkaListener, componentHidden, componentMoved, componentResized, componentShown, drawYourselfBounds, getDataFieldIndex, getFieldData, getFieldData, getFieldDataNoSpecials, getFieldDataNoSpecials, getFieldDataType, getFieldName, getFieldsCount, GetID, GetMiddlePoint, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mouseReleased, PropertyChange, removeErkkaListener, removeField, Selected, SetID, setNewField, setNewField, setObjectColor, SetProperty
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getAccessibleContext, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getWidth, getVisibleRect, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUI
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, 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, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, 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

Target_1

protected erkka.Symbol Target_1
Target symbol. Line will be drawn between Target_1 and Target_2


Target_2

protected erkka.Symbol Target_2
Constructor Detail

Line

public Line()
Method Detail

SetTarget1

public void SetTarget1(erkka.Symbol T_1)

GetTarget1

public erkka.Symbol GetTarget1()

GetTarget2

public erkka.Symbol GetTarget2()

SetTarget2

public void SetTarget2(erkka.Symbol T_2)

updateLines

public void updateLines()
this fuction updates the place of the line


PaintThis

public void PaintThis(java.awt.Graphics g)
this function draws line


keyType

public void keyType(java.awt.event.KeyEvent e)

mousePressed

public void mousePressed(java.awt.event.MouseEvent e)
Invokes when mouse is pressed over line

Specified by:
mousePressed in interface java.awt.event.MouseListener
Overrides:
mousePressed in class BaseObject

paint

public void paint(java.awt.Graphics g)
Description copied from class: BaseObject
Defines and draws object color

Overrides:
paint in class BaseObject
Parameters:
g - määritettävän grafiikan väri

getObjectFocus

public boolean getObjectFocus()
returns line focus

Overrides:
getObjectFocus in class BaseObject
Returns:
boolean

isHotSpotShown

public void isHotSpotShown(boolean b)

getHotSpotStatus

public boolean getHotSpotStatus()
returns information if hotspot is drawn or not


setLineColor

public void setLineColor(java.awt.Color newcol)
set the color of the line


SetObjectFocus

public void SetObjectFocus(boolean focus)
Function sets object focus either true or false

Overrides:
SetObjectFocus in class BaseObject
Parameters:
focus - if this param is true then this component gets focus. If it is false componen loses it