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.
javax.swing.text

Class AsyncBoxView.ChildLocator

  • Enclosing class:
    AsyncBoxView

    public class AsyncBoxView.ChildLocator
    extends Object
    A class to manage the effective position of the child views in a localized area while changes are being made around the localized area. The AsyncBoxView may be continuously changing, but the visible area needs to remain fairly stable until the layout thread decides to publish an update to the parent.
    Since:
    1.3
    • Field Detail

      • lastValidOffset

        protected AsyncBoxView.ChildState lastValidOffset
        The location of the last offset calculation that is valid.
      • lastAlloc

        protected Rectangle lastAlloc
        The last seen allocation (for repainting when changes are flushed upward).
      • childAlloc

        protected Rectangle childAlloc
        A shape to use for the child allocation to avoid creating a lot of garbage.
    • Constructor Detail

      • AsyncBoxView.ChildLocator

        public AsyncBoxView.ChildLocator()
        construct a child locator.
    • Method Detail

      • childChanged

        public void childChanged(AsyncBoxView.ChildState cs)
        Notification that a child changed. This can effect whether or not new offset calculations are needed. This is called by a ChildState object that has changed it's major span. This can therefore be called by multiple threads.
      • paintChildren

        public void paintChildren(Graphics g)
        Paint the children that intersect the clip area.
      • getChildAllocation

        public Shape getChildAllocation(int index,
                               Shape a)
        Fetch the allocation to use for a child view. This will update the offsets for all children not yet updated before the given index.
      • getViewIndexAtPoint

        public int getViewIndexAtPoint(float x,
                              float y,
                              Shape a)
        Fetches the child view index at the given point. This is called by the various View methods that need to calculate which child to forward a message to. This should be called by a block synchronized on this object, and would typically be followed with one or more calls to getChildAllocation that should also be in the synchronized block.
        Parameters:
        x - the X coordinate >= 0
        y - the Y coordinate >= 0
        a - the allocation to the View
        Returns:
        the nearest child index
      • getChildAllocation

        protected Shape getChildAllocation(int index)
        Fetch the allocation to use for a child view. This does not update the offsets in the ChildState records.
      • setAllocation

        protected void setAllocation(Shape a)
        Copy the currently allocated shape into the Rectangle used to store the current allocation. This would be a floating point rectangle in a Java2D-specific implmentation.
      • getViewIndexAtVisualOffset

        protected int getViewIndexAtVisualOffset(float targetOffset)
        Locate the view responsible for an offset into the box along the major axis. Make sure that offsets are set on the ChildState objects up to the given target span past the desired offset.
        Returns:
        index of the view representing the given visual location (targetOffset), or -1 if no view represents that location

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-javax/swing/text/asyncboxview.childlocator.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