|
|
@ -2,6 +2,25 @@ package com.fr.design.gui.iscrollbar; |
|
|
|
|
|
|
|
|
|
|
|
import com.fr.design.constants.UIConstants; |
|
|
|
import com.fr.design.constants.UIConstants; |
|
|
|
import com.fr.stable.StringUtils; |
|
|
|
import com.fr.stable.StringUtils; |
|
|
|
|
|
|
|
import sun.swing.DefaultLookup; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import javax.swing.BoundedRangeModel; |
|
|
|
|
|
|
|
import javax.swing.InputMap; |
|
|
|
|
|
|
|
import javax.swing.JComponent; |
|
|
|
|
|
|
|
import javax.swing.JList; |
|
|
|
|
|
|
|
import javax.swing.JScrollBar; |
|
|
|
|
|
|
|
import javax.swing.JScrollPane; |
|
|
|
|
|
|
|
import javax.swing.JViewport; |
|
|
|
|
|
|
|
import javax.swing.LookAndFeel; |
|
|
|
|
|
|
|
import javax.swing.SwingConstants; |
|
|
|
|
|
|
|
import javax.swing.SwingUtilities; |
|
|
|
|
|
|
|
import javax.swing.Timer; |
|
|
|
|
|
|
|
import javax.swing.UIManager; |
|
|
|
|
|
|
|
import javax.swing.event.ChangeEvent; |
|
|
|
|
|
|
|
import javax.swing.event.ChangeListener; |
|
|
|
|
|
|
|
import javax.swing.plaf.ComponentUI; |
|
|
|
|
|
|
|
import javax.swing.plaf.ScrollBarUI; |
|
|
|
|
|
|
|
import javax.swing.plaf.UIResource; |
|
|
|
import java.awt.Color; |
|
|
|
import java.awt.Color; |
|
|
|
import java.awt.Component; |
|
|
|
import java.awt.Component; |
|
|
|
import java.awt.Container; |
|
|
|
import java.awt.Container; |
|
|
@ -22,24 +41,6 @@ import java.awt.event.MouseEvent; |
|
|
|
import java.awt.event.MouseMotionListener; |
|
|
|
import java.awt.event.MouseMotionListener; |
|
|
|
import java.beans.PropertyChangeEvent; |
|
|
|
import java.beans.PropertyChangeEvent; |
|
|
|
import java.beans.PropertyChangeListener; |
|
|
|
import java.beans.PropertyChangeListener; |
|
|
|
import javax.swing.BoundedRangeModel; |
|
|
|
|
|
|
|
import javax.swing.InputMap; |
|
|
|
|
|
|
|
import javax.swing.JComponent; |
|
|
|
|
|
|
|
import javax.swing.JList; |
|
|
|
|
|
|
|
import javax.swing.JScrollBar; |
|
|
|
|
|
|
|
import javax.swing.JScrollPane; |
|
|
|
|
|
|
|
import javax.swing.JViewport; |
|
|
|
|
|
|
|
import javax.swing.LookAndFeel; |
|
|
|
|
|
|
|
import javax.swing.SwingConstants; |
|
|
|
|
|
|
|
import javax.swing.SwingUtilities; |
|
|
|
|
|
|
|
import javax.swing.Timer; |
|
|
|
|
|
|
|
import javax.swing.UIManager; |
|
|
|
|
|
|
|
import javax.swing.event.ChangeEvent; |
|
|
|
|
|
|
|
import javax.swing.event.ChangeListener; |
|
|
|
|
|
|
|
import javax.swing.plaf.ComponentUI; |
|
|
|
|
|
|
|
import javax.swing.plaf.ScrollBarUI; |
|
|
|
|
|
|
|
import javax.swing.plaf.UIResource; |
|
|
|
|
|
|
|
import sun.swing.DefaultLookup; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Like BasicScrollBarUI,but without two buttons |
|
|
|
* Like BasicScrollBarUI,but without two buttons |
|
|
@ -590,6 +591,7 @@ public class UIScrollBarUI extends ScrollBarUI implements LayoutManager, SwingCo |
|
|
|
* will cause a repaint. |
|
|
|
* will cause a repaint. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@SuppressWarnings("squid:S2164") |
|
|
|
protected void layoutVScrollbar(JScrollBar sb) { |
|
|
|
protected void layoutVScrollbar(JScrollBar sb) { |
|
|
|
Dimension sbSize = sb.getSize(); |
|
|
|
Dimension sbSize = sb.getSize(); |
|
|
|
Insets sbInsets = sb.getInsets(); |
|
|
|
Insets sbInsets = sb.getInsets(); |
|
|
@ -672,6 +674,7 @@ public class UIScrollBarUI extends ScrollBarUI implements LayoutManager, SwingCo |
|
|
|
* Make sure the thumb fits between the buttons. Note that setting the |
|
|
|
* Make sure the thumb fits between the buttons. Note that setting the |
|
|
|
* thumbs bounds causes a repaint. |
|
|
|
* thumbs bounds causes a repaint. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
|
|
|
|
@SuppressWarnings("squid:S2164") |
|
|
|
protected void layoutHScrollbar(JScrollBar sb) { |
|
|
|
protected void layoutHScrollbar(JScrollBar sb) { |
|
|
|
Dimension sbSize = sb.getSize(); |
|
|
|
Dimension sbSize = sb.getSize(); |
|
|
|
Insets sbInsets = sb.getInsets(); |
|
|
|
Insets sbInsets = sb.getInsets(); |
|
|
@ -1080,7 +1083,7 @@ public class UIScrollBarUI extends ScrollBarUI implements LayoutManager, SwingCo |
|
|
|
|
|
|
|
|
|
|
|
scrollbar.repaint(); |
|
|
|
scrollbar.repaint(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@SuppressWarnings("squid:S2164") |
|
|
|
private void setValueFrom(MouseEvent e) { |
|
|
|
private void setValueFrom(MouseEvent e) { |
|
|
|
boolean active = isThumbRollover(); |
|
|
|
boolean active = isThumbRollover(); |
|
|
|
BoundedRangeModel model = scrollbar.getModel(); |
|
|
|
BoundedRangeModel model = scrollbar.getModel(); |
|
|
|