de.uni_paderborn.fujaba.fsa.swing
Class JBend

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjavax.swing.JComponent
              extended byjavax.swing.JPanel
                  extended byde.uni_paderborn.fujaba.fsa.swing.JBend
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable
Direct Known Subclasses:
JGrab

public class JBend
extends javax.swing.JPanel

A JBend can be the start- or endPoint of a JBendLine

Associations

        0..1                      N
 JBend ----------------------------- JBendLine
        startBend     outgoingLines

        0..1                      N
 JBend ----------------------------- JBendLine
        endBend       incomingLines
 

Version:
$Revision: 1.23.2.1 $
Author:
$Author: fklar $
See Also:
JBendLine, JLine, Serialized Form

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
JBend()
          Creates a JBend at position (0, 0)
JBend(java.awt.Point pos)
          Creates a JBend at the given position
JBend(java.awt.Point pos, JBendLine incoming, JBendLine outgoing)
          Create a Bend at position pos attached to incoming Line and outgoing Line
 
Method Summary
 boolean addToIncomingLines(JBendLine value)
          Access method for an one to n association.
 boolean addToOutgoingLines(JBendLine value)
          Access method for an one to n association.
protected  java.awt.Point calculatePoint()
          Calculates the value of Point from the current Bounds Default is the center of the Bounds
protected  void firePropertyChange(java.lang.String name, java.lang.Object oldValue, java.lang.Object newValue)
          No comment provided by developer, please add a comment to improve documentation.
 JBendLine getFirstFromLines()
          Get the firstFromLines attribute of the JBend object
 java.awt.Dimension getMaximumSize()
          Get the maximumSize attribute of the JBend object
 java.awt.Dimension getMinimumSize()
          Get the minimumSize attribute of the JBend object
 java.awt.Point getPoint()
          Get the value of point Same as getPoint(null)
 java.awt.Point getPoint(java.awt.Point p)
          Store the value of point in p, or if p is null in a new Point
 java.awt.Dimension getPreferredSize()
          Get the preferredSize attribute of the JBend object
 javax.swing.plaf.PanelUI getUI()
          Get the uI attribute of the JBend object
 boolean hasInIncomingLines(JLine value)
          No comment provided by developer, please add a comment to improve documentation.
 boolean hasInLines(JLine value)
          Access Method for lines Attribute
 boolean hasInOutgoingLines(JLine value)
          No comment provided by developer, please add a comment to improve documentation.
 java.util.Iterator iteratorOfIncomingLines()
          No comment provided by developer, please add a comment to improve documentation.
 java.util.Iterator iteratorOfLines()
          Access Method for lines Attribute
 java.util.Iterator iteratorOfOutgoingLines()
          No comment provided by developer, please add a comment to improve documentation.
 void removeAllFromIncomingLines()
          No comment provided by developer, please add a comment to improve documentation.
 void removeAllFromLines()
          Access Method for lines Attribute
 void removeAllFromOutgoingLines()
          No comment provided by developer, please add a comment to improve documentation.
 boolean removeFromIncomingLines(JBendLine value)
          No comment provided by developer, please add a comment to improve documentation.
 boolean removeFromLines(JBendLine value)
          Access Method for lines Attribute
 boolean removeFromOutgoingLines(JBendLine value)
          No comment provided by developer, please add a comment to improve documentation.
protected  void resetPoint()
          Calculates the value of Point from the current Bounds with a call to calculatePoint() If the new value differs from the current point, the current point is updated and a PropertyChangeEvent is fired with propertyName "point"
 void setBounds(int x, int y, int width, int height)
          Sets the Bounds and calls resetPoint to update the point accordingly
 void setPoint(int x, int y)
          Set the Point where the Line should end to p.
 void setPoint(java.awt.Point p)
          Set the Point where the Line should end to p Fires a PropertyChangeEvent with name "point" if p does not equal the current point Computes the new Location of this JBend and calls setLocation
 void setUI(BendUI ui)
          Sets the uI attribute of the JBend object
 int sizeOfIncomingLines()
          No comment provided by developer, please add a comment to improve documentation.
 int sizeOfLines()
          Access Method for lines Attribute
 int sizeOfOutgoingLines()
          No comment provided by developer, please add a comment to improve documentation.
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, 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, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getNextFocusableComponent, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, 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, 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

JBend

public JBend()
Creates a JBend at position (0, 0)

See Also:
JBend(java.awt.Point)

JBend

public JBend(java.awt.Point pos)
Creates a JBend at the given position

Parameters:
pos - position of jbend
See Also:
JBend()

JBend

public JBend(java.awt.Point pos,
             JBendLine incoming,
             JBendLine outgoing)
Create a Bend at position pos attached to incoming Line and outgoing Line

Parameters:
pos - the position of the bend
incoming - the incoming line to attach to
outgoing - the outgoing line to attach to
Method Detail

addToOutgoingLines

public boolean addToOutgoingLines(JBendLine value)
Access method for an one to n association.

Parameters:
value - The object added.
Returns:
No description provided

hasInOutgoingLines

public boolean hasInOutgoingLines(JLine value)
No comment provided by developer, please add a comment to improve documentation.

Parameters:
value - No description provided
Returns:
No description provided

iteratorOfOutgoingLines

public java.util.Iterator iteratorOfOutgoingLines()
No comment provided by developer, please add a comment to improve documentation.

Returns:
No description provided

sizeOfOutgoingLines

public int sizeOfOutgoingLines()
No comment provided by developer, please add a comment to improve documentation.

Returns:
No description provided

removeFromOutgoingLines

public boolean removeFromOutgoingLines(JBendLine value)
No comment provided by developer, please add a comment to improve documentation.

