|
Generated by JDiff |
||||||||
| PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES | |||||||||
This file contains all the changes in documentation in the packagejava.awt.dndas colored differences. Deletions are shownlike this, and additions are shown like this.
If no deletions or additions are shown in an entry, the HTML tags will be what has changed. The new HTML tags are shown in the differences. If no documentation existed, and then some was added in a later version, this change is noted in the appropriate class pages of differences, but the change is not shown on this page. Only changes in existing text are shown here. Similarly, documentation which was inherited from another class or interface is not shown here.
Note that an HTML error in the new documentation may cause the display of other documentation changes to be presented incorrectly. For instance, failure to close a <code> tag will cause all subsequent paragraphs to be displayed differently.
TheClass DragSource, constructor DragSource()DragSourceis the entity responsible for the initiation of the Drag and Drop operation and may be used in a number of scenarios:Once the
- 1 default instance per JVM for the lifetime of that JVM.
- 1 instance per class of potential Drag Initiator object (e.g TextField). [implementation dependent]
- 1 per instance of a particular
Componentor application specific object associated with aComponentinstance in the GUI. [implementation dependent]- Some other arbitrary association. [implementation dependent]
DragSourceis obtained aDragGestureRecognizershould also be obtained to associate theDragSourcewith a particularComponent.The initial interpretation of the user's gesture and the subsequent starting of the drag operation are the responsibility of the implementing
Componentwhich is usually implemented by aDragGestureRecognizer.When a drag gesture occurs the
DragSource's startDrag() method shall be invoked in order to cause processing of the user's navigational gestures and delivery of Drag and Drop protocol notifications. ADragSourceshall only permit a single Drag and Drop operation to be current at any one time and shall reject any further startDrag() requests by throwing anIllegalDnDOperationExceptionuntil such time as the extant operation is complete.The startDrag() method invokes the createDragSourceContext() method to instantiate an appropriate
DragSourceContextand associate theDragSourceContextPeerwith that.If the Drag and Drop System is unable to initiate a drag operation for some reason the startDrag() method throws a
java.awt.dnd.InvalidDnDOperationExceptionto signal such a condition. Typically this exception is thrown when the underlying platform system is either not in a state to initiate a drag or the parameters specified are invalid.Note that during the drag the set of operations exposed by the source at the start of the drag operation may not change until the operation is complete. The operation(s) are constant for the duration of the operation with respect to the
DragSource. @version 1.37 1240 04/0325/0102 @since 1.2
Class DragSource, void addDragSourceListener(DragSourceListener)ConstructCreates a newDragSource. @exception HeadlessException if GraphicsEnvironment.isHeadless() returns true @see java.awt.GraphicsEnvironment#isHeadless
Class DragSource, void addDragSourceMotionListener(DragSourceMotionListener)AddAdds the specifiedDragSourceListenerto thisDragSourceto receive drag source events during drag operations intiated with thisDragSource. If anulllistener is specified no action is taken and no exception is thrown. @param dsl theDragSourceListenerto add.@see #removeDragSourceListener @see #getDragSourceListeners @since 1.4
Class DragSource, DragGestureRecognizer createDefaultDragGestureRecognizer(Component, int, DragGestureListener)AddAdds the specifiedDragSourceMotionListenerto thisDragSourceto receive drag motion events during drag operations intiated with thisDragSource. If anulllistener is specified no action is taken and no exception is thrown. @param dsl theDragSourceMotionListenerto add.@see #removeDragSourceMotionListener @see #getDragSourceMotionListeners @since 1.4
Creates a newClass DragSource, DragGestureRecognizer createDragGestureRecognizer(Class, Component, int, DragGestureListener)that implements the default abstract subclass ofDragSourceRecognizerDragGestureRecognizerDragGestureRecognizerfor thisDragSourceand sets the specifiedComponentandDragGestureListeneron the newly created object. For thisDragSourcethe default isMouseDragGestureRecognizer.@param c
ThetheComponenttarget for the recognizer @param actionsThethe permitted source actions @param dglThetheDragGestureListenerto notify@return the new
DragGestureRecognizerornullif theToolkit.createDragGestureRecognizermethod has no implementation available for the requested()DragGestureRecognizersubclass and returnsnull.
Creates a newClass DragSource, DragSourceContext createDragSourceContext(DragSourceContextPeer, DragGestureEvent, Cursor, Image, Point, Transferable, DragSourceListener)DragGestureRecognizerthat implements the specified abstract subclass ofDragGestureRecognizerand sets the specifiedComponentandDragGestureListeneron the newly created object.@param recognizerAbstractClass
Thethe requested abstract type @param actionsThethe permitted source drag actions @param cThetheComponenttarget @param dglThetheDragGestureListenerto notify@return the new
DragGestureRecognizerornullif theToolkit.createDragGestureRecognizermethod has no implementation available for the requested()DragGestureRecognizersubclass and returnsnull.
Class DragSource, DragSource getDefaultDragSource()CreateCreates theDragSourceContextto handle this drag.To incorporate a new
DragSourceContextsubclass subclassDragSourceand override this method.If
dragImageisnullno image is used to represent the drag over feedback for this drag operation butNullPointerExceptionis not thrown.If
dslisnullno drag source listener is registered with the createdDragSourceContextbutNullPointerExceptionis not thrown.If
@param dscp ThedragCursorisnullthe default drag cursors are used for this drag operation.NullPointerExceptionis not thrown.DragSourceContextPeerfor this drag @paramtriggerdgl TheDragGestureEventthat triggered the drag @param dragCursor The initialCursorto display @param dragImage TheImageto drag ornull@param imageOffset The offset of theImageorigin from the hotspot of the cursor at the instant of the trigger @paramtransferablet The subject data of the drag @param dsl TheDragSourceListener@return theDragSourceContext@throws NullPointerException ifdscpisnull@throws NullPointerException ifdglisnull@throws NullPointerException ifdragImageis notnullandimageOffsetisnull@throws NullPointerException iftisnull@throws IllegalArgumentException if theComponentassociated with the trigger event isnull. @throws IllegalArgumentException if theDragSourcefor the trigger event isnull. @throws IllegalArgumentException if the drag action for the trigger event isDnDConstants.ACTION_NONE. @throws IllegalArgumentException if the source actions for theDragGestureRecognizerassociated with the trigger event are equal toDnDConstants.ACTION_NONE.
Class DragSource, DragSourceListener[] getDragSourceListeners()ThisGetsmethod returnstheDragSourceobject associated with the underlying platform. @return the platform DragSource @exception HeadlessException if GraphicsEnvironment.isHeadless() returns true @see java.awt.GraphicsEnvironment#isHeadless
Class DragSource, DragSourceMotionListener[] getDragSourceMotionListeners()ReturnsGetsan array ofall theDragSourceListeners registered with thisDragSource. @return all of thisDragSource'sDragSourceListeners or an empty array if no such listeners are currently registered @see #addDragSourceListener @see #removeDragSourceListener @since 1.4
Class DragSource, EventListener[] getListeners(Class)ReturnsGetsan arrayall ofalltheDragSourceMotionListeners registered with thisDragSource. @return all of thisDragSource'sDragSourceMotionListeners or an empty array if no such listeners are currently registered @see #addDragSourceMotionListener @see #removeDragSourceMotionListener @since 1.4
Class DragSource, boolean isDragImageSupported()ReturnsGetsan array ofall the objects currently registered asFooListeners upon thisDragSource.FooListeners are registered using theaddFooListenermethod. @param listenerType the type of listeners requested; this parameter should specify an interface that descends fromjava.util.EventListener@return an array of all objects registered asFooListeners on thisDragSourceor an empty array if no such listeners have been added @exceptionClassCastExceptioniflistenerTypedoesn't specify a class or interface that implementsjava.util.EventListener@see #getDragSourceListeners @see #getDragSourceMotionListeners @since 1.4
Class DragSource, void removeDragSourceListener(DragSourceListener)ThisReportsmethod returns a boolean indicatingwhether or not dragImagesupport is available on the underlying platform.@return if the Drag Image support is available on this platform
Class DragSource, void removeDragSourceMotionListener(DragSourceMotionListener)RemoveRemoves the specifiedDragSourceListenerfrom thisDragSource. If anulllistener is specified no action is taken and no exception is thrown. If the listener specified by the argument was not previously added to thisDragSourceno action is taken and no exception is thrown. @param dsl theDragSourceListenerto remove.@see #addDragSourceListener @see #getDragSourceListeners @since 1.4
Class DragSource, void startDrag(DragGestureEvent, Cursor, Image, Point, Transferable, DragSourceListener)RemoveRemoves the specifiedDragSourceMotionListenerfrom thisDragSource. If anulllistener is specified no action is taken and no exception is thrown. If the listener specified by the argument was not previously added to thisDragSourceno action is taken and no exception is thrown. @param dsml theDragSourceMotionListenerto remove.@see #addDragSourceMotionListener @see #getDragSourceMotionListeners @since 1.4
Start a drag given theClass DragSource, void startDrag(DragGestureEvent, Cursor, Image, Point, Transferable, DragSourceListener, FlavorMap)DragGestureEventthat initiated the drag the initialCursorto use theImageto drag the offset of theImageorigin from the hotspot of theCursorat the instant of the trigger the subject data of the drag and theDragSourceListener.@param trigger
ThetheDragGestureEventthat initiated the drag @param dragCursorThethe initialCursorornullfor defaults @param dragImageThetheImageto drag ornull@param imageOffsetThethe offset of theImageorigin from the hotspot of theCursorat the instant of the trigger @param transferableThethe subject data of the drag @param dslThetheDragSourceListener@throws
java.awt.dnd.InvalidDnDOperationExceptionif the Drag and Drop system is unable to initiate a drag operation or if the user attempts to start a drag while an existing drag operation is still executing.
Start a drag given theClass DragSource, void startDrag(DragGestureEvent, Cursor, Transferable, DragSourceListener)DragGestureEventthat initiated the drag the initialCursorto use theImageto drag the offset of theImageorigin from the hotspot of theCursorat the instant of the trigger theTransferablesubject data of the drag theDragSourceListenerand theFlavorMap.@param trigger
ThetheDragGestureEventthat initiated the drag @param dragCursorThethe initialCursorornullfor defaults @param dragImageThethe image to drag or null @param imageOffsetThethe offset of theImageorigin from the hotspot of theCursorat the instant of the trigger @param transferableThethe subject data of the drag @param dslThetheDragSourceListener@param flavorMapThetheFlavorMapto use ornull@throws
java.awt.dnd.InvalidDnDOperationExceptionif the Drag and Drop system is unable to initiate a drag operation or if the user attempts to start a drag while an existing drag operation is still executing.
Start a drag given theClass DragSource, void startDrag(DragGestureEvent, Cursor, Transferable, DragSourceListener, FlavorMap)DragGestureEventthat initiated the drag the initialCursorto use theTransferablesubject data of the drag and theDragSourceListener.@param trigger
ThetheDragGestureEventthat initiated the drag @param dragCursorThethe initialCursorornullfor defaults @param transferableThethe subject data of the drag @param dslThetheDragSourceListener@throws
java.awt.dnd.InvalidDnDOperationExceptionif the Drag and Drop system is unable to initiate a drag operation or if the user attempts to start a drag while an existing drag operation is still executing.
Start a drag given theDragGestureEventthat initiated the drag the initialCursorto use theTransferablesubject data of the drag theDragSourceListenerand theFlavorMap.@param trigger
ThetheDragGestureEventthat initiated the drag @param dragCursorThethe initialCursorornullfor defaults @param transferableThethe subject data of the drag @param dslThetheDragSourceListener@param flavorMapThetheFlavorMap to use ornull@throws
java.awt.dnd.InvalidDnDOperationExceptionif the Drag and Drop system is unable to initiate a drag operation or if the user attempts to start a drag while an existing drag operation is still executing.
TheClass DragSourceContext, constructor DragSourceContext(DragSourceContextPeer, DragGestureEvent, Cursor, Image, Point, Transferable, DragSourceListener)DragSourceContextclass is responsible for managing the initiator side of the Drag and Drop protocol. In particular it is responsible for managing drag event notifications to theDragSourceListeners andDragSourceMotionListeners and providing theTransferablerepresenting the source data for the drag operation.Note that the
DragSourceContextitself implements theDragSourceListenerandDragSourceMotionListenerinterfaces. This is to allow the platform peer (theDragSourceContextPeerinstance) created by theDragSourceto notify theDragSourceContextof state changes in the ongoing operation. This allows theDragSourceContextto interpose itself between the platform and the listeners provided by the initiator of the drag operation. @see DragSourceListener @see DragSourceMotionListener @version 1.474812/03/0118/02 @since 1.2
Called fromClass DragSourceContext, void dragDropEnd(DragSourceDropEvent)DragSourcethis constructor creates a newDragSourceContextgiven theDragSourceContextPeerfor this Drag theDragGestureEventthat triggered the Drag the initialCursorto use for the Drag an (optional)Imageto display while the Drag is taking place the offset of theImageorigin from the hotspot at the instant of the triggering event theTransferablesubject data and theDragSourceListenerto use during the Drag and Drop operation.
IfDragSourceContextPeerisnullNullPointerExceptionis thrown.
IfDragGestureEventisnullNullPointerExceptionis thrown.
IfCursorisnullno exception is thrown and the default dragcursorscursorarebehavior isusedactivated for this drag operation.
IfImageisnullno exception is thrown.
IfImageis notnulland the offset isnullNullPointerExceptionis thrown.
IfTransferableisnullNullPointerExceptionis thrown.
IfDragSourceListenerisnullno exception is thrown. @param dscp theDragSourceContextPeerfor this drag @param trigger the triggering event @param dragCursor the initialCursor@param dragImage theImageto drag (ornull) @param offset the offset of the image origin from the hotspot at the instant of the triggering event @param t theTransferable@param dsl theDragSourceListener@throws IllegalArgumentException if theComponentassociated with the trigger event isnull. @throws IllegalArgumentException if theDragSourcefor the trigger event isnull. @throws IllegalArgumentException if the drag action for the trigger event isDnDConstants.ACTION_NONE. @throws IllegalArgumentException if the source actions for theDragGestureRecognizerassociated with the trigger event are equal toDnDConstants.ACTION_NONE. @throws NullPointerException if dscp trigger or t are null or if dragImage is non-null and offset is null
Class DragSourceContext, void dragEnter(DragSourceDragEvent)ThisCallsmethod callsdragDropEndon theDragSourceListeners registered with thisDragSourceContextand with the associatedDragSourceand passes them the specifiedDragSourceDropEvent. @param dsde theDragSourceDropEvent
Class DragSourceContext, void dragExit(DragSourceEvent)ThisCallsmethod callsdragEnteron theDragSourceListeners registered with thisDragSourceContextand with the associatedDragSourceand passes them the specifiedDragSourceDragEvent. @param dsde theDragSourceDragEvent
Class DragSourceContext, void dragMouseMoved(DragSourceDragEvent)ThisCallsmethod callsdragExiton theDragSourceListeners registered with thisDragSourceContextand with the associatedDragSourceand passes them the specifiedDragSourceEvent. @param dsde theDragSourceEvent
Class DragSourceContext, void dragOver(DragSourceDragEvent)ThisCallsmethod callsdragMouseMovedon theDragSourceMotionListeners registered with theDragSourceassociated with thisDragSourceContextand them passes the specifiedDragSourceDragEvent. @param dsde theDragSourceDragEvent@since 1.4
Class DragSourceContext, void dropActionChanged(DragSourceDragEvent)ThisCallsmethod callsdragOveron theDragSourceListeners registered with thisDragSourceContextand with the associatedDragSourceand passes them the specifiedDragSourceDragEvent. @param dsde theDragSourceDragEvent
Class DragSourceContext, Component getComponent()ThisCallsmethod callsdropActionChangedon theDragSourceListeners registered with thisDragSourceContextand with the associatedDragSourceand passes them the specifiedDragSourceDragEvent. @param dsde theDragSourceDragEvent
Class DragSourceContext, Cursor getCursor()ThisReturnsmethod returnstheComponentassociated with thisDragSourceContext.@return theComponentthat started the drag
Class DragSourceContext, DragSource getDragSource()ThisReturnsmethod returnsthe current dragCursor.@return the current drag
Cursor
Class DragSourceContext, int getSourceActions()ThisReturnsmethod returnstheDragSourcethat instantiated thisDragSourceContext.@return theDragSourcethat instantiated thisDragSourceContext
Class DragSourceContext, Transferable getTransferable()ThisReturnsmethod returnsa bitwise mask ofDnDConstantsthatrepresentsrepresent the set of drop actions supported by the drag source for the drag operation associated with thisDragSourceContext. @return the drop actions supported by the drag source
Class DragSourceContext, DragGestureEvent getTrigger()ThisReturnsmethod returnstheTransferableassociated with thisDragSourceContext.@return theTransferable
Class DragSourceContext, void removeDragSourceListener(DragSourceListener)ThisReturnsmethod returnstheDragGestureEventthat initially triggered the drag.@return the Event that triggered the drag
Class DragSourceContext, void setCursor(Cursor)ThisRemovesmethod removesthe specifiedDragSourceListenerfrom thisDragSourceContext.@param dsl theDragSourceListenerto remove. Note; note that whilenullis not prohibited it is not acceptable as a parameter.
Class DragSourceContext, void transferablesFlavorsChanged()This method sets the currentSets the cursor for this drag operation to the specifiedCursor. If the specifiedCursorisnullthe default drag cursor behavior is activated for this drag operation otherwise it is deactivated. @param c theCursorto display.Noteorthat whilenullis not prohibited it is nottoan acceptable value for thisactivate the default drag cursorparameter.behavior
Class DragSourceContext, void updateCurrentCursor(int, int, int)ThisNotifiesmethod notifiesthe peer that theTransferable'sDataFlavorsDataFlavors have changed.
checkIf the default drag cursor behavior is active this method sets the default drag cursor forupdatesthe specified selected operation supported actions andimplementstatus otherwise this methoddefaultsdoes nothing. @param dropOp the user's currently selected operation @param targetAct the current target's supported actions @param status the constant
TheClass DropTarget, constructor DropTarget()DropTargetis associated with aComponentwhen thatComponentwishes to accept drops during Drag and Drop operations.Each
DropTargetis associated with aFlavorMap. The defaultFlavorMaphereafter designates theFlavorMapreturned bySystemFlavorMap.getDefaultFlavorMap(). @version 1.41 1243 04/0309/0102 @since 1.2
Class DropTarget, constructor DropTarget(Component, DropTargetListener)ConstructCreates aDropTarget. @exception HeadlessException if GraphicsEnvironment.isHeadless() returns true @see java.awt.GraphicsEnvironment#isHeadless
Class DropTarget, constructor DropTarget(Component, int, DropTargetListener)ConstructCreates aDropTargetgiven theComponentto associate itself with and theDropTargetListenerto handle event processing.The Component will receive drops only if it is enabled. @param c The
Componentwith which thisDropTargetis associated @param dtl TheDropTargetListenerfor thisDropTarget@exception HeadlessException if GraphicsEnvironment.isHeadless() returns true @see java.awt.GraphicsEnvironment#isHeadless
Class DropTarget, constructor DropTarget(Component, int, DropTargetListener, boolean)ConstructCreates aDropTargetgiven theComponentto associate itself with anintrepresenting the default acceptable action(s) to support and aDropTargetListenerto handle event processing.The Component will receive drops only if it is enabled. @param c The
Componentwith which thisDropTargetis associated @param ops The default acceptable actions for thisDropTarget@param dtl TheDropTargetListenerfor thisDropTarget@exception HeadlessException if GraphicsEnvironment.isHeadless() returns true @see java.awt.GraphicsEnvironment#isHeadless
Class DropTarget, constructor DropTarget(Component, int, DropTargetListener, boolean, FlavorMap)ConstructCreates aDropTargetgiven theComponentto associate itself with anintrepresenting the default acceptable action(s) to support aDropTargetListenerto handle event processing and abooleanindicating if theDropTargetis currently accepting drops.The Component will receive drops only if it is enabled. @param c The
Componentwith which thisDropTargetis associated @param ops The default acceptable actions for thisDropTarget@param dtl TheDropTargetListenerfor thisDropTarget@param act Is theDropTargetaccepting drops. @exception HeadlessException if GraphicsEnvironment.isHeadless() returns true @see java.awt.GraphicsEnvironment#isHeadless
Class DropTarget, void addDropTargetListener(DropTargetListener)ConstructCreates a new DropTarget given theComponentto associate itself with anintrepresenting the default acceptable action(s) to support aDropTargetListenerto handle event processing abooleanindicating if theDropTargetis currently accepting drops and aFlavorMapto use (or null for the defaultFlavorMap).The Component will receive drops only if it is enabled. @param c The
Componentwith which thisDropTargetis associated @param ops The default acceptable actions for thisDropTarget@param dtl TheDropTargetListenerfor thisDropTarget@param act Is theDropTargetaccepting drops. @param fm TheFlavorMapto use or null for the defaultFlavorMap@exception HeadlessException if GraphicsEnvironment.isHeadless() returns true @see java.awt.GraphicsEnvironment#isHeadless
Class DropTarget, DropTargetContext createDropTargetContext()AddAdds a newDropTargetListener(UNICAST SOURCE).@param dtl The new
DropTargetListener@throws
TooManyListenersExceptionif aDropTargetListeneris already added to thisDropTarget.
Class DropTarget, Component getComponent()CreateCreates the DropTargetContext associated with this DropTarget. Subclasses may override this method to instantiate their own DropTargetContext subclass. This call is typically *only* called by the platform's DropTargetContextPeer as a drag operation encounters this DropTarget. Accessing the Context while no Drag is current has undefined results.
Class DropTarget, int getDefaultActions()ThisGetsmethod returnstheComponentassociated with thisDropTarget.@return the current Component
Class DropTarget, DropTargetContext getDropTargetContext()ThisGetsmethod returnsanintrepresenting the current action(s) supported by thisDropTarget.@return the current default actions
Class DropTarget, FlavorMap getFlavorMap()ThisGetsmethod returnstheDropTargetContextassociated with thisDropTarget.@return the
DropTargetContextassociated with thisDropTarget.
Class DropTarget, boolean isActive()ThisGetsmethod returnstheFlavorMapassociated with thisDropTarget. If noFlavorMaphas been set for thisDropTargetit is associated with the defaultFlavorMap.@return the FlavorMap for this DropTarget
Class DropTarget, void removeDropTargetListener(DropTargetListener)ThisReportsmethod returns a boolean indicatingwhether or not thisDropTargetis currently active (ready to accept drops).@return
is thetrueDropTargetif activefalseif not
Class DropTarget, void setActive(boolean)RemoveRemoves the currentDropTargetListener(UNICAST SOURCE).@param dtl the DropTargetListener to deregister.
Class DropTarget, void setFlavorMap(FlavorMap)SetSets the DropTarget active iftrueinactive iffalse.@param isActive sets the
DropTarget(in)active.
ThisSetsmethod setstheFlavorMapassociated with thisDropTarget.@param fm
setthe newFlavorMapor nullforto associate the default FlavorMap with this DropTarget.