javax.swing.plaf.basic

Class BasicSplitPaneDivider

  • All Implemented Interfaces:
    ImageObserver, MenuContainer, PropertyChangeListener, Serializable, EventListener

    public class BasicSplitPaneDivider
    extends Container
    implements PropertyChangeListener
    Divider used by BasicSplitPaneUI. Subclassers may wish to override paint to do something more interesting. The border effect is drawn in BasicSplitPaneUI, so if you don't like that border, reset it there. To conditionally drag from certain areas subclass mousePressed and call super when you wish the dragging to begin.

    Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. As of 1.4, support for long term storage of all JavaBeansTM has been added to the java.beans package. Please see XMLEncoder.

    • Field Detail

      • ONE_TOUCH_SIZE

        protected static final int ONE_TOUCH_SIZE
        Width or height of the divider based on orientation BasicSplitPaneUI adds two to this.
        See Also:
        Constant Field Values
      • splitPaneUI

        protected BasicSplitPaneUI splitPaneUI
        UI this instance was created from.
      • dividerSize

        protected int dividerSize
        Size of the divider.
      • hiddenDivider

        protected Component hiddenDivider
        Divider that is used for noncontinuous layout mode.
      • splitPane

        protected JSplitPane splitPane
        JSplitPane the receiver is contained in.
      • mouseHandler

        protected BasicSplitPaneDivider.MouseHandler mouseHandler
        Handles mouse events from both this class, and the split pane. Mouse events are handled for the splitpane since you want to be able to drag when clicking on the border of the divider, which is not drawn by the divider.
      • orientation

        protected int orientation
        Orientation of the JSplitPane.
      • leftButton

        protected JButton leftButton
        Button for quickly toggling the left component.
      • rightButton

        protected JButton rightButton
        Button for quickly toggling the right component.
    • Constructor Detail

      • BasicSplitPaneDivider

        public BasicSplitPaneDivider(BasicSplitPaneUI ui)
        Creates an instance of BasicSplitPaneDivider. Registers this instance for mouse events and mouse dragged events.
    • Method Detail

      • setBasicSplitPaneUI

        public void setBasicSplitPaneUI(BasicSplitPaneUI newUI)
        Sets the SplitPaneUI that is using the receiver.
      • getBasicSplitPaneUI

        public BasicSplitPaneUI getBasicSplitPaneUI()
        Returns the SplitPaneUI the receiver is currently in.
      • setDividerSize

        public void setDividerSize(int newSize)
        Sets the size of the divider to newSize. That is the width if the splitpane is HORIZONTAL_SPLIT, or the height of VERTICAL_SPLIT.
      • getDividerSize

        public int getDividerSize()
        Returns the size of the divider, that is the width if the splitpane is HORIZONTAL_SPLIT, or the height of VERTICAL_SPLIT.
      • setBorder

        public void setBorder(Border border)
        Sets the border of this component.
        Since:
        1.3
      • getBorder

        public Border getBorder()
        Returns the border of this component or null if no border is currently set.
        Returns:
        the border object for this component
        Since:
        1.3
        See Also:
        setBorder(javax.swing.border.Border)
      • setMouseOver

        protected void setMouseOver(boolean mouseOver)
        Sets whether or not the mouse is currently over the divider.
        Parameters:
        mouseOver - whether or not the mouse is currently over the divider
        Since:
        1.5
      • isMouseOver

        public boolean isMouseOver()
        Returns whether or not the mouse is currently over the divider
        Returns:
        whether or not the mouse is currently over the divider
        Since:
        1.5
      • propertyChange

        public void propertyChange(PropertyChangeEvent e)
        Property change event, presumably from the JSplitPane, will message updateOrientation if necessary.
        Specified by:
        propertyChange in interface PropertyChangeListener
        Parameters:
        e - A PropertyChangeEvent object describing the event source and the property that has changed.
      • oneTouchExpandableChanged

        protected void oneTouchExpandableChanged()
        Messaged when the oneTouchExpandable value of the JSplitPane the receiver is contained in changes. Will create the leftButton and rightButton if they are null. invalidates the receiver as well.
      • createLeftOneTouchButton

        protected JButton createLeftOneTouchButton()
        Creates and return an instance of JButton that can be used to collapse the left component in the split pane.
      • createRightOneTouchButton

        protected JButton createRightOneTouchButton()
        Creates and return an instance of JButton that can be used to collapse the right component in the split pane.
      • prepareForDragging

        protected void prepareForDragging()
        Message to prepare for dragging. This messages the BasicSplitPaneUI with startDragging.
      • dragDividerTo

        protected void dragDividerTo(int location)
        Messages the BasicSplitPaneUI with dragDividerTo that this instance is contained in.
      • finishDraggingTo

        protected void finishDraggingTo(int location)
        Messages the BasicSplitPaneUI with finishDraggingTo that this instance is contained in.

Traduction non disponible

Les API Java ne sont pas encore traduites en français sur l'infobrol. Seule la version anglaise est disponible pour l'instant.

Version en cache

22/11/2024 04:04:13 Cette version de la page est en cache (à la date du 22/11/2024 04:04:13) afin d'accélérer le traitement. Vous pouvez activer le mode utilisateur dans le menu en haut pour afficher la dernère version de la page.

Document créé le 12/11/2006, dernière modification le 04/03/2020
Source du document imprimé : https://www.gaudry.be/java-api-rf-javax/swing/plaf/basic/BasicSplitPaneDivider.html

L'infobrol est un site personnel dont le contenu n'engage que moi. Le texte est mis à disposition sous licence CreativeCommons(BY-NC-SA). Plus d'info sur les conditions d'utilisation et sur l'auteur.

Références

  1. Consulter le document html Langue du document :fr Manuel PHP : https://docs.oracle.com, BasicSplitPaneDivider

Ces références et liens indiquent des documents consultés lors de la rédaction de cette page, ou qui peuvent apporter un complément d'information, mais les auteurs de ces sources ne peuvent être tenus responsables du contenu de cette page.
L'auteur de ce site est seul responsable de la manière dont sont présentés ici les différents concepts, et des libertés qui sont prises avec les ouvrages de référence. N'oubliez pas que vous devez croiser les informations de sources multiples afin de diminuer les risques d'erreurs.

Table des matières Haut