Parameters:
value - No description provided
Returns:
No description provided

removeAllFromOutgoingLines

public void removeAllFromOutgoingLines()
No comment provided by developer, please add a comment to improve documentation.


addToIncomingLines

public boolean addToIncomingLines(JBendLine value)
Access method for an one to n association.

Parameters:
value - The object added.
Returns:
No description provided

hasInIncomingLines

public boolean hasInIncomingLines(JLine value)
No comment provided by developer, please add a comment to improve documentation.

Parameters:
value - No description provided
Returns:
No description provided

iteratorOfIncomingLines

public java.util.Iterator iteratorOfIncomingLines()
No comment provided by developer, please add a comment to improve documentation.

Returns:
No description provided

sizeOfIncomingLines

public int sizeOfIncomingLines()
No comment provided by developer, please add a comment to improve documentation.

Returns:
No description provided

removeFromIncomingLines

public boolean removeFromIncomingLines(JBendLine value)
No comment provided by developer, please add a comment to improve documentation.

Parameters:
value - No description provided
Returns:
No description provided

removeAllFromIncomingLines

public void removeAllFromIncomingLines()
No comment provided by developer, please add a comment to improve documentation.


hasInLines

public boolean hasInLines(JLine value)
Access Method for lines Attribute

Parameters:
value - No description provided
Returns:
No description provided
See Also:
hasInIncomingLines(de.uni_paderborn.fujaba.fsa.swing.JLine), hasInOutgoingLines(de.uni_paderborn.fujaba.fsa.swing.JLine)

getFirstFromLines

public JBendLine getFirstFromLines()
Get the firstFromLines attribute of the JBend object

Returns:
The firstFromLines value

iteratorOfLines

public java.util.Iterator iteratorOfLines()
Access Method for lines Attribute

Returns:
No description provided
See Also:
iteratorOfIncomingLines(), iteratorOfOutgoingLines()

sizeOfLines

public int sizeOfLines()
Access Method for lines Attribute

Returns:
No description provided
See Also:
sizeOfIncomingLines(), sizeOfOutgoingLines()

removeFromLines

public boolean removeFromLines(JBendLine value)
Access Method for lines Attribute

Parameters:
value - No description provided
Returns:
No description provided
See Also:
removeFromIncomingLines(de.uni_paderborn.fujaba.fsa.swing.JBendLine), removeFromOutgoingLines(de.uni_paderborn.fujaba.fsa.swing.JBendLine)

removeAllFromLines

public void removeAllFromLines()
Access Method for lines Attribute

See Also:
removeAllFromIncomingLines(), removeAllFromOutgoingLines()

getPoint

public java.awt.Point getPoint(java.awt.Point p)
Store the value of point in p, or if p is null in a new Point

Parameters:
p - No description provided
Returns:
Value of point.
See Also:
getPoint(), setPoint(java.awt.Point), setPoint(int, int)

getPoint

public final java.awt.Point getPoint()
Get the value of point Same as getPoint(null)

Returns:
value of point
See Also:
getPoint(java.awt.Point), setPoint(java.awt.Point), setPoint(int, int)

setPoint

public final void setPoint(java.awt.Point p)
Set the Point where the Line should end to p Fires a PropertyChangeEvent with name "point" if p does not equal the current point

Computes the new Location of this JBend and calls

setLocation

Parameters:
p - The new point value
See Also:
setPoint(int, int), getPoint(), getPoint(java.awt.Point)

setPoint

public void setPoint(int x,
                     int y)
Set the Point where the Line should end to p. Fires a PropertyChangeEvent with name "point" if p does not equal the current point.

Computes the new Location of this JBend and calls

setLocation

Parameters:
x - The new point value
y - The new point value
See Also:
setPoint(java.awt.Point), getPoint(), getPoint(java.awt.Point)

setBounds

public void setBounds(int x,
                      int y,
                      int width,
                      int height)
Sets the Bounds and calls resetPoint to update the point accordingly

Parameters:
x - The new bounds value
y - The new bounds value
width - The new bounds value
height - The new bounds value
See Also:
setPoint(java.awt.Point), setPoint(int, int), resetPoint()

resetPoint

protected void resetPoint()
Calculates the value of Point from the current Bounds with a call to
 calculatePoint() 

If the new value differs from the current point, the current point is updated and a PropertyChangeEvent is fired with propertyName "point"

See Also:
calculatePoint(), setPoint(int, int), setPoint(java.awt.Point), (int, int, int, int), PropertyChangeEvent

calculatePoint

protected java.awt.Point calculatePoint()
Calculates the value of Point from the current Bounds Default is the center of the Bounds

Returns:
No description provided
See Also:
resetPoint()

setUI

public void setUI(BendUI ui)
Sets the uI attribute of the JBend object

Parameters:
ui - The new uI value

getUI

public javax.swing.plaf.PanelUI getUI()
Get the uI attribute of the JBend object

Returns:
The uI value

getMaximumSize

public java.awt.Dimension getMaximumSize()
Get the maximumSize attribute of the JBend object

Returns:
The maximumSize value

getMinimumSize

public java.awt.Dimension getMinimumSize()
Get the minimumSize attribute of the JBend object

Returns:
The minimumSize value

getPreferredSize

public java.awt.Dimension getPreferredSize()
Get the preferredSize attribute of the JBend object

Returns:
The preferredSize value

firePropertyChange

protected void firePropertyChange(java.lang.String name,
                                  java.lang.Object oldValue,
                                  java.lang.Object newValue)
No comment provided by developer, please add a comment to improve documentation.

Parameters:
name - No description provided
oldValue - No description provided
newValue - No description provided