站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > NetBeans API Javadoc (Current Development Version)

FreeConnectionWidget (Visual Library API) - NetBeans API Javadoc (Current Development Version)

org.netbeans.api.visual 2.2

org.netbeans.api.visual.widget
Class FreeConnectionWidget

java.lang.Object
  extended by org.netbeans.api.visual.widget.Widget
      extended by org.netbeans.api.visual.widget.ConnectionWidget
          extended by org.netbeans.api.visual.widget.FreeConnectionWidget

public class FreeConnectionWidget
extends ConnectionWidget

This class is an extension of the ConnectionWidget. Primarily it is used with FreeRouter and optionally Free*Anchor. It has a method for adding and removing control points on specific locations.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.netbeans.api.visual.widget.Widget
Widget.Dependency
 
Constructor Summary
FreeConnectionWidget(Scene scene)
          Creates a free connection widget.
FreeConnectionWidget(Scene scene, double createSensitivity, double deleteSensitivity)
          Creates a free connection widget with a specified create/delete sensitivity.
 
Method Summary
 void addRemoveControlPoint(Point localLocation)
          Adds or removes a control point on a specified location
 Point getControlPoint(int index)
          Returns a control point at a specific index.
 void setSensitivity(double createSensitivity, double deleteSensitivity)
          Sets a sensitivity.
 
Methods inherited from class org.netbeans.api.visual.widget.ConnectionWidget
calculateClientArea, calculateRouting, getControlPointHitAt, getControlPoints, getControlPointShape, getEndPointShape, getFirstControlPoint, getLastControlPoint, getLineColor, getRouter, getSourceAnchor, getSourceAnchorEntry, getSourceAnchorShape, getStroke, getTargetAnchor, getTargetAnchorEntry, getTargetAnchorShape, getTargetAnchorShapeRotation, isFirstControlPointHitAt, isHitAt, isLastControlPointHitAt, isPaintControlPoints, isRouted, isValidated, notifyStateChanged, paintWidget, removeConstraint, reroute, setConstraint, setConstraint, setControlPoints, setControlPointShape, setEndPointShape, setLineColor, setPaintControlPoints, setRouter, setSourceAnchor, setSourceAnchorShape, setStroke, setTargetAnchor, setTargetAnchorShape
 
Methods inherited from class org.netbeans.api.visual.widget.Widget
addChild, addChild, addChild, addChild, addChildren, addDependency, bringToBack, bringToFront, convertLocalToScene, convertLocalToScene, convertSceneToLocal, convertSceneToLocal, createActions, equals, getAccessibleContext, getActions, getActions, getBackground, getBorder, getBounds, getChildConstraint, getChildren, getClientArea, getCursor, getFont, getForeground, getGraphics, getLayout, getLocation, getLookup, getMaximumSize, getMinimumSize, getParentWidget, getPreferredBounds, getPreferredLocation, getPreferredSize, getScene, getState, getToolTipText, hashCode, isCheckClipping, isEnabled, isOpaque, isPreferredBoundsSet, isRepaintRequiredForRevalidating, isVisible, notifyAdded, notifyRemoved, paint, paintBackground, paintBorder, paintChildren, removeChild, removeChildren, removeChildren, removeDependency, removeFromParent, repaint, resolveBounds, revalidate, revalidate, setAccessibleContext, setBackground, setBorder, setBorder, setCheckClipping, setChildConstraint, setCursor, setEnabled, setFont, setForeground, setLayout, setMaximumSize, setMinimumSize, setOpaque, setPreferredBounds, setPreferredLocation, setPreferredSize, setState, setToolTipText, setVisible
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FreeConnectionWidget

public FreeConnectionWidget(Scene scene)
Creates a free connection widget.

Parameters:
scene - the scene

FreeConnectionWidget

public FreeConnectionWidget(Scene scene,
                            double createSensitivity,
                            double deleteSensitivity)
Creates a free connection widget with a specified create/delete sensitivity.

Parameters:
scene - the scene
createSensitivity - the sensitivity for adding a control point
deleteSensitivity - the sensitivity for removing a control point
Method Detail

addRemoveControlPoint

public void addRemoveControlPoint(Point localLocation)
Adds or removes a control point on a specified location

Parameters:
localLocation - the local location

getControlPoint

public Point getControlPoint(int index)
Returns a control point at a specific index.

Overrides:
getControlPoint in class ConnectionWidget
Parameters:
index - the index in the list of control points
Returns:
the control point at specified index; null, if the connection widget does not have control points
Throws:
ArrayIndexOutOfBoundsException - when index is out of bounds

setSensitivity

public void setSensitivity(double createSensitivity,
                           double deleteSensitivity)
Sets a sensitivity.

Parameters:
createSensitivity - the sensitivity for adding a control point
deleteSensitivity - the sensitivity for removing a control point

org.netbeans.api.visual 2.2

Built on May 28 2007.  |  Portions Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.