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
Objectin 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
ConstructorsConstructorDescriptionDeprecated.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 TypeMethodDescriptionvoidaddPropertyChangeListener(PropertyChangeListener aPropertyChangeListener) Deprecated.voidcancelEdit(MouseEvent aMouseEvent) Deprecated.Cancels the creation of the object.protected voiddoPanGXYView(int aDeltaX, int aDeltaY) Deprecated.Performs the pan of thisILcdGXYControllerILcdGXYViewprotected voiddoZoomGXYView(double aDoubleFactor) Deprecated.Performs the zoom of thisILcdGXYControllerILcdGXYViewvoidfinishEdit(MouseEvent aMouseEvent) Deprecated.Finishes creation of the object.Deprecated.Returns theILcdActionthat will be will be triggered just after thisILcdGXYControllerhas created a newObject, initialized it and added it to anILcdModel.Deprecated.Returns theILcdGXYNewControllerModelthisTLcdGXYNewControllerdelegates to.intDeprecated.Returns the margin to extend the dirty region when repainting only part of the view.protected ObjectDeprecated.Returns the object that the NewController is creating.intDeprecated.UseALcdGXYNewControllerModel.addUndoableListener(com.luciad.gui.ILcdUndoableListener)for undo/redo support.Deprecated.Returns the Objects to snap to when initializing a new created Object:nullis a valid returned value.intDeprecated.UseALcdGXYNewControllerModel.addUndoableListener(com.luciad.gui.ILcdUndoableListener)for undo/redo support.protected booleanisContinueEdit(int aPointCount, MouseEvent aMouseEvent) Deprecated.Returnstrueif creation is not yet finished,falseotherwise.booleanDeprecated.This method has been deprecated.booleanDeprecated.Returns whether the new controller repaints only part of the ILcdGXYView while creating.voidmouseDragged(MouseEvent aMouseEvent) Deprecated.voidDeprecated.Only pans the view when an object is actively being created.voidmouseMoved(MouseEvent aMouseEvent) Deprecated.protected voidmouseMovedOrDragged(MouseEvent aMouseEvent) Deprecated.Handles what should be done to visualize the creation of the object.voidmouseReleased(MouseEvent aMouseEvent) Deprecated.voidDeprecated.Enables the controller to give visual feedback on the current user interactions.voidredo()Deprecated.UseALcdGXYNewControllerModel.addUndoableListener(com.luciad.gui.ILcdUndoableListener)for undo/redo support.voidremovePropertyChangeListener(PropertyChangeListener aPropertyChangeListener) Deprecated.voidDeprecated.UseALcdGXYNewControllerModel.addUndoableListener(com.luciad.gui.ILcdUndoableListener)for undo/redo support.voidsetActionToTriggerAfterCreation(ILcdAction aNewActionToTriggerAfterCreation) Deprecated.Sets theILcdActionthat will be triggered just after thisILcdGXYControllerhas created a newObjectand added it to anILcdModel.voidsetControllerModel(ILcdGXYNewControllerModel aControllerModel) Deprecated.Sets theILcdGXYNewControllerModelto delegate to.voidsetEditingBoundsForRepaintMargin(int aEditingBoundsForRepaintMargin) Deprecated.Sets the margin to extend the dirty region when repainting only part of the view.voidsetSnappables(ILcdGXYLayerSubsetList aNewSnappables) Deprecated.Sets the Objects to snap to when initializing a new created Object:nullis a valid argument.voidsetTraceOn(boolean aTraceOn) Deprecated.This method has been deprecated.voidsetUseEditingBoundsForRepaint(boolean aUseEditingBoundsForRepaint) Deprecated.Sets whether the new controller should repaint only part of the ILcdGXYView while creating.voidstartInteraction(ILcdGXYView aGXYView) Deprecated.Sets up the controller to receive input through the view passed.voidterminateInteraction(ILcdGXYView aGXYView) Deprecated.Releases a few items.voidundo()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, updateViewLocationAfterZoomSFCTMethods 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, viewRepaintMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.luciad.view.gxy.ILcdGXYController
getLayeredMethods 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 eithertrueorfalseas argument automatically turns off tracing for all other class instances for whichsetTraceOnhas not been called. If the argument isfalsethen only the informative, warning and error log messages are recorded.- Overrides:
setTraceOnin 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.Returnstrueif tracing is enabled for this class.- Overrides:
isTraceOnin classALcdGXYSmartController- Returns:
- true if tracing is enabled for this class, false otherwise.
-
startInteraction
Deprecated.Description copied from class:ALcdGXYControllerSets up the controller to receive input through the view passed.All
ILcdGXYViewimplementations that support interaction call this method when the controller has been made active withsetGXYControlleron 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:
startInteractionin interfaceILcdGXYController- Overrides:
startInteractionin classALcdGXYSmartController- Parameters:
aGXYView- theILcdGXYViewthisILcdGXYControllerwill interact with.- See Also:
-
terminateInteraction
Deprecated.Description copied from class:ALcdGXYControllerReleases a few items. Can be redefined but this 'super' method should be called too.- Specified by:
terminateInteractionin interfaceILcdGXYController- Overrides:
terminateInteractionin classALcdGXYSmartController- Parameters:
aGXYView- theILcdGXYViewthisILcdGXYControllerinteracted with.- See Also:
-
isContinueEdit
Deprecated.Returnstrueif creation is not yet finished,falseotherwise.- 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:ALcdGXYSmartControllerPerforms the pan of thisILcdGXYControllerILcdGXYView- Overrides:
doPanGXYViewin 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:ALcdGXYSmartControllerPerforms the zoom of thisILcdGXYControllerILcdGXYView- Overrides:
doZoomGXYViewin classALcdGXYSmartController- Parameters:
aDoubleFactor- zoom factor with which to multiply the view's scale
-
mouseDragged
Deprecated.- Specified by:
mouseDraggedin interfaceMouseMotionListener- Overrides:
mouseDraggedin classALcdGXYSmartController
-
mouseMoved
Deprecated.- Specified by:
mouseMovedin interfaceMouseMotionListener- Overrides:
mouseMovedin 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:ALcdGXYControllerEnables 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:
paintin interfaceILcdGXYController- Overrides:
paintin 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:
mouseReleasedin interfaceMouseListener- Overrides:
mouseReleasedin classALcdGXYSmartController
-
setControllerModel
Deprecated.Sets theILcdGXYNewControllerModelto delegate to.- Parameters:
aControllerModel- theILcdGXYNewControllerModelto delegate to.- See Also:
-
getControllerModel
Deprecated.Returns theILcdGXYNewControllerModelthisTLcdGXYNewControllerdelegates to.- Returns:
- the
ILcdGXYNewControllerModelthisTLcdGXYNewControllerdelegates 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 theILcdActionthat will be triggered just after thisILcdGXYControllerhas created a newObjectand 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- theILcdActionto be triggered ornullif noILcdActionhas to be triggered.- See Also:
-
getActionToTriggerAfterCreation
Deprecated.Returns theILcdActionthat will be will be triggered just after thisILcdGXYControllerhas created a newObject, initialized it and added it to anILcdModel.- Returns:
- the
ILcdActionto be triggered after creation of a new Object. - See Also:
-
setSnappables
Deprecated.Sets the Objects to snap to when initializing a new created Object:nullis a valid argument.- Parameters:
aNewSnappables- the new value for the snappables property.nullis a valid argument.- See Also:
-
getSnappables
Deprecated.Returns the Objects to snap to when initializing a new created Object:nullis a valid returned value.- Returns:
- the Objects to snap to when initializing a new created Object:
nullis 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 theILcdGXYPainterof the object under creation should properly implement the methodILcdGXYPainter.boundsSFCT, i.c., they should take the modesILcdGXYPainter.CREATING,ILcdGXYPainter.TRANSLATING, andILcdGXYPainter.RESHAPINGinto 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 propertyuseEditingBoundsForRepaintis 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 propertyuseEditingBoundsForRepaintis true. It is expressed in screen pixels.- Parameters:
aEditingBoundsForRepaintMargin- the neweditingBoundsForRepaintMarginvalue (screen pixels).- See Also:
-
mouseExited
Deprecated.Only pans the view when an object is actively being created.- Specified by:
mouseExitedin interfaceMouseListener- Overrides:
mouseExitedin 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.