de.uni_paderborn.fujaba.fsa.swing
Class JLine

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjavax.swing.JComponent
              extended byde.uni_paderborn.fujaba.fsa.swing.JLine
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable
Direct Known Subclasses:
JBendLine

public class JLine
extends javax.swing.JComponent

A Line from startPoint to endPoint

Version:
$Revision: 1.22.2.1 $
Author:
$Author: lowende $
See Also:
JBendLine, 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
 
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
JLine()
          Creates a Line from (0,0) to (0,0)
JLine(java.awt.Point start, java.awt.Point end)
          Creates a Line from Point start to Point end
 
Method Summary
 boolean contains(int x, int y)
           
 boolean contains(java.awt.Point p)
           
 void doLayout()
          No comment provided by developer, please add a comment to improve documentation.
 double getAngle()
          Get the angle attribute of the JLine object
 double getAngle(double d)
          Get the angle attribute of the JLine object
protected  double getCx()
          x coeff to quickly calculate the distance of a point to a line The value is cached until one of the endpoints changes, and then recalculated along with cy and length, when one of them is requested.
protected  double getCy()
          y coeff to quickly calculate the distance of a point to a line The value is cached until one of the endpoints changes, and then recalculated along with cx and length, when one of them is requested.
 double getDelta()
          Get the value of delta.
 java.awt.geom.Point2D getDirection()
          Get the direction attribute of the JLine object
 java.awt.geom.Point2D getDirection(double d)
          Get the direction attribute of the JLine object
 java.awt.geom.Point2D getDirection(double d, java.awt.geom.Point2D p)
          Get the direction attribute of the JLine object
 java.awt.geom.Point2D getDirection(java.awt.geom.Point2D p)
          Get the direction attribute of the JLine object
 double getDistance(int x, int y)
           
 double getDistance(java.awt.Point p)
           
 java.awt.Point getEndPoint()
          Get the value of endPoint.
 java.awt.Point getEndPoint(java.awt.Point p)
          Store the value of endPoint in p or return a new Point containing these coordinates if p is null
 java.awt.Point getFromPoints(int index)
          Get the fromPoints attribute of the JLine object
 int getIndexFromPoints(int x, int y)
          Get the indexFromPoints attribute of the JLine object
 int getIndexFromPoints(java.awt.Point point)
           
 double getLength()
          Get the length attribute of the JLine object
 java.awt.Point getNextFromPoints(int x, int y)
          Get the nextFromPoints attribute of the JLine object
 java.awt.Point getNextFromPoints(java.awt.Point point)
          Get the nextFromPoints attribute of the JLine object
 java.awt.geom.Point2D getNormal()
          Get the normal attribute of the JLine object
 java.awt.geom.Point2D getNormal(double d)
          Get the normal attribute of the JLine object
 java.awt.geom.Point2D getNormal(double d, java.awt.geom.Point2D p)
          Get the normal attribute of the JLine object
 java.awt.geom.Point2D getNormal(java.awt.geom.Point2D p)
          Get the normal attribute of the JLine object
 java.awt.geom.Point2D getPointAt(double d)
          Get the pointAt attribute of the JLine object
 double getPosition(int x, int y)
          Get the position attribute of the JLine object
 double getPosition(java.awt.Point p)
          Get the position attribute of the JLine object
 java.awt.Rectangle getPreferredBounds()
          compute the bounds from the start- and endpoint and delta.
 java.awt.Dimension getPreferredSize()
           
 java.awt.Point getPrevFromPoints(int x, int y)
          Get the prevFromPoints attribute of the JLine object
 java.awt.Point getPrevFromPoints(java.awt.Point point)
          Get the prevFromPoints attribute of the JLine object
 java.awt.Point getStartPoint()
          Get the value of startPoint.
 java.awt.Point getStartPoint(java.awt.Point p)
          Store the value of startPoint in p or return a new Point containing these coordinates if p is null
 double getStartToEndDistance()
          length of the line The value is cached until one of the endpoints changes, and then recalculated along with cx and cy, when one of them is requested.
 java.awt.Stroke getStroke()
          Get the stroke attribute of the JLine object
 int getThickness()
          Get the thickness attribute of the JLine object
 LineUI getUI()
          Get the uI attribute of the JLine object
 boolean hasInPoints(int x, int y)
          No comment provided by developer, please add a comment to improve documentation.
 boolean hasInPoints(java.awt.Point point)
          No comment provided by developer, please add a comment to improve documentation.
 boolean isLineDashed()
          Get the lineDashed attribute of the JLine object
 boolean isOptimizedDrawingEnabled()
          Get the optimizedDrawingEnabled attribute of the JLine object
 java.util.ListIterator iteratorOfPoints()
          No comment provided by developer, please add a comment to improve documentation.
 java.util.ListIterator iteratorOfPoints(int start)
          No comment provided by developer, please add a comment to improve documentation.
 java.util.ListIterator iteratorOfPoints(java.awt.Point pt)
          No comment provided by developer, please add a comment to improve documentation.
 void removeYou()
          No comment provided by developer, please add a comment to improve documentation.
 void setBounds(int x, int y, int w, int h)
          set Bounds to parameters and update startPoint and endPoint accordingly.
 void setDelta(double delta)
          Set the value of delta.
 boolean setEndPoint(int x, int y)
          Set the value of startPoint and recalculate bounds
 void setEndPoint(java.awt.Point point)
          Set the value of endPoint and recalculate bounds
 void setLineDashed(boolean dashed)
          Sets the lineDashed attribute of the JLine object
 boolean setPointAt(int index, int x, int y)
          Sets the pointAt attribute of the JLine object
 boolean setPointAt(int index, java.awt.Point p)
          Sets the pointAt attribute of the JLine object
 boolean setStartPoint(int x, int y)
          Set the value of startPoint and recalculate bounds
 void setStartPoint(java.awt.Point point)
          Set the value of startPoint and recalculate bounds
 void setStroke(java.awt.Stroke value)
          Sets the stroke attribute of the JLine object
 void setThickness(int newThickness)
          Sets the thickness attribute of the JLine object
 void setUI(javax.swing.plaf.ComponentUI ui)
          Sets the UI of this class.
 int sizeOfPoints()
          No comment provided by developer, please add a comment to improve documentation.
 java.lang.String toString()
           
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, 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, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, 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, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUI
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, 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, 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, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JLine

public JLine()
Creates a Line from (0,0) to (0,0)


JLine

public JLine(java.awt.Point start,
             java.awt.Point end)
Creates a Line from Point start to Point end

Parameters:
start - start of line
end - end of line
Method Detail

isOptimizedDrawingEnabled

public boolean isOptimizedDrawingEnabled()
Get the optimizedDrawingEnabled attribute of the JLine object

Returns:
The optimizedDrawingEnabled value

getStartPoint

public final java.awt.Point getStartPoint()
Get the value of startPoint.

Same as getStartPoint(null).

Returns:
Value of startPoint.
See Also:
getStartPoint(java.awt.Point), setStartPoint(java.awt.Point), setStartPoint(int, int), getEndPoint(java.awt.Point), getEndPoint()

getStartPoint

public java.awt.Point getStartPoint(java.awt.Point p)
Store the value of startPoint in p or return a new Point containing these coordinates if p is null

Parameters:
p - The point to store the coordinates in
Returns:
p if p was non-null, a new Point otherwise
See Also:
getStartPoint(), setStartPoint(java.awt.Point), setStartPoint(int, int), getEndPoint(java.awt.Point), getEndPoint()

setStartPoint

public final void setStartPoint(java.awt.Point point)
Set the value of startPoint and recalculate bounds

Parameters:
point - Value to assign to startPoint.
See Also:
setStartPoint(int, int), setEndPoint(int, int), setEndPoint(java.awt.Point), getStartPoint(), getStartPoint(java.awt.Point), setBounds(int, int, int, int)

setStartPoint

public boolean setStartPoint(int x,
                             int y)
Set the value of startPoint and recalculate bounds

Parameters:
x - x-coordinate
y - y-coordinate
Returns:
No description provided
See Also:
setStartPoint(java.awt.Point), setEndPoint(int, int), setEndPoint(java.awt.Point), getStartPoint(), getStartPoint(java.awt.Point), setBounds(int, int, int, int)

getEndPoint

public final java.awt.Point getEndPoint()
Get the value of endPoint.
Same as getEndPoint(null).

Returns:
Value of endPoint.
See Also:
getEndPoint(java.awt.Point), setEndPoint(java.awt.Point), setEndPoint(int, int), getStartPoint(java.awt.Point), getStartPoint()

getEndPoint

public java.awt.Point getEndPoint(java.awt.Point p)
Store the value of endPoint in p or return a new Point containing these coordinates if p is null

Parameters:
p - The point to store the coordinates in
Returns:
p if p was non-null, a new Point otherwise
See Also:
getEndPoint(), setEndPoint(java.awt.Point), setEndPoint(int, int), getStartPoint(java.awt.Point), getStartPoint()

setEndPoint

public final void setEndPoint(java.awt.Point point)
Set the value of endPoint and recalculate bounds

Parameters:
point - Value to assign to endPoint.
See Also:
setEndPoint(int, int), setStartPoint(int, int), setStartPoint(java.awt.Point), getEndPoint(), getEndPoint(java.awt.Point), setBounds(int, int, int, int)

setEndPoint

public boolean setEndPoint(int x,
                           int y)
Set the value of startPoint and recalculate bounds

Parameters:
x - x-coordinate
y - y-coordinate
Returns:
No description provided
See Also:
setEndPoint(java.awt.Point), setStartPoint(int, int), setStartPoint(java.awt.Point), getEndPoint(), getEndPoint(java.awt.Point), setBounds(int, int, int, int)

setPointAt

public final boolean setPointAt(int index,
                                java.awt.Point p)
Sets the pointAt attribute of the JLine object

Parameters:
index - The new pointAt value
p - The new pointAt value
Returns:
No description provided

setPointAt

public boolean setPointAt(int index,
                          int x,
                          int y)
Sets the pointAt attribute of the JLine object

Parameters:
index - The new pointAt value
x - The new pointAt value
y - The new pointAt value
Returns:
No description provided

getFromPoints

public java.awt.Point getFromPoints(int index)
Get the fromPoints attribute of the JLine object

Parameters:
index - No description provided
Returns:
The fromPoints value

iteratorOfPoints

public java.util.ListIterator iteratorOfPoints(int start)
No comment provided by developer, please add a comment to improve documentation.

Parameters:
start - No description provided
Returns:
No description provided

iteratorOfPoints

public final java.util.ListIterator iteratorOfPoints()
No comment provided by developer, please add a comment to improve documentation.

Returns:
No description provided

iteratorOfPoints

public final java.util.ListIterator iteratorOfPoints(java.awt.Point pt)
No comment provided by developer, please add a comment to improve documentation.

Parameters:
pt - No description provided
Returns:
No description provided

sizeOfPoints

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

Returns:
No description provided

getNextFromPoints

public final java.awt.Point getNextFromPoints(java.awt.Point point)
Get the nextFromPoints attribute of the JLine object

Parameters:
point - No description provided
Returns:
The nextFromPoints value

getNextFromPoints

public java.awt.Point getNextFromPoints(int x,
                                        int y)
Get the nextFromPoints attribute of the JLine object

Parameters:
x - No description provided
y - No description provided
Returns:
The nextFromPoints value

getPrevFromPoints

public final java.awt.Point getPrevFromPoints(java.awt.Point point)
Get the prevFromPoints attribute of the JLine object

Parameters:
point - No description provided
Returns:
The prevFromPoints value

getPrevFromPoints

public java.awt.Point getPrevFromPoints(int x,
                                        int y)
Get the prevFromPoints attribute of the JLine object

Parameters:
x - No description provided
y - No description provided
Returns:
The prevFromPoints value

hasInPoints

public final boolean hasInPoints(java.awt.Point point)
No comment provided by developer, please add a comment to improve documentation.

Parameters:
point - No description provided
Returns:
No description provided

hasInPoints

public boolean hasInPoints(int x,
                           int y)
No comment provided by developer, please add a comment to improve documentation.

Parameters:
x - No description provided
y - No description provided
Returns:
No description provided

getIndexFromPoints

public final int getIndexFromPoints(java.awt.Point point)
Parameters:
point - No description provided
Returns:
the index of point or -1 if not in this line

getIndexFromPoints

public int getIndexFromPoints(int x,
                              int y)
Get the indexFromPoints attribute of the JLine object

Parameters:
x - No description provided
y - No description provided
Returns:
The indexFromPoints value

setLineDashed

public void setLineDashed(boolean dashed)
Sets the lineDashed attribute of the JLine object

Parameters:
dashed - The new lineDashed value

isLineDashed

public boolean isLineDashed()
Get the lineDashed attribute of the JLine object

Returns:
The lineDashed value

setThickness

public void setThickness(int newThickness)
Sets the thickness attribute of the JLine object

Parameters:
newThickness - The new thickness value

getThickness

public int getThickness()
Get the thickness attribute of the JLine object

Returns:
The thickness value

getDelta

public double getDelta()
Get the value of delta.

This value declares the "thickness" of the line.
Mouse actions that are at most in a distance of delta are considered to be on this line.

Returns:
Value of delta.
See Also:
setDelta(double), getDistance(Point), getDistance(int,int), contains(Point), contains(int,int)

setDelta

public void setDelta(double delta)
Set the value of delta.

This value declares the "thickness" of the line.
Mouse actions, that are at most in a distance of delta are considered to be on this line.

Parameters:
delta - Value to assign to delta.
See Also:
getDelta(), getDistance(Point), getDistance(int,int), contains(Point), contains(int,int)

getCx

protected double getCx()
x coeff to quickly calculate the distance of a point to a line

The value is cached until one of the endpoints changes, and then recalculated along with cy and length, when one of them is requested.

cx=dx/(dx**2+dy**2), where (dx, dy)=endPoint-startPoint

Returns:
The cx value
See Also:
getCy(), getLength(), #computeCoeffs, #invalidateCoeffs

getCy

protected double getCy()
y coeff to quickly calculate the distance of a point to a line

The value is cached until one of the endpoints changes, and then recalculated along with cx and length, when one of them is requested.

cy=dy/(dx**2+dy**2), where (dx, dy)=endPoint-startPoint

Returns:
The cy value
See Also:
getCy(), getLength(), #computeCoeffs, #invalidateCoeffs

getStartToEndDistance

public double getStartToEndDistance()
length of the line

The value is cached until one of the endpoints changes, and then recalculated along with cx and cy, when one of them is requested.

Returns:
The startToEndDistance value
See Also:
getCx(), getCy(), #computeCoeffs, #invalidateCoeffs

getLength

public double getLength()
Get the length attribute of the JLine object

Returns:
The length value

getDirection

public final java.awt.geom.Point2D getDirection(double d)
Get the direction attribute of the JLine object

Parameters:
d - No description provided
Returns:
The direction value

getDirection

public java.awt.geom.Point2D getDirection(double d,
                                          java.awt.geom.Point2D p)
Get the direction attribute of the JLine object

Parameters:
d - No description provided
p - No description provided
Returns:
The direction value

getDirection

public java.awt.geom.Point2D getDirection()
Get the direction attribute of the JLine object

Returns:
The direction value

getDirection

public java.awt.geom.Point2D getDirection(java.awt.geom.Point2D p)
Get the direction attribute of the JLine object

Parameters:
p - No description provided
Returns:
The direction value

getNormal

public final java.awt.geom.Point2D getNormal(double d)
Get the normal attribute of the JLine object

Parameters:
d - No description provided
Returns:
The normal value

getNormal

public java.awt.geom.Point2D getNormal(double d,
                                       java.awt.geom.Point2D p)
Get the normal attribute of the JLine object

Parameters:
d - No description provided
p - No description provided
Returns:
The normal value

getNormal

public java.awt.geom.Point2D getNormal()
Get the normal attribute of the JLine object

Returns:
The normal value

getNormal

public java.awt.geom.Point2D getNormal(java.awt.geom.Point2D p)
Get the normal attribute of the JLine object

Parameters:
p - No description provided
Returns:
The normal value

getAngle

public double getAngle(double d)
Get the angle attribute of the JLine object

Parameters:
d - No description provided
Returns:
The angle value

getAngle

public double getAngle()
Get the angle attribute of the JLine object

Returns:
The angle value

getPosition

public final double getPosition(java.awt.Point p)
Get the position attribute of the JLine object

Parameters:
p - No description provided
Returns:
The position value

getPosition

public double getPosition(int x,
                          int y)
Get the position attribute of the JLine object

Parameters:
x - No description provided
y - No description provided
Returns:
The position value

getPointAt

public java.awt.geom.Point2D getPointAt(double d)
Get the pointAt attribute of the JLine object

Parameters:
d - No description provided
Returns:
The pointAt value

doLayout

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


getPreferredBounds

public java.awt.Rectangle getPreferredBounds()
compute the bounds from the start- and endpoint and delta. Delegated to the UI of this object.

Returns:
The preferredBounds value
See Also:
getDelta(), getStartPoint(), getEndPoint(), #adjustBounds

setBounds

public void setBounds(int x,
                      int y,
                      int w,
                      int h)
set Bounds to parameters and update startPoint and endPoint accordingly.
The setting of the bounds is done in adjustBounds then.

Parameters:
x - x-position
y - y-position
w - width
h - height
See Also:
#adjustBounds

getPreferredSize

public java.awt.Dimension getPreferredSize()
Returns:
The preferredSize value
See Also:
getPreferredBounds()

contains

public boolean contains(int x,
                        int y)
Parameters:
x - x-coordinate
y - y-coordinate
Returns:
true if getDistance(x,y) < getDelta(), false otherwise
See Also:
contains(java.awt.Point), getDistance(java.awt.Point), getDistance(int, int)

contains

public final boolean contains(java.awt.Point p)
Parameters:
p - Point
Returns:
true if getDistance(p) < getDelta(), false otherwise
See Also:
contains(int, int), getDistance(java.awt.Point), getDistance(int, int)

getDistance

public final double getDistance(java.awt.Point p)
Parameters:
p - Point
Returns:
distance of p to line
See Also:
contains(java.awt.Point), contains(int, int), getDistance(int, int)

getDistance

public double getDistance(int x,
                          int y)
Parameters:
x - x-coordinate
y - y-coordinate
Returns:
distance of (x, y) to line
See Also:
contains(java.awt.Point), contains(int, int), getDistance(int, int)

setUI

public void setUI(javax.swing.plaf.ComponentUI ui)
Sets the UI of this class.

Parameters:
ui - the UI for this object. Must be a subclass of LineUI.

getUI

public LineUI getUI()
Get the uI attribute of the JLine object

Returns:
The uI value

setStroke

public void setStroke(java.awt.Stroke value)
Sets the stroke attribute of the JLine object

Parameters:
value - The new stroke value

getStroke

public java.awt.Stroke getStroke()
Get the stroke attribute of the JLine object

Returns:
The stroke value

toString

public java.lang.String toString()
Returns:
short string representation of current object

removeYou

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