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.plaf.basic

Class BasicScrollBarUI

    • Field Detail

      • minimumThumbSize

        protected Dimension minimumThumbSize
      • maximumThumbSize

        protected Dimension maximumThumbSize
      • thumbHighlightColor

        protected Color thumbHighlightColor
      • thumbLightShadowColor

        protected Color thumbLightShadowColor
      • thumbDarkShadowColor

        protected Color thumbDarkShadowColor
      • thumbColor

        protected Color thumbColor
      • trackColor

        protected Color trackColor
      • trackHighlightColor

        protected Color trackHighlightColor
      • incrButton

        protected JButton incrButton
      • decrButton

        protected JButton decrButton
      • isDragging

        protected boolean isDragging
      • trackHighlight

        protected int trackHighlight
      • scrollTimer

        protected Timer scrollTimer
      • scrollBarWidth

        protected int scrollBarWidth
        Hint as to what width (when vertical) or height (when horizontal) should be.
        Since:
        1.7
      • incrGap

        protected int incrGap
        Distance between the increment button and the track. This may be a negative number. If negative, then an overlap between the button and track will occur, which is useful for shaped buttons.
        Since:
        1.7
      • decrGap

        protected int decrGap
        Distance between the decrement button and the track. This may be a negative number. If negative, then an overlap between the button and track will occur, which is useful for shaped buttons.
        Since:
        1.7
    • Constructor Detail

      • BasicScrollBarUI

        public BasicScrollBarUI()
    • Method Detail

      • configureScrollBarColors

        protected void configureScrollBarColors()
      • installUI

        public void installUI(JComponent c)
        Description copied from class: ComponentUI
        Configures the specified component appropriately for the look and feel. This method is invoked when the ComponentUI instance is being installed as the UI delegate on the specified component. This method should completely configure the component for the look and feel, including the following:
        1. Install default property values for color, fonts, borders, icons, opacity, etc. on the component. Whenever possible, property values initialized by the client program should not be overridden.
        2. Install a LayoutManager on the component if necessary.
        3. Create/add any required sub-components to the component.
        4. Create/install event listeners on the component.
        5. Create/install a PropertyChangeListener on the component in order to detect and respond to component property changes appropriately.
        6. Install keyboard UI (mnemonics, traversal, etc.) on the component.
        7. Initialize any appropriate instance data.
        Overrides:
        installUI in class ComponentUI
        Parameters:
        c - the component where this UI delegate is being installed
        See Also:
        ComponentUI.uninstallUI(javax.swing.JComponent), JComponent.setUI(javax.swing.plaf.ComponentUI), JComponent.updateUI()
      • uninstallUI

        public void uninstallUI(JComponent c)
        Description copied from class: ComponentUI
        Reverses configuration which was done on the specified component during installUI. This method is invoked when this UIComponent instance is being removed as the UI delegate for the specified component. This method should undo the configuration performed in installUI, being careful to leave the JComponent instance in a clean state (no extraneous listeners, look-and-feel-specific property objects, etc.). This should include the following:
        1. Remove any UI-set borders from the component.
        2. Remove any UI-set layout managers on the component.
        3. Remove any UI-added sub-components from the component.
        4. Remove any UI-added event/property listeners from the component.
        5. Remove any UI-installed keyboard UI from the component.
        6. Nullify any allocated instance data objects to allow for GC.
        Overrides:
        uninstallUI in class ComponentUI
        Parameters:
        c - the component from which this UI delegate is being removed; this argument is often ignored, but might be used if the UI object is stateless and shared by multiple components
        See Also:
        ComponentUI.installUI(javax.swing.JComponent), JComponent.updateUI()
      • installDefaults

        protected void installDefaults()
      • installComponents

        protected void installComponents()
      • uninstallComponents

        protected void uninstallComponents()
      • installListeners

        protected void installListeners()
      • installKeyboardActions

        protected void installKeyboardActions()
      • uninstallKeyboardActions

        protected void uninstallKeyboardActions()
      • uninstallListeners

        protected void uninstallListeners()
      • uninstallDefaults

        protected void uninstallDefaults()
      • setThumbRollover

        protected void setThumbRollover(boolean active)
        Sets whether or not the mouse is currently over the thumb.
        Parameters:
        active - True indicates the thumb is currently active.
        Since:
        1.5
      • isThumbRollover

        public boolean isThumbRollover()
        Returns true if the mouse is currently over the thumb.
        Returns:
        true if the thumb is currently active
        Since:
        1.5
      • paint

        public void paint(Graphics g,
                 JComponent c)
        Description copied from class: ComponentUI
        Paints the specified component appropriately for the look and feel. This method is invoked from the ComponentUI.update method when the specified component is being painted. Subclasses should override this method and use the specified Graphics object to render the content of the component.
        Overrides:
        paint in class ComponentUI
        Parameters:
        g - the Graphics context in which to paint
        c - the component being painted; this argument is often ignored, but might be used if the UI object is stateless and shared by multiple components
        See Also:
        ComponentUI.update(java.awt.Graphics, javax.swing.JComponent)
      • getPreferredSize

        public Dimension getPreferredSize(JComponent c)
        A vertical scrollbar's preferred width is the maximum of preferred widths of the (non null) increment/decrement buttons, and the minimum width of the thumb. The preferred height is the sum of the preferred heights of the same parts. The basis for the preferred size of a horizontal scrollbar is similar.

        The preferredSize is only computed once, subsequent calls to this method just return a cached size.

        Overrides:
        getPreferredSize in class ComponentUI
        Parameters:
        c - the JScrollBar that's delegating this method to us
        Returns:
        the preferred size of a Basic JScrollBar
        See Also:
        getMaximumSize(javax.swing.JComponent), ComponentUI.getMinimumSize(javax.swing.JComponent)
      • getMaximumSize

        public Dimension getMaximumSize(JComponent c)
        Description copied from class: ComponentUI
        Returns the specified component's maximum size appropriate for the look and feel. If null is returned, the maximum size will be calculated by the component's layout manager instead (this is the preferred approach for any component with a specific layout manager installed). The default implementation of this method invokes getPreferredSize and returns that value.
        Overrides:
        getMaximumSize in class ComponentUI
        Parameters:
        c - The JScrollBar that's delegating this method to us.
        Returns:
        new Dimension(Integer.MAX_VALUE, Integer.MAX_VALUE);
        See Also:
        ComponentUI.getMinimumSize(javax.swing.JComponent), getPreferredSize(javax.swing.JComponent)
      • createDecreaseButton

        protected JButton createDecreaseButton(int orientation)
      • createIncreaseButton

        protected JButton createIncreaseButton(int orientation)
      • paintDecreaseHighlight

        protected void paintDecreaseHighlight(Graphics g)
      • paintIncreaseHighlight

        protected void paintIncreaseHighlight(Graphics g)
      • getMinimumThumbSize

        protected Dimension getMinimumThumbSize()
        Returns the smallest acceptable size for the thumb. If the scrollbar becomes so small that this size isn't available, the thumb will be hidden.

        Warning : the value returned by this method should not be be modified, it's a shared static constant.

        Returns:
        The smallest acceptable size for the thumb.
        See Also:
        getMaximumThumbSize()
      • getMaximumThumbSize

        protected Dimension getMaximumThumbSize()
        Returns the largest acceptable size for the thumb. To create a fixed size thumb one make this method and getMinimumThumbSize return the same value.

        Warning : the value returned by this method should not be be modified, it's a shared static constant.

        Returns:
        The largest acceptable size for the thumb.
        See Also:
        getMinimumThumbSize()
      • addLayoutComponent

        public void addLayoutComponent(String name,
                              Component child)
        Description copied from interface: LayoutManager
        If the layout manager uses a per-component string, adds the component comp to the layout, associating it with the string specified by name.
        Specified by:
        addLayoutComponent in interface LayoutManager
        Parameters:
        name - the string to be associated with the component
        child - the component to be added
      • removeLayoutComponent

        public void removeLayoutComponent(Component child)
        Description copied from interface: LayoutManager
        Removes the specified component from the layout.
        Specified by:
        removeLayoutComponent in interface LayoutManager
        Parameters:
        child - the component to be removed
      • layoutVScrollbar

        protected void layoutVScrollbar(JScrollBar sb)
      • layoutHScrollbar

        protected void layoutHScrollbar(JScrollBar sb)
      • layoutContainer

        public void layoutContainer(Container scrollbarContainer)
        Description copied from interface: LayoutManager
        Lays out the specified container.
        Specified by:
        layoutContainer in interface LayoutManager
        Parameters:
        scrollbarContainer - the container to be laid out
      • setThumbBounds

        protected void setThumbBounds(int x,
                          int y,
                          int width,
                          int height)
        Set the bounds of the thumb and force a repaint that includes the old thumbBounds and the new one.
        See Also:
        getThumbBounds()
      • getThumbBounds

        protected Rectangle getThumbBounds()
        Return the current size/location of the thumb.

        Warning : the value returned by this method should not be be modified, it's a reference to the actual rectangle, not a copy.

        Returns:
        The current size/location of the thumb.
        See Also:
        setThumbBounds(int, int, int, int)
      • getTrackBounds

        protected Rectangle getTrackBounds()
        Returns the current bounds of the track, i.e. the space in between the increment and decrement buttons, less the insets. The value returned by this method is updated each time the scrollbar is laid out (validated).

        Warning : the value returned by this method should not be be modified, it's a reference to the actual rectangle, not a copy.

        Returns:
        the current bounds of the scrollbar track
        See Also:
        layoutContainer(java.awt.Container)
      • scrollByBlock

        protected void scrollByBlock(int direction)
      • scrollByUnit

        protected void scrollByUnit(int direction)
      • getSupportsAbsolutePositioning

        public boolean getSupportsAbsolutePositioning()
        Indicates whether the user can absolutely position the thumb with a mouse gesture (usually the middle mouse button).
        Returns:
        true if a mouse gesture can absolutely position the thumb
        Since:
        1.5

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/plaf/basic/basicscrollbarui.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