|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Container | +--javax.swing.JComponent | +--javax.swing.JPanel | +--erkka.DrawingArea
Title: Erkka-Projekti
Description: This class defines drawing area of the application. Symbols and lines are over it.
Nested Class Summary |
Nested classes inherited from class javax.swing.JPanel |
javax.swing.JPanel.AccessibleJPanel |
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 |
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 | |
DrawingArea()
Default constuctor |
Method Summary | |
void |
AddObj(erkka.BaseObject obj,
int x,
int y)
This fuction adds param object in to the object or line table. |
void |
clearAllVariables()
this function clears all variables and removes all objects from line and focus vector |
int |
getFocusTableBottom()
Function returns most bottom point of the focus table |
int |
getFocusTableLeft()
Function returns most left point of the focus table |
int |
getFocusTableRight()
Function returns most right point of the focus table |
int |
getFocusTableTop()
Function returns most top point of the focus table |
java.util.Vector |
getFocusVector()
returns focus vector |
int |
getFocusVectorSize()
This function return the size of the FocusVector |
erkka.Line |
getLine()
this function returns first line from line table |
java.util.Vector |
getLineTable()
this function returns line table |
boolean |
getModified()
returns a modified status |
erkka.Symbol |
getObjByID(int id)
this function returns an object which have desired id. |
erkka.BaseObject |
getObject(int i)
returns desired object from focus vector |
void |
hideLineHotSpots()
If attribute status is false, this function hides all HotSpots of lines. |
boolean |
isModifiedAfterLastAsking()
|
void |
moveSelectedObjects(int mx,
int my)
this function will moves all selected objects |
void |
paint(java.awt.Graphics g)
paint method of the class. |
void |
removeFromContainer(erkka.BaseObject base)
|
void |
removeObj(erkka.BaseObject obj)
This function removes an object from drawing area |
void |
removeObjectFromVector(erkka.BaseObject rem)
Function removes param rem from FocusVector. |
void |
removeSelectedObjects()
This function removes all object which are selected. |
void |
selectAll()
select all objects |
void |
setFocusVector(java.util.Vector newVector)
|
void |
setFocusVectorNull()
this function will clear focus vector. |
void |
setLine(int x1,
int y1,
int x2,
int y2)
Function sets start and end points of the line. |
void |
setModified(boolean newVal)
|
void |
setSelectedObjectsPos(int dx,
int dy)
Moves objects which are in FocusVector to given coordinates. |
void |
Symb_changes(erkka.ErkkaEvent e)
|
void |
Symb_selected(erkka.ErkkaEvent e)
This function will be called when symbol is selected |
Methods inherited from class javax.swing.JPanel |
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
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, 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, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getWidth, getVisibleRect, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, 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 |
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 |
Constructor Detail |
public DrawingArea()
Method Detail |
public void setLine(int x1, int y1, int x2, int y2)
x1
- start point of the x-coordinatey1
- start point of the y-coordinatex2
- end point of the x-coordinatey2
- end point of the y-coordinatepublic void paint(java.awt.Graphics g)
paint
in class javax.swing.JComponent
public void AddObj(erkka.BaseObject obj, int x, int y)
obj
- an object which you want to add in to areax
- object x-coordinatey
- object y-coordinatepublic void Symb_changes(erkka.ErkkaEvent e)
public void clearAllVariables()
public void removeObj(erkka.BaseObject obj)
obj
- object which will be removed from drawing areapublic void Symb_selected(erkka.ErkkaEvent e)
public void removeSelectedObjects()
public void removeFromContainer(erkka.BaseObject base)
public erkka.BaseObject getObject(int i)
i
- desired indexpublic void setFocusVectorNull()
public void removeObjectFromVector(erkka.BaseObject rem)
rem
- object which will be removed from focus vectorpublic int getFocusVectorSize()
public void hideLineHotSpots()
public int getFocusTableLeft()
public int getFocusTableRight()
public int getFocusTableTop()
public int getFocusTableBottom()
public java.util.Vector getFocusVector()
public void setFocusVector(java.util.Vector newVector)
public erkka.Symbol getObjByID(int id)
id
- public erkka.Line getLine()
public java.util.Vector getLineTable()
public boolean getModified()
public boolean isModifiedAfterLastAsking()
public void setModified(boolean newVal)
public void setSelectedObjectsPos(int dx, int dy)
FocusVector
to given coordinates.
dx
- New x coordinate for the selectiondy
- New y coordinate for the selectionpublic void moveSelectedObjects(int mx, int my)
public void selectAll()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |