- java.lang.Object
-
- java.awt.ScrollPaneAdjustable
-
- All Implemented Interfaces:
- Adjustable, Serializable
public class ScrollPaneAdjustable extends Object implements Adjustable, Serializable
This class represents the state of a horizontal or vertical scrollbar of aScrollPane
. Objects of this class are returned byScrollPane
methods.- Since:
- 1.4
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from interface java.awt.Adjustable
HORIZONTAL, NO_ORIENTATION, VERTICAL
-
-
Method Summary
Methods Modifier and Type Method and Description void
addAdjustmentListener(AdjustmentListener l)
Adds the specified adjustment listener to receive adjustment events from thisScrollPaneAdjustable
.AdjustmentListener[]
getAdjustmentListeners()
Returns an array of all the adjustment listeners registered on thisScrollPaneAdjustable
.int
getBlockIncrement()
Gets the block value increment for the adjustable object.int
getMaximum()
Gets the maximum value of the adjustable object.int
getMinimum()
Gets the minimum value of the adjustable object.int
getOrientation()
Returns the orientation of this scrollbar.int
getUnitIncrement()
Gets the unit value increment for the adjustable object.int
getValue()
Gets the current value of the adjustable object.boolean
getValueIsAdjusting()
Returns true if the value is in the process of changing as a result of actions being taken by the user.int
getVisibleAmount()
Gets the length of the proportional indicator.String
paramString()
Returns a string representing the state of this scrollbar.void
removeAdjustmentListener(AdjustmentListener l)
Removes the specified adjustment listener so that it no longer receives adjustment events from thisScrollPaneAdjustable
.void
setBlockIncrement(int b)
Sets the block value increment for the adjustable object.void
setMaximum(int max)
This method should NOT be called by user code.void
setMinimum(int min)
This method should NOT be called by user code.void
setUnitIncrement(int u)
Sets the unit value increment for the adjustable object.void
setValue(int v)
Sets the value of this scrollbar to the specified value.void
setValueIsAdjusting(boolean b)
Sets thevalueIsAdjusting
property.void
setVisibleAmount(int v)
This method should NOT be called by user code.String
toString()
Returns a string representation of this scrollbar and its values.
-
-
-
Method Detail
-
getOrientation
public int getOrientation()
Returns the orientation of this scrollbar.- Specified by:
getOrientation
in interfaceAdjustable
- Returns:
- the orientation of this scrollbar, either
Adjustable.HORIZONTAL
orAdjustable.VERTICAL
-
setMinimum
public void setMinimum(int min)
This method should NOT be called by user code. This method is public for this class to properly implementAdjustable
interface.- Specified by:
setMinimum
in interfaceAdjustable
- Parameters:
min
- the minimum value- Throws:
- Always throws an error when called.AWTError
-
getMinimum
public int getMinimum()
Description copied from interface:Adjustable
Gets the minimum value of the adjustable object.- Specified by:
getMinimum
in interfaceAdjustable
- Returns:
- the minimum value of the adjustable object
-
setMaximum
public void setMaximum(int max)
This method should NOT be called by user code. This method is public for this class to properly implementAdjustable
interface.- Specified by:
setMaximum
in interfaceAdjustable
- Parameters:
max
- the maximum value- Throws:
- Always throws an error when called.AWTError
-
getMaximum
public int getMaximum()
Description copied from interface:Adjustable
Gets the maximum value of the adjustable object.- Specified by:
getMaximum
in interfaceAdjustable
- Returns:
- the maximum value of the adjustable object
-
setUnitIncrement
public void setUnitIncrement(int u)
Description copied from interface:Adjustable
Sets the unit value increment for the adjustable object.- Specified by:
setUnitIncrement
in interfaceAdjustable
- Parameters:
u
- the unit increment
-
getUnitIncrement
public int getUnitIncrement()
Description copied from interface:Adjustable
Gets the unit value increment for the adjustable object.- Specified by:
getUnitIncrement
in interfaceAdjustable
- Returns:
- the unit value increment for the adjustable object
-
setBlockIncrement
public void setBlockIncrement(int b)
Description copied from interface:Adjustable
Sets the block value increment for the adjustable object.- Specified by:
setBlockIncrement
in interfaceAdjustable
- Parameters:
b
- the block increment
-
getBlockIncrement
public int getBlockIncrement()
Description copied from interface:Adjustable
Gets the block value increment for the adjustable object.- Specified by:
getBlockIncrement
in interfaceAdjustable
- Returns:
- the block value increment for the adjustable object
-
setVisibleAmount
public void setVisibleAmount(int v)
This method should NOT be called by user code. This method is public for this class to properly implementAdjustable
interface.- Specified by:
setVisibleAmount
in interfaceAdjustable
- Parameters:
v
- the length of the indicator- Throws:
- Always throws an error when called.AWTError
-
getVisibleAmount
public int getVisibleAmount()
Description copied from interface:Adjustable
Gets the length of the proportional indicator.- Specified by:
getVisibleAmount
in interfaceAdjustable
- Returns:
- the length of the proportional indicator
-
setValueIsAdjusting
public void setValueIsAdjusting(boolean b)
Sets thevalueIsAdjusting
property.- Parameters:
b
- new adjustment-in-progress status- Since:
- 1.4
- See Also:
getValueIsAdjusting()
-
getValueIsAdjusting
public boolean getValueIsAdjusting()
Returns true if the value is in the process of changing as a result of actions being taken by the user.- Returns:
- the value of the
valueIsAdjusting
property - See Also:
setValueIsAdjusting(boolean)
-
setValue
public void setValue(int v)
Sets the value of this scrollbar to the specified value.If the value supplied is less than the current minimum or greater than the current maximum, then one of those values is substituted, as appropriate.
- Specified by:
setValue
in interfaceAdjustable
- Parameters:
v
- the new value of the scrollbar
-
getValue
public int getValue()
Description copied from interface:Adjustable
Gets the current value of the adjustable object.- Specified by:
getValue
in interfaceAdjustable
- Returns:
- the current value of the adjustable object
-
addAdjustmentListener
public void addAdjustmentListener(AdjustmentListener l)
Adds the specified adjustment listener to receive adjustment events from thisScrollPaneAdjustable
. Ifl
isnull
, no exception is thrown and no action is performed.Refer to AWT Threading Issues for details on AWT's threading model.
- Specified by:
addAdjustmentListener
in interfaceAdjustable
- Parameters:
l
- the adjustment listener.- See Also:
removeAdjustmentListener(java.awt.event.AdjustmentListener)
,getAdjustmentListeners()
,AdjustmentListener
,AdjustmentEvent
-
removeAdjustmentListener
public void removeAdjustmentListener(AdjustmentListener l)
Removes the specified adjustment listener so that it no longer receives adjustment events from thisScrollPaneAdjustable
. Ifl
isnull
, no exception is thrown and no action is performed.Refer to AWT Threading Issues for details on AWT's threading model.
- Specified by:
removeAdjustmentListener
in interfaceAdjustable
- Parameters:
l
- the adjustment listener.- Since:
- JDK1.1
- See Also:
addAdjustmentListener(java.awt.event.AdjustmentListener)
,getAdjustmentListeners()
,AdjustmentListener
,AdjustmentEvent
-
getAdjustmentListeners
public AdjustmentListener[] getAdjustmentListeners()
Returns an array of all the adjustment listeners registered on thisScrollPaneAdjustable
.- Returns:
- all of this
ScrollPaneAdjustable
'sAdjustmentListener
s or an empty array if no adjustment listeners are currently registered - Since:
- 1.4
- See Also:
addAdjustmentListener(java.awt.event.AdjustmentListener)
,removeAdjustmentListener(java.awt.event.AdjustmentListener)
,AdjustmentListener
,AdjustmentEvent
-
toString
public String toString()
Returns a string representation of this scrollbar and its values.
-
paramString
public String paramString()
Returns a string representing the state of this scrollbar. This method is intended to be used only for debugging purposes, and the content and format of the returned string may vary between implementations. The returned string may be empty but may not benull
.- Returns:
- the parameter string of this scrollbar.
-
-
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
21/11/2024 21:58:25 Cette version de la page est en cache (à la date du 21/11/2024 21:58:25) 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 26/07/2006, dernière modification le 04/03/2020
Source du document imprimé : https://www.gaudry.be/java-api-rf-java/awt/scrollpaneadjustable.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
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.