Geen cache-versie.

Caching uitgeschakeld. Standaardinstelling voor deze pagina:ingeschakeld (code LNG204)
Als het scherm te langzaam is, kunt u de gebruikersmodus uitschakelen om de cacheversie te bekijken.
java.awt.dnd

Class DropTargetContext

  • All Implemented Interfaces:
    Serializable

    public class DropTargetContext
    extends Object
    implements Serializable
    A DropTargetContext is created whenever the logical cursor associated with a Drag and Drop operation coincides with the visible geometry of a Component associated with a DropTarget. The DropTargetContext provides the mechanism for a potential receiver of a drop operation to both provide the end user with the appropriate drag under feedback, but also to effect the subsequent data transfer if appropriate.
    Since:
    1.2
    See Also:
    Serialized Form
    • Method Detail

      • getDropTarget

        public DropTarget getDropTarget()
        This method returns the DropTarget associated with this DropTargetContext.

        Returns:
        the DropTarget associated with this DropTargetContext
      • getComponent

        public Component getComponent()
        This method returns the Component associated with this DropTargetContext.

        Returns:
        the Component associated with this Context
      • addNotify

        public void addNotify(java.awt.dnd.peer.DropTargetContextPeer dtcp)
        Called when associated with the DropTargetContextPeer.

        Parameters:
        dtcp - the DropTargetContextPeer
      • removeNotify

        public void removeNotify()
        Called when disassociated with the DropTargetContextPeer.
      • setTargetActions

        protected void setTargetActions(int actions)
        This method sets the current actions acceptable to this DropTarget.

        Parameters:
        actions - an int representing the supported action(s)
      • getTargetActions

        protected int getTargetActions()
        This method returns an int representing the current actions this DropTarget will accept.

        Returns:
        the current actions acceptable to this DropTarget
      • dropComplete

        public void dropComplete(boolean success)
                          throws InvalidDnDOperationException
        This method signals that the drop is completed and if it was successful or not.

        Parameters:
        success - true for success, false if not

        Throws:
        InvalidDnDOperationException - if a drop is not outstanding/extant
      • acceptDrag

        protected void acceptDrag(int dragOperation)
        accept the Drag.

        Parameters:
        dragOperation - the supported action(s)
      • rejectDrag

        protected void rejectDrag()
        reject the Drag.
      • acceptDrop

        protected void acceptDrop(int dropOperation)
        called to signal that the drop is acceptable using the specified operation. must be called during DropTargetListener.drop method invocation.

        Parameters:
        dropOperation - the supported action(s)
      • rejectDrop

        protected void rejectDrop()
        called to signal that the drop is unacceptable. must be called during DropTargetListener.drop method invocation.
      • getCurrentDataFlavors

        protected DataFlavor[] getCurrentDataFlavors()
        get the available DataFlavors of the Transferable operand of this operation.

        Returns:
        a DataFlavor[] containing the supported DataFlavors of the Transferable operand.
      • getCurrentDataFlavorsAsList

        protected List<DataFlavor> getCurrentDataFlavorsAsList()
        This method returns a the currently available DataFlavors of the Transferable operand as a java.util.List.

        Returns:
        the currently available DataFlavors as a java.util.List
      • isDataFlavorSupported

        protected boolean isDataFlavorSupported(DataFlavor df)
        This method returns a boolean indicating if the given DataFlavor is supported by this DropTargetContext.

        Parameters:
        df - the DataFlavor

        Returns:
        if the DataFlavor specified is supported
      • createTransferableProxy

        protected Transferable createTransferableProxy(Transferable t,
                                           boolean local)
        Creates a TransferableProxy to proxy for the specified Transferable.
        Parameters:
        t - the Transferable to be proxied
        local - true if t represents the result of a local drag-n-drop operation.
        Returns:
        the new TransferableProxy instance.

Nederlandse vertaling

U hebt gevraagd om deze site in het Nederlands te bezoeken. Voor nu wordt alleen de interface vertaald, maar nog niet alle inhoud.

Als je me wilt helpen met vertalingen, is je bijdrage welkom. Het enige dat u hoeft te doen, is u op de site registreren en mij een bericht sturen waarin u wordt gevraagd om u toe te voegen aan de groep vertalers, zodat u de gewenste pagina's kunt vertalen. Een link onderaan elke vertaalde pagina geeft aan dat u de vertaler bent en heeft een link naar uw profiel.

Bij voorbaat dank.

Document heeft de 11/06/2005 gemaakt, de laatste keer de 04/03/2020 gewijzigd
Bron van het afgedrukte document:https://www.gaudry.be/nl/java-api-rf-java/awt/dnd/droptargetcontext.html

De infobrol is een persoonlijke site waarvan de inhoud uitsluitend mijn verantwoordelijkheid is. De tekst is beschikbaar onder CreativeCommons-licentie (BY-NC-SA). Meer info op de gebruiksvoorwaarden en de auteur.

Referenties

  1. Bekijk - html-document Taal van het document:fr Manuel PHP : https://docs.oracle.com

Deze verwijzingen en links verwijzen naar documenten die geraadpleegd zijn tijdens het schrijven van deze pagina, of die aanvullende informatie kunnen geven, maar de auteurs van deze bronnen kunnen niet verantwoordelijk worden gehouden voor de inhoud van deze pagina.
De auteur Deze site is als enige verantwoordelijk voor de manier waarop de verschillende concepten, en de vrijheden die met de referentiewerken worden genomen, hier worden gepresenteerd. Vergeet niet dat u meerdere broninformatie moet doorgeven om het risico op fouten te verkleinen.

Inhoudsopgave Haut