Keine Cache-Version

Caching deaktiviert Standardeinstellung für diese Seite:aktiviert (code LNG204)
Wenn die Anzeige zu langsam ist, können Sie den Benutzermodus deaktivieren, um die zwischengespeicherte Version anzuzeigen.
javax.swing

Class GroupLayout.Group

  • Direct Known Subclasses:
    GroupLayout.ParallelGroup, GroupLayout.SequentialGroup
    Enclosing class:
    GroupLayout

    public abstract class GroupLayout.Group
    extends Object
    Group provides the basis for the two types of operations supported by GroupLayout: laying out components one after another (SequentialGroup) or aligned (ParallelGroup). Group and its subclasses have no public constructor; to create one use one of createSequentialGroup or createParallelGroup. Additionally, taking a Group created from one GroupLayout and using it with another will produce undefined results.

    Various methods in Group and its subclasses allow you to explicitly specify the range. The arguments to these methods can take two forms, either a value greater than or equal to 0, or one of DEFAULT_SIZE or PREFERRED_SIZE. A value greater than or equal to 0 indicates a specific size. DEFAULT_SIZE indicates the corresponding size from the component should be used. For example, if DEFAULT_SIZE is passed as the minimum size argument, the minimum size is obtained from invoking getMinimumSize on the component. Likewise, PREFERRED_SIZE indicates the value from getPreferredSize should be used. The following example adds myComponent to group with specific values for the range. That is, the minimum is explicitly specified as 100, preferred as 200, and maximum as 300.

       group.addComponent(myComponent, 100, 200, 300);
     
    The following example adds myComponent to group using a combination of the forms. The minimum size is forced to be the same as the preferred size, the preferred size is determined by using myComponent.getPreferredSize and the maximum is determined by invoking getMaximumSize on the component.
       group.addComponent(myComponent, GroupLayout.PREFERRED_SIZE,
                 GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE);
     

    Unless otherwise specified all the methods of Group and its subclasses that allow you to specify a range throw an IllegalArgumentException if passed an invalid range. An invalid range is one in which any of the values are < 0 and not one of PREFERRED_SIZE or DEFAULT_SIZE, or the following is not met (for specific values): min <= pref <= max.

    Similarly any methods that take a Component throw a IllegalArgumentException if passed null and any methods that take a Group throw an NullPointerException if passed null.

    Since:
    1.6
    See Also:
    GroupLayout.createSequentialGroup(), GroupLayout.createParallelGroup()
    • Method Detail

      • addComponent

        public GroupLayout.Group addComponent(Component component)
        Adds a Component to this Group.
        Parameters:
        component - the Component to add
        Returns:
        this Group
      • addComponent

        public GroupLayout.Group addComponent(Component component,
                                     int min,
                                     int pref,
                                     int max)
        Adds a Component to this Group with the specified size.
        Parameters:
        component - the Component to add
        min - the minimum size or one of DEFAULT_SIZE or PREFERRED_SIZE
        pref - the preferred size or one of DEFAULT_SIZE or PREFERRED_SIZE
        max - the maximum size or one of DEFAULT_SIZE or PREFERRED_SIZE
        Returns:
        this Group
      • addGap

        public GroupLayout.Group addGap(int min,
                               int pref,
                               int max)
        Adds a gap to this Group with the specified size.
        Parameters:
        min - the minimum size of the gap
        pref - the preferred size of the gap
        max - the maximum size of the gap
        Returns:
        this Group
        Throws:
        IllegalArgumentException - if any of the values are less than 0

Deutsche Übersetzung

Sie haben gebeten, diese Seite auf Deutsch zu besuchen. Momentan ist nur die Oberfläche übersetzt, aber noch nicht der gesamte Inhalt.

Wenn Sie mir bei Übersetzungen helfen wollen, ist Ihr Beitrag willkommen. Alles, was Sie tun müssen, ist, sich auf der Website zu registrieren und mir eine Nachricht zu schicken, in der Sie gebeten werden, Sie der Gruppe der Übersetzer hinzuzufügen, die Ihnen die Möglichkeit gibt, die gewünschten Seiten zu übersetzen. Ein Link am Ende jeder übersetzten Seite zeigt an, dass Sie der Übersetzer sind und einen Link zu Ihrem Profil haben.

Vielen Dank im Voraus.

Dokument erstellt 11/06/2005, zuletzt geändert 04/03/2020
Quelle des gedruckten Dokuments:https://www.gaudry.be/de/java-api-rf-javax/swing/grouplayout.group.html

Die Infobro ist eine persönliche Seite, deren Inhalt in meiner alleinigen Verantwortung liegt. Der Text ist unter der CreativeCommons-Lizenz (BY-NC-SA) verfügbar. Weitere Informationen auf die Nutzungsbedingungen und dem Autor.

Referenzen

  1. Zeigen Sie - html-Dokument Sprache des Dokuments:fr Manuel PHP : https://docs.oracle.com

Diese Verweise und Links verweisen auf Dokumente, die während des Schreibens dieser Seite konsultiert wurden, oder die zusätzliche Informationen liefern können, aber die Autoren dieser Quellen können nicht für den Inhalt dieser Seite verantwortlich gemacht werden.
Der Autor Diese Website ist allein dafür verantwortlich, wie die verschiedenen Konzepte und Freiheiten, die mit den Nachschlagewerken gemacht werden, hier dargestellt werden. Denken Sie daran, dass Sie mehrere Quellinformationen austauschen müssen, um das Risiko von Fehlern zu reduzieren.

Inhaltsverzeichnis Haut