public class IlvSeeThroughInteractor extends IlvManagerViewInteractor implements IlvPermanentInteractorInterface
IlvSeeThroughConfigurationPanel
is provided as a default
configuration tool to interactively select layers in a Swing GUI.
Example of use :
IlvManagerView view = getManagerView(); IlvSeeThroughInteractor interactor = new IlvSeeThroughInteractor(); interactor.addLayer(view.getManager().getManagerLayer(0)); view.setInteractor(interactor);
IlvSeeThroughConfigurationPanel
,
Serialized FormConstructor and Description |
---|
IlvSeeThroughInteractor()
Constructs and initializes a new instance of the
IlvSeeThroughInteractor . |
Modifier and Type | Method and Description |
---|---|
void |
addLayer(IlvManagerLayer layer)
Add a layer to the list of registered layers.
|
protected void |
attach(IlvManagerView view)
Called when the interactor is attached to the manager view.
|
protected void |
detach()
Called when the interactor is detached from the view.
|
protected void |
drawSeeThrough(Graphics g)
Draws the see through tool.
|
protected IlvRect |
getDrawingRect()
Returns the rectangle representing the area in which the layers are drawn.
|
ArrayList<IlvManagerLayer> |
getLayers()
Retrieves the list of registered layers.
|
int |
getSize()
Retrieves the size of the revealed area.
|
protected void |
handleExpose(Graphics g)
Called by the view when the view is drawn, it actually calls the method
that draws the see through tool using
drawSeeThrough(java.awt.Graphics) . |
boolean |
isIncludeRegisteredLayers()
Tells if the registered layer list is included in the drawing or not.
|
boolean |
isPermanent()
Returns
true if the interactor operates in permanent mode;
false otherwise. |
protected void |
processMouseEvent(MouseEvent e)
Processes the mouse events.
|
protected void |
processMouseMotionEvent(MouseEvent e)
Processes the mouse motion events.
|
void |
removeLayer(IlvManagerLayer layer)
Remove a layer from the list of registered layers.
|
void |
setIncludeRegisteredLayers(boolean set)
Tells the interactor if the list of registered layers are to be drawn or
excluded from the drawing.
|
void |
setLayers(ArrayList<IlvManagerLayer> layers)
Register a layer list for this interactor.
|
void |
setPermanent(boolean set)
Changes the mode of the interactor.
|
void |
setSize(int size)
Sets the size of the magnification area.
|
addFocusListener, addKeyListener, addMouseListener, addMouseMotionListener, allowEnsureVisible, allowEnsureVisible, disableEvents, drawGhost, drawGhost, enableEvents, ensureVisible, ensureVisible, getManager, getManagerView, getTransformer, isXORGhost, processEvent, processFocusEvent, processKeyEvent, removeFocusListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, setXORGhost
public IlvSeeThroughInteractor()
IlvSeeThroughInteractor
. The size of the revealed area is set
to 128 pixels.protected void attach(IlvManagerView view)
attach
in class IlvManagerViewInteractor
view
- The manager view.IlvManagerViewInteractor.detach()
protected void detach()
detach
in class IlvManagerViewInteractor
IlvManagerViewInteractor.attach(ilog.views.IlvManagerView)
protected void processMouseEvent(MouseEvent e)
processMouseEvent
in class IlvManagerViewInteractor
e
- The mouse event.IlvManagerViewInteractor.addMouseListener(java.awt.event.MouseListener)
protected void processMouseMotionEvent(MouseEvent e)
processMouseMotionEvent
in class IlvManagerViewInteractor
e
- The mouse motion event.IlvManagerViewInteractor.addMouseMotionListener(java.awt.event.MouseMotionListener)
public final void setSize(int size)
size
- The size to be set, in view coordinate values.getSize()
protected void drawSeeThrough(Graphics g)
getDrawingRect()
method to
return a rectangle containing the additional drawings.g
- The view graphics.protected void handleExpose(Graphics g)
drawSeeThrough(java.awt.Graphics)
.handleExpose
in class IlvManagerViewInteractor
g
- The view graphics.IlvManagerViewInteractor.drawGhost(java.awt.Graphics)
,
IlvManagerViewInteractor.isXORGhost()
,
IlvManagerView.getDefaultXORColor()
protected IlvRect getDrawingRect()
public boolean isPermanent()
true
if the interactor operates in permanent mode;
false
otherwise.isPermanent
in interface IlvPermanentInteractorInterface
public void setPermanent(boolean set)
setPermanent
in interface IlvPermanentInteractorInterface
set
- the new mode.public void setLayers(ArrayList<IlvManagerLayer> layers)
isIncludeRegisteredLayers
layers
- The list of IlvManagerLayer
s to register.isIncludeRegisteredLayers()
,
setIncludeRegisteredLayers(boolean)
public void addLayer(IlvManagerLayer layer)
layer
- The IlvManagerLayer
to add.public void removeLayer(IlvManagerLayer layer)
layer
- The IlvManagerLayer
to remove.public ArrayList<IlvManagerLayer> getLayers()
ArrayList
containing registered
IlvManagerLayer
public int getSize()
public boolean isIncludeRegisteredLayers()
true
if the layers are included,
false otherwise
.public void setIncludeRegisteredLayers(boolean set)
set
- pass true
to include the layers, false
to exclude them.© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.