src/share/classes/javax/swing/plaf/basic/BasicSliderUI.java
Print this page
*** 395,408 ****
* @since 1.6
*/
protected boolean labelsHaveSameBaselines() {
if (!checkedLabelBaselines) {
checkedLabelBaselines = true;
! Dictionary<?, JComponent> dictionary = slider.getLabelTable();
if (dictionary != null) {
sameLabelBaselines = true;
! Enumeration<JComponent> elements = dictionary.elements();
int baseline = -1;
while (elements.hasMoreElements()) {
JComponent label = elements.nextElement();
Dimension pref = label.getPreferredSize();
int labelBaseline = label.getBaseline(pref.width,
--- 395,408 ----
* @since 1.6
*/
protected boolean labelsHaveSameBaselines() {
if (!checkedLabelBaselines) {
checkedLabelBaselines = true;
! Dictionary<Integer, ? extends JComponent> dictionary = slider.getLabelTable();
if (dictionary != null) {
sameLabelBaselines = true;
! Enumeration<? extends JComponent> elements = dictionary.elements();
int baseline = -1;
while (elements.hasMoreElements()) {
JComponent label = elements.nextElement();
Dimension pref = label.getPreferredSize();
int labelBaseline = label.getBaseline(pref.width,
*** 751,761 ****
getHandler().propertyChange(e);
}
}
protected int getWidthOfWidestLabel() {
! Dictionary<?, JComponent> dictionary = slider.getLabelTable();
int widest = 0;
if ( dictionary != null ) {
Enumeration<?> keys = dictionary.keys();
while ( keys.hasMoreElements() ) {
JComponent label = dictionary.get(keys.nextElement());
--- 751,761 ----
getHandler().propertyChange(e);
}
}
protected int getWidthOfWidestLabel() {
! Dictionary<?, ? extends JComponent> dictionary = slider.getLabelTable();
int widest = 0;
if ( dictionary != null ) {
Enumeration<?> keys = dictionary.keys();
while ( keys.hasMoreElements() ) {
JComponent label = dictionary.get(keys.nextElement());
*** 764,774 ****
}
return widest;
}
protected int getHeightOfTallestLabel() {
! Dictionary<?, JComponent> dictionary = slider.getLabelTable();
int tallest = 0;
if ( dictionary != null ) {
Enumeration<?> keys = dictionary.keys();
while ( keys.hasMoreElements() ) {
JComponent label = dictionary.get(keys.nextElement());
--- 764,774 ----
}
return widest;
}
protected int getHeightOfTallestLabel() {
! Dictionary<?, ? extends JComponent> dictionary = slider.getLabelTable();
int tallest = 0;
if ( dictionary != null ) {
Enumeration<?> keys = dictionary.keys();
while ( keys.hasMoreElements() ) {
JComponent label = dictionary.get(keys.nextElement());
*** 869,879 ****
* @return smallest value that has an entry in the label table, or
* null.
* @since 1.6
*/
protected Integer getLowestValue() {
! Dictionary<Integer, JComponent> dictionary = slider.getLabelTable();
if (dictionary == null) {
return null;
}
--- 869,879 ----
* @return smallest value that has an entry in the label table, or
* null.
* @since 1.6
*/
protected Integer getLowestValue() {
! Dictionary<Integer, ? extends JComponent> dictionary = slider.getLabelTable();
if (dictionary == null) {
return null;
}
*** 1119,1129 ****
}
public void paintLabels( Graphics g ) {
Rectangle labelBounds = labelRect;
! Dictionary<Integer, JComponent> dictionary = slider.getLabelTable();
if ( dictionary != null ) {
Enumeration<Integer> keys = dictionary.keys();
int minValue = slider.getMinimum();
int maxValue = slider.getMaximum();
boolean enabled = slider.isEnabled();
--- 1119,1129 ----
}
public void paintLabels( Graphics g ) {
Rectangle labelBounds = labelRect;
! Dictionary<Integer, ? extends JComponent> dictionary = slider.getLabelTable();
if ( dictionary != null ) {
Enumeration<Integer> keys = dictionary.keys();
int minValue = slider.getMinimum();
int maxValue = slider.getMaximum();
boolean enabled = slider.isEnabled();