javax.swing

Class DefaultBoundedRangeModel

  • All Implemented Interfaces:
    Serializable, BoundedRangeModel

    public class DefaultBoundedRangeModel
    extends Object
    implements BoundedRangeModel, Serializable
    A generic implementation of BoundedRangeModel.

    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.

    See Also:
    BoundedRangeModel
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      protected ChangeEvent changeEvent
      Only one ChangeEvent is needed per model instance since the event's only (read-only) state is the source property.
      protected EventListenerList listenerList
      The listeners waiting for model changes.

        

    • Constructor Summary

      Constructors 
      Constructor and Description
      DefaultBoundedRangeModel()
      Initializes all of the properties with default values.
      DefaultBoundedRangeModel(int value, int extent, int min, int max)
      Initializes value, extent, minimum and maximum.

        

    • Method Summary

      Methods 
      Modifier and Type Method and Description
      void addChangeListener(ChangeListener l)
      Adds a ChangeListener.
      protected void fireStateChanged()
      Runs each ChangeListener's stateChanged method.
      ChangeListener[] getChangeListeners()
      Returns an array of all the change listeners registered on this DefaultBoundedRangeModel.
      int getExtent()
      Returns the model's extent.
      <T extends EventListener
      T[]
      getListeners(Class<T> listenerType)
      Returns an array of all the objects currently registered as FooListeners upon this model.
      int getMaximum()
      Returns the model's maximum.
      int getMinimum()
      Returns the model's minimum.
      int getValue()
      Returns the model's current value.
      boolean getValueIsAdjusting()
      Returns true if the value is in the process of changing as a result of actions being taken by the user.
      void removeChangeListener(ChangeListener l)
      Removes a ChangeListener.
      void setExtent(int n)
      Sets the extent to n after ensuring that n is greater than or equal to zero and falls within the model's constraints:
      void setMaximum(int n)
      Sets the maximum to n after ensuring that n that the other three properties obey the model's constraints:
      void setMinimum(int n)
      Sets the minimum to n after ensuring that n that the other three properties obey the model's constraints:
      void setRangeProperties(int newValue, int newExtent, int newMin, int newMax, boolean adjusting)
      Sets all of the BoundedRangeModel properties after forcing the arguments to obey the usual constraints:
      void setValue(int n)
      Sets the current value of the model.
      void setValueIsAdjusting(boolean b)
      Sets the valueIsAdjusting property.
      String toString()
      Returns a string that displays all of the BoundedRangeModel properties.

        

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.

Document créé le 31/08/2006, dernière modification le 04/03/2020
Source du document imprimé : https://www.gaudry.be/java-api-rf-javax/swing/defaultboundedrangemodel.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, DefaultBoundedRangeModel

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