public class IlvMakeHyperEdgeBaseInteractor extends IlvManagerViewInteractor implements IlvPermanentInteractorInterface
Modifier | Constructor and Description |
---|---|
protected |
IlvMakeHyperEdgeBaseInteractor()
Initialize the interactor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
attach(IlvManagerView v)
This method is called when the interactor is attached to the manager view.
|
protected void |
detach()
This method is called when the interactor is detached from the view.
|
Cursor |
getCursor()
Returns the cursor used for editing.
|
protected IlvGraphic |
getHighlightedGraphic()
Returns the highlighted graphic.
|
protected IlvHyperGrapherPin |
getHighlightedPin()
Returns the highlighted pin.
|
protected IlvTransformer |
getObjectDrawingTransformer(IlvGraphic g)
Returns the transformer the input object is drawn.
|
protected IlvGraphic |
getObjectToBeHighlighted(IlvPoint p,
boolean allowNode,
boolean allowHyperEdge)
Returns the object at the input position to be highlighted.
|
protected IlvHyperGrapherPin |
getPin(IlvPoint p)
Returns the pin at input position, or
null if there is no
pin at that position. |
Cursor |
getPinCursor()
Returns the cursor when the mouse is on top of a pin of a hyperedge
pin connector.
|
double |
getPinMargin()
Returns the the margin for pins.
|
protected void |
highlightObject(IlvGraphic object)
Highlight the input object.
|
protected void |
highlightPin(IlvPoint p)
If a hypergrapher pin is at the input position, this pin is highlighted.
|
boolean |
isCreationInSubManagersAllowed()
Returns
true if the creation of objects in submanagers
is allowed, and false otherwise. |
boolean |
isGridMode()
Returns
true if the interactor snaps the points
to the grid of the view. |
protected boolean |
isHyperEdge(IlvGraphic obj)
Tests if the object is managed by an
IlvHyperGrapher and if the
object is a hyperedge in this IlvHyperGrapher . |
protected boolean |
isManagerToBeHighlighted(IlvPoint p,
IlvManager manager)
Check whether the manager is to be highlighted.
|
protected boolean |
isNode(IlvGraphic obj)
Tests if the object is managed by an
IlvHyperGrapher and if the
object is a node in this IlvHyperGrapher . |
boolean |
isPermanent()
Returns
false if the interactor will be removed from the
view once the object is created. |
protected void |
reInitialize()
Reinitializes the interactor.
|
void |
setCreationInSubManagersAllowed(boolean set)
Allows objects to be created in submanagers
(see
IlvManager.getManagers() ). |
void |
setCursor(Cursor cursor)
Changes the cursor used for editing.
|
void |
setGridMode(boolean enable)
Changes the way the interactor works with the grid.
|
void |
setPermanent(boolean permanent)
Specifies if the interactor will be removed from the view once
the object is created.
|
void |
setPinCursor(Cursor cursor)
Changes the cursor when the mouse is on top of a pin of a hyperedge
pin connector.
|
void |
setPinMargin(double margin)
Sets the margin for pins.
|
protected void |
setPinSelected(IlvHyperGrapherPin pin,
boolean selected)
Select or deselect a pin of a hyperedge pin connector.
|
addFocusListener, addKeyListener, addMouseListener, addMouseMotionListener, allowEnsureVisible, allowEnsureVisible, disableEvents, drawGhost, drawGhost, enableEvents, ensureVisible, ensureVisible, getManager, getManagerView, getTransformer, handleExpose, isXORGhost, processEvent, processFocusEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, removeFocusListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, setXORGhost
protected IlvMakeHyperEdgeBaseInteractor()
public boolean isGridMode()
true
if the interactor snaps the points
to the grid of the view. The default value is true
.IlvGrid
,
setGridMode(boolean)
public final void setGridMode(boolean enable)
enable
- If true
, the interactor snaps points to the
grid.IlvGrid
,
isGridMode()
public double getPinMargin()
setPinMargin(double)
public final void setPinMargin(double margin)
getPinMargin()
public final boolean isPermanent()
false
if the interactor will be removed from the
view once the object is created.
The default value is false
.isPermanent
in interface IlvPermanentInteractorInterface
setPermanent(boolean)
public final void setPermanent(boolean permanent)
false
.setPermanent
in interface IlvPermanentInteractorInterface
permanent
- the new mode.isPermanent()
public boolean isCreationInSubManagersAllowed()
true
if the creation of objects in submanagers
is allowed, and false
otherwise.setCreationInSubManagersAllowed(boolean)
public void setCreationInSubManagersAllowed(boolean set)
IlvManager.getManagers()
). If creation in
submanagers is not allowed, the object is always created in the
IlvManager
displayed by the IlvManagerView
to which this interactor is attached.
Disabling this option for hyperedges means also that creation of intergraph hyperedges is not allowed.
The default value is true
isCreationInSubManagersAllowed()
public Cursor getCursor()
setCursor(java.awt.Cursor)
public void setCursor(Cursor cursor)
getCursor()
public Cursor getPinCursor()
setCursor(java.awt.Cursor)
public void setPinCursor(Cursor cursor)
getCursor()
protected void attach(IlvManagerView v)
attach
in class IlvManagerViewInteractor
v
- The manager view.detach()
protected void detach()
detach
in class IlvManagerViewInteractor
attach(ilog.views.IlvManagerView)
protected void reInitialize()
attach(ilog.views.IlvManagerView)
and detach()
.
You do not have to use this method.protected void setPinSelected(IlvHyperGrapherPin pin, boolean selected)
protected IlvHyperGrapherPin getPin(IlvPoint p)
null
if there is no
pin at that position.protected void highlightPin(IlvPoint p)
protected IlvHyperGrapherPin getHighlightedPin()
protected IlvGraphic getObjectToBeHighlighted(IlvPoint p, boolean allowNode, boolean allowHyperEdge)
p
- The position in view coordinates.allowNode
- Whether we search for a node.allowHyperEdge
- Whether we search for a hyperedge.protected void highlightObject(IlvGraphic object)
protected IlvGraphic getHighlightedGraphic()
protected boolean isNode(IlvGraphic obj)
IlvHyperGrapher
and if the
object is a node in this IlvHyperGrapher
.protected boolean isHyperEdge(IlvGraphic obj)
IlvHyperGrapher
and if the
object is a hyperedge in this IlvHyperGrapher
.protected boolean isManagerToBeHighlighted(IlvPoint p, IlvManager manager)
p
- The point in the coordinate system of the view.manager
- The manager to be tested.protected IlvTransformer getObjectDrawingTransformer(IlvGraphic g)
g
- The object to be drawn.© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.