Package com.luciad.view.gxy.controller
Class TLcdGXYNewController
java.lang.Object
com.luciad.view.gxy.controller.ALcdGXYController
com.luciad.view.gxy.controller.ALcdGXYSmartController
com.luciad.view.gxy.controller.TLcdGXYNewController
- All Implemented Interfaces:
ILcdUndoableSource
,ILcdStatusSource
,ILcdGXYController
,KeyListener
,MouseListener
,MouseMotionListener
,Serializable
,EventListener
public class TLcdGXYNewController
extends ALcdGXYSmartController
implements MouseListener, MouseMotionListener
Deprecated.
Creates an object, initializes it by interacting with the mouse
through a sequence of mouse events and adds it to one of the a layer in a view.
The controller is configured with a controller model which determines
- the choice of an
ILcdGXYLayer
, - the object to create,
- the addition of the new
Object
in the chosenILcdGXYLayer
Before this controller can be used on a view, the controller model has to be set.
Please refer to ALcdGXYNewControllerModel
for undo/redo support.
- See Also:
-
Constructor Summary
ConstructorDescriptionDeprecated.Constructs a controller to create and initialize new objects via mouse interaction.TLcdGXYNewController
(boolean aRegisterInstance) Deprecated.use the constructor without parameters.TLcdGXYNewController
(ILcdGXYNewControllerModel aControllerModel) Deprecated.Constructs a controller to create and initialize new objects via mouse interaction. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addPropertyChangeListener
(PropertyChangeListener aPropertyChangeListener) Deprecated.void
cancelEdit
(MouseEvent aMouseEvent) Deprecated.Cancels the creation of the object.protected void
doPanGXYView
(int aDeltaX, int aDeltaY) Deprecated.Performs the pan of thisILcdGXYController
ILcdGXYView
protected void
doZoomGXYView
(double aDoubleFactor) Deprecated.Performs the zoom of thisILcdGXYController
ILcdGXYView
void
finishEdit
(MouseEvent aMouseEvent) Deprecated.Finishes creation of the object.Deprecated.Returns theILcdAction
that will be will be triggered just after thisILcdGXYController
has created a newObject
, initialized it and added it to anILcdModel
.Deprecated.Returns theILcdGXYNewControllerModel
thisTLcdGXYNewController
delegates to.int
Deprecated.Returns the margin to extend the dirty region when repainting only part of the view.protected Object
Deprecated.Returns the object that the NewController is creating.int
Deprecated.UseALcdGXYNewControllerModel.addUndoableListener(com.luciad.gui.ILcdUndoableListener)
for undo/redo support.Deprecated.Returns the Objects to snap to when initializing a new created Object:null
is a valid returned value.int
Deprecated.UseALcdGXYNewControllerModel.addUndoableListener(com.luciad.gui.ILcdUndoableListener)
for undo/redo support.protected boolean
isContinueEdit
(int aPointCount, MouseEvent aMouseEvent) Deprecated.Returnstrue
if creation is not yet finished,false
otherwise.boolean
Deprecated.This method has been deprecated.boolean
Deprecated.Returns whether the new controller repaints only part of the ILcdGXYView while creating.void
mouseDragged
(MouseEvent aMouseEvent) Deprecated.void
Deprecated.Only pans the view when an object is actively being created.void
mouseMoved
(MouseEvent aMouseEvent) Deprecated.protected void
mouseMovedOrDragged
(MouseEvent aMouseEvent) Deprecated.Handles what should be done to visualize the creation of the object.void
mouseReleased
(MouseEvent aMouseEvent) Deprecated.void
Deprecated.Enables the controller to give visual feedback on the current user interactions.void
redo()
Deprecated.UseALcdGXYNewControllerModel.addUndoableListener(com.luciad.gui.ILcdUndoableListener)
for undo/redo support.void
removePropertyChangeListener
(PropertyChangeListener aPropertyChangeListener) Deprecated.void
Deprecated.UseALcdGXYNewControllerModel.addUndoableListener(com.luciad.gui.ILcdUndoableListener)
for undo/redo support.void
setActionToTriggerAfterCreation
(ILcdAction aNewActionToTriggerAfterCreation) Deprecated.Sets theILcdAction
that will be triggered just after thisILcdGXYController
has created a newObject
and added it to anILcdModel
.void
setControllerModel
(ILcdGXYNewControllerModel aControllerModel) Deprecated.Sets theILcdGXYNewControllerModel
to delegate to.void
setEditingBoundsForRepaintMargin
(int aEditingBoundsForRepaintMargin) Deprecated.Sets the margin to extend the dirty region when repainting only part of the view.void
setSnappables
(ILcdGXYLayerSubsetList aNewSnappables) Deprecated.Sets the Objects to snap to when initializing a new created Object:null
is a valid argument.void
setTraceOn
(boolean aTraceOn) Deprecated.This method has been deprecated.void
setUseEditingBoundsForRepaint
(boolean aUseEditingBoundsForRepaint) Deprecated.Sets whether the new controller should repaint only part of the ILcdGXYView while creating.void
startInteraction
(ILcdGXYView aGXYView) Deprecated.Sets up the controller to receive input through the view passed.void
terminateInteraction
(ILcdGXYView aGXYView) Deprecated.Releases a few items.void
undo()
Deprecated.UseALcdGXYNewControllerModel.addUndoableListener(com.luciad.gui.ILcdUndoableListener)
for undo/redo support.Methods inherited from class com.luciad.view.gxy.controller.ALcdGXYSmartController
addUndoableListener, fireUndoableEvent, getDownPanChars, getDownPanCodes, getLeftPanChars, getLeftPanCodes, getPanAbsDelta, getPanAbsDelta, getRightPanChars, getRightPanCodes, getUndoableListenerCount, getUpPanChars, getUpPanCodes, getZoomInChars, getZoomInCodes, getZoomOutChars, getZoomOutCodes, isDragging, isPanOnMouseDragExit, isPanOnMouseMoveExit, isPanUndoable, isRequestFocusOnMouseEntered, isRequestFocusOnMousePressed, isZoomUndoable, keyPressed, keyReleased, keyTyped, mouseClicked, mouseEntered, mousePressed, removeUndoableListener, setDownPanChars, setDownPanCodes, setIsDragging, setLeftPanChars, setLeftPanCodes, setPanAbsDelta, setPanOnMouseDragExit, setPanOnMouseMoveExit, setPanUndoable, setRequestFocusOnMouseEntered, setRequestFocusOnMousePressed, setRightPanChars, setRightPanCodes, setUpPanChars, setUpPanCodes, setZoomInChars, setZoomInCodes, setZoomOutChars, setZoomOutCodes, setZoomUndoable, updateViewLocationAfterZoomSFCT
Methods inherited from class com.luciad.view.gxy.controller.ALcdGXYController
addStatusListener, asGXYController, fireStatusEvent, getCursor, getGXYView, getIcon, getName, getShortDescription, registerInstance, removeStatusListener, retrieveGXYViewXYWorldTransformation, setClassTraceOn, setCursor, setGXYView, setIcon, setName, setShortDescription, viewRepaint
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.luciad.view.gxy.ILcdGXYController
getLayered
Methods inherited from interface java.awt.event.MouseListener
mouseClicked, mouseEntered, mousePressed
-
Constructor Details
-
TLcdGXYNewController
public TLcdGXYNewController()Deprecated.Constructs a controller to create and initialize new objects via mouse interaction. Note that a controller model has to be set before this controller can be used on a view.- See Also:
-
TLcdGXYNewController
Deprecated.Constructs a controller to create and initialize new objects via mouse interaction.- Parameters:
aControllerModel
- the model that defines what type of object will be created and how and where it will be displayed in the view.
-
TLcdGXYNewController
public TLcdGXYNewController(boolean aRegisterInstance) Deprecated.use the constructor without parameters.- Parameters:
aRegisterInstance
- whether to register this controller as a Bean.
-
-
Method Details
-
setTraceOn
public void setTraceOn(boolean aTraceOn) Deprecated.This method has been deprecated. It is recommended to use the standard Java logging framework directly.Enables tracing for this class instance. Calling this method with eithertrue
orfalse
as argument automatically turns off tracing for all other class instances for whichsetTraceOn
has not been called. If the argument isfalse
then only the informative, warning and error log messages are recorded.- Overrides:
setTraceOn
in classALcdGXYSmartController
- Parameters:
aTraceOn
- if true then all log messages are recorded for this instance. If false, then only the informative, warning and error log messages are recorded.
-
isTraceOn
public boolean isTraceOn()Deprecated.This method has been deprecated. It is recommended to use the standard Java logging framework directly.Returnstrue
if tracing is enabled for this class.- Overrides:
isTraceOn
in classALcdGXYSmartController
- Returns:
- true if tracing is enabled for this class, false otherwise.
-
startInteraction
Deprecated.Description copied from class:ALcdGXYController
Sets up the controller to receive input through the view passed.All
ILcdGXYView
implementations that support interaction call this method when the controller has been made active withsetGXYController
on the view, so this method shouldn't normally be called directly. Note that most view implementations add the controller as listener if appropriate before calling this method.Sets the cursor on the view and sets the view for which this controller is now active. Sends out a status event based on the
short description
.- Specified by:
startInteraction
in interfaceILcdGXYController
- Overrides:
startInteraction
in classALcdGXYSmartController
- Parameters:
aGXYView
- theILcdGXYView
thisILcdGXYController
will interact with.- See Also:
-
terminateInteraction
Deprecated.Description copied from class:ALcdGXYController
Releases a few items. Can be redefined but this 'super' method should be called too.- Specified by:
terminateInteraction
in interfaceILcdGXYController
- Overrides:
terminateInteraction
in classALcdGXYSmartController
- Parameters:
aGXYView
- theILcdGXYView
thisILcdGXYController
interacted with.- See Also:
-
isContinueEdit
Deprecated.Returnstrue
if creation is not yet finished,false
otherwise.- Parameters:
aPointCount
- the number of points created until nowaMouseEvent
- the current mouse event- Returns:
- true when any of the following holds:
- the number of points created is less than the number required to create the shape returned by the controller model;
- the creation click count is unlimited and no double-click, right or middle button click has occurred.
- See Also:
-
doPanGXYView
protected void doPanGXYView(int aDeltaX, int aDeltaY) Deprecated.Description copied from class:ALcdGXYSmartController
Performs the pan of thisILcdGXYController
ILcdGXYView
- Overrides:
doPanGXYView
in classALcdGXYSmartController
- Parameters:
aDeltaX
- delta along the X axis, in AWT pixelsaDeltaY
- delta along the Y axis, in AWT pixels
-
doZoomGXYView
protected void doZoomGXYView(double aDoubleFactor) Deprecated.Description copied from class:ALcdGXYSmartController
Performs the zoom of thisILcdGXYController
ILcdGXYView
- Overrides:
doZoomGXYView
in classALcdGXYSmartController
- Parameters:
aDoubleFactor
- zoom factor with which to multiply the view's scale
-
mouseDragged
Deprecated.- Specified by:
mouseDragged
in interfaceMouseMotionListener
- Overrides:
mouseDragged
in classALcdGXYSmartController
-
mouseMoved
Deprecated.- Specified by:
mouseMoved
in interfaceMouseMotionListener
- Overrides:
mouseMoved
in classALcdGXYSmartController
-
mouseMovedOrDragged
Deprecated.Handles what should be done to visualize the creation of the object.- Parameters:
aMouseEvent
- the current mouse event.
-
paint
Deprecated.Description copied from class:ALcdGXYController
Enables the controller to give visual feedback on the current user interactions. Note that the controller is responsible for repainting the view.Empty implementation. Redefine this method to render on the Graphics on which the view is rendered.
- Specified by:
paint
in interfaceILcdGXYController
- Overrides:
paint
in classALcdGXYController
- Parameters:
aGraphics
- the Graphics on which the view was rendered.
-
finishEdit
Deprecated.Finishes creation of the object. At this time the object is ready to be added into an ILcdGXYLayer. If there is a action to trigger after creation, it is called within this method.- Parameters:
aMouseEvent
- the last mouse event.
-
cancelEdit
Deprecated.Cancels the creation of the object. The action to trigger after creation is called within this method.- Parameters:
aMouseEvent
- the current mouse event.
-
mouseReleased
Deprecated.- Specified by:
mouseReleased
in interfaceMouseListener
- Overrides:
mouseReleased
in classALcdGXYSmartController
-
setControllerModel
Deprecated.Sets theILcdGXYNewControllerModel
to delegate to.- Parameters:
aControllerModel
- theILcdGXYNewControllerModel
to delegate to.- See Also:
-
getControllerModel
Deprecated.Returns theILcdGXYNewControllerModel
thisTLcdGXYNewController
delegates to.- Returns:
- the
ILcdGXYNewControllerModel
thisTLcdGXYNewController
delegates to. - See Also:
-
getUndoLeft
public int getUndoLeft()Deprecated.UseALcdGXYNewControllerModel.addUndoableListener(com.luciad.gui.ILcdUndoableListener)
for undo/redo support. -
getRedoLeft
public int getRedoLeft()Deprecated.UseALcdGXYNewControllerModel.addUndoableListener(com.luciad.gui.ILcdUndoableListener)
for undo/redo support. -
resetUndoHistory
public void resetUndoHistory()Deprecated.UseALcdGXYNewControllerModel.addUndoableListener(com.luciad.gui.ILcdUndoableListener)
for undo/redo support. -
undo
public void undo()Deprecated.UseALcdGXYNewControllerModel.addUndoableListener(com.luciad.gui.ILcdUndoableListener)
for undo/redo support. -
redo
public void redo()Deprecated.UseALcdGXYNewControllerModel.addUndoableListener(com.luciad.gui.ILcdUndoableListener)
for undo/redo support. -
addPropertyChangeListener
Deprecated. -
removePropertyChangeListener
Deprecated. -
setActionToTriggerAfterCreation
Deprecated.Sets theILcdAction
that will be triggered just after thisILcdGXYController
has created a newObject
and added it to anILcdModel
. It might be interesting for example to set anILcdGXYController
( using aTLcdGXYSetControllerAction
) that can edit the newObject
, just after this one has been created and initialized. When no action is set, the new controller model will be requested for an object and a layer when creation has been finished or has been canceled.- Parameters:
aNewActionToTriggerAfterCreation
- theILcdAction
to be triggered ornull
if noILcdAction
has to be triggered.- See Also:
-
getActionToTriggerAfterCreation
Deprecated.Returns theILcdAction
that will be will be triggered just after thisILcdGXYController
has created a newObject
, initialized it and added it to anILcdModel
.- Returns:
- the
ILcdAction
to be triggered after creation of a new Object. - See Also:
-
setSnappables
Deprecated.Sets the Objects to snap to when initializing a new created Object:null
is a valid argument.- Parameters:
aNewSnappables
- the new value for the snappables property.null
is a valid argument.- See Also:
-
getSnappables
Deprecated.Returns the Objects to snap to when initializing a new created Object:null
is a valid returned value.- Returns:
- the Objects to snap to when initializing a new created Object:
null
is a valid returned value. - See Also:
-
getObject
Deprecated.Returns the object that the NewController is creating.- Returns:
- the object that the NewController is creating.
-
isUseEditingBoundsForRepaint
public boolean isUseEditingBoundsForRepaint()Deprecated.Returns whether the new controller repaints only part of the ILcdGXYView while creating.- Returns:
- whether the new controller repaints only part of the ILcdGXYView while creating.
- Since:
- 3.1
- See Also:
-
setUseEditingBoundsForRepaint
public void setUseEditingBoundsForRepaint(boolean aUseEditingBoundsForRepaint) Deprecated.Sets whether the new controller should repaint only part of the ILcdGXYView while creating. The default value isfalse
.
In order to use this mode theILcdGXYPainter
of the object under creation should properly implement the methodILcdGXYPainter.boundsSFCT
, i.c., they should take the modesILcdGXYPainter.CREATING
,ILcdGXYPainter.TRANSLATING
, andILcdGXYPainter.RESHAPING
into account.- Parameters:
aUseEditingBoundsForRepaint
- the new useClip value.- Since:
- 3.1
- See Also:
-
getEditingBoundsForRepaintMargin
public int getEditingBoundsForRepaintMargin()Deprecated.Returns the margin to extend the dirty region when repainting only part of the view. It is only used if the propertyuseEditingBoundsForRepaint
is true. It is expressed in screen pixels.- Returns:
- the margin to extend the dirty region when repainting only part of the view.
- See Also:
-
setEditingBoundsForRepaintMargin
public void setEditingBoundsForRepaintMargin(int aEditingBoundsForRepaintMargin) Deprecated.Sets the margin to extend the dirty region when repainting only part of the view. It is only used if the propertyuseEditingBoundsForRepaint
is true. It is expressed in screen pixels.- Parameters:
aEditingBoundsForRepaintMargin
- the neweditingBoundsForRepaintMargin
value (screen pixels).- See Also:
-
mouseExited
Deprecated.Only pans the view when an object is actively being created.- Specified by:
mouseExited
in interfaceMouseListener
- Overrides:
mouseExited
in classALcdGXYSmartController
- Parameters:
me
- the mouse event indicating that the mouse has left the view.- See Also:
-
TLcdGXYNewController2
. The functionality of this class will remain present as is.