org.jcpsim.gui
Class mySliderUI

java.lang.Object
  extended by javax.swing.plaf.ComponentUI
      extended by javax.swing.plaf.SliderUI
          extended by javax.swing.plaf.basic.BasicSliderUI
              extended by org.jcpsim.gui.mySliderUI

public class mySliderUI
extends javax.swing.plaf.basic.BasicSliderUI


Nested Class Summary
protected  class mySliderUI.MetalPropertyListener
           
 
Nested classes/interfaces inherited from class javax.swing.plaf.basic.BasicSliderUI
javax.swing.plaf.basic.BasicSliderUI.ActionScroller, javax.swing.plaf.basic.BasicSliderUI.ChangeHandler, javax.swing.plaf.basic.BasicSliderUI.ComponentHandler, javax.swing.plaf.basic.BasicSliderUI.FocusHandler, javax.swing.plaf.basic.BasicSliderUI.PropertyChangeHandler, javax.swing.plaf.basic.BasicSliderUI.ScrollListener, javax.swing.plaf.basic.BasicSliderUI.TrackListener
 
Field Summary
protected static java.awt.Color darkShadowColor
           
protected  boolean filledSlider
           
protected static java.awt.Color highlightColor
           
protected static javax.swing.Icon horizThumbIcon
           
protected  java.lang.String SLIDER_FILL
           
protected static java.awt.Color thumbColor
           
protected  int TICK_BUFFER
           
protected static int tickLength
           
protected static int trackWidth
           
 
Fields inherited from class javax.swing.plaf.basic.BasicSliderUI
changeListener, componentListener, contentRect, focusInsets, focusListener, focusRect, insetCache, labelRect, leftToRightCache, MAX_SCROLL, MIN_SCROLL, NEGATIVE_SCROLL, POSITIVE_SCROLL, propertyChangeListener, scrollListener, scrollTimer, slider, thumbRect, tickRect, trackBuffer, trackListener, trackRect
 
Constructor Summary
mySliderUI()
           
 
Method Summary
protected  java.beans.PropertyChangeListener createPropertyChangeListener(javax.swing.JSlider slider)
           
static javax.swing.plaf.ComponentUI createUI(javax.swing.JComponent c)
           
protected  int getThumbOverhang()
          Returns the amount that the thumb goes past the slide bar.
protected  java.awt.Dimension getThumbSize()
           
 int getTickLength()
          Gets the height of the tick area for horizontal sliders and the width of the tick area for vertical sliders.
protected  int getTrackLength()
          Returns the longer dimension of the slide bar.
protected  int getTrackWidth()
          Returns the shorter dimension of the track.
 void installUI(javax.swing.JComponent c)
           
 void paintFocus(java.awt.Graphics g)
           
protected  void paintMajorTickForHorizSlider(java.awt.Graphics g, java.awt.Rectangle tickBounds, int x)
           
protected  void paintMinorTickForHorizSlider(java.awt.Graphics g, java.awt.Rectangle tickBounds, int x)
           
 void paintThumb(java.awt.Graphics g)
           
 void paintTrack(java.awt.Graphics g)
           
protected  void scrollDueToClickInTrack(int dir)
           
 
Methods inherited from class javax.swing.plaf.basic.BasicSliderUI
calculateContentRect, calculateFocusRect, calculateGeometry, calculateLabelRect, calculateThumbLocation, calculateThumbSize, calculateTickRect, calculateTrackBuffer, calculateTrackRect, createChangeListener, createComponentListener, createFocusListener, createScrollListener, createTrackListener, drawInverted, getBaseline, getBaselineResizeBehavior, getFocusColor, getHeightOfHighValueLabel, getHeightOfLowValueLabel, getHeightOfTallestLabel, getHighestValue, getHighestValueLabel, getHighlightColor, getLowestValue, getLowestValueLabel, getMaximumSize, getMinimumHorizontalSize, getMinimumSize, getMinimumVerticalSize, getPreferredHorizontalSize, getPreferredSize, getPreferredVerticalSize, getShadowColor, getWidthOfHighValueLabel, getWidthOfLowValueLabel, getWidthOfWidestLabel, installDefaults, installKeyboardActions, installListeners, isDragging, labelsHaveSameBaselines, paint, paintHorizontalLabel, paintLabels, paintMajorTickForVertSlider, paintMinorTickForVertSlider, paintTicks, paintVerticalLabel, recalculateIfInsetsChanged, recalculateIfOrientationChanged, scrollByBlock, scrollByUnit, setThumbLocation, uninstallKeyboardActions, uninstallListeners, uninstallUI, valueForXPosition, valueForYPosition, xPositionForValue, yPositionForValue, yPositionForValue
 
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TICK_BUFFER

protected final int TICK_BUFFER
See Also:
Constant Field Values

filledSlider

protected boolean filledSlider

thumbColor

protected static java.awt.Color thumbColor

highlightColor

protected static java.awt.Color highlightColor

darkShadowColor

protected static java.awt.Color darkShadowColor

trackWidth

protected static int trackWidth

tickLength

protected static int tickLength

horizThumbIcon

protected static javax.swing.Icon horizThumbIcon

SLIDER_FILL

protected final java.lang.String SLIDER_FILL
See Also:
Constant Field Values
Constructor Detail

mySliderUI

public mySliderUI()
Method Detail

createUI

public static javax.swing.plaf.ComponentUI createUI(javax.swing.JComponent c)

installUI

public void installUI(javax.swing.JComponent c)
Overrides:
installUI in class javax.swing.plaf.basic.BasicSliderUI

createPropertyChangeListener

protected java.beans.PropertyChangeListener createPropertyChangeListener(javax.swing.JSlider slider)
Overrides:
createPropertyChangeListener in class javax.swing.plaf.basic.BasicSliderUI

paintThumb

public void paintThumb(java.awt.Graphics g)
Overrides:
paintThumb in class javax.swing.plaf.basic.BasicSliderUI

paintTrack

public void paintTrack(java.awt.Graphics g)
Overrides:
paintTrack in class javax.swing.plaf.basic.BasicSliderUI

paintFocus

public void paintFocus(java.awt.Graphics g)
Overrides:
paintFocus in class javax.swing.plaf.basic.BasicSliderUI

getThumbSize

protected java.awt.Dimension getThumbSize()
Overrides:
getThumbSize in class javax.swing.plaf.basic.BasicSliderUI

getTickLength

public int getTickLength()
Gets the height of the tick area for horizontal sliders and the width of the tick area for vertical sliders. BasicSliderUI uses the returned value to determine the tick area rectangle.

Overrides:
getTickLength in class javax.swing.plaf.basic.BasicSliderUI

getTrackWidth

protected int getTrackWidth()
Returns the shorter dimension of the track.


getTrackLength

protected int getTrackLength()
Returns the longer dimension of the slide bar. (The slide bar is only the part that runs directly under the thumb)


getThumbOverhang

protected int getThumbOverhang()
Returns the amount that the thumb goes past the slide bar.


scrollDueToClickInTrack

protected void scrollDueToClickInTrack(int dir)
Overrides:
scrollDueToClickInTrack in class javax.swing.plaf.basic.BasicSliderUI

paintMinorTickForHorizSlider

protected void paintMinorTickForHorizSlider(java.awt.Graphics g,
                                            java.awt.Rectangle tickBounds,
                                            int x)
Overrides:
paintMinorTickForHorizSlider in class javax.swing.plaf.basic.BasicSliderUI

paintMajorTickForHorizSlider

protected void paintMajorTickForHorizSlider(java.awt.Graphics g,
                                            java.awt.Rectangle tickBounds,
                                            int x)
Overrides:
paintMajorTickForHorizSlider in class javax.swing.plaf.basic.BasicSliderUI


jCpSim (Java CardioPulmonary SIMulations), v0.2.01
Dr. Frank Fischer, frank@jcpsim.org, http://www.jcpsim.org