|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.swing.plaf.ComponentUI javax.swing.plaf.SliderUI javax.swing.plaf.basic.BasicSliderUI javax.swing.plaf.metal.MetalSliderUI com.cosylab.gui.components.slider.CosySliderUI
public class CosySliderUI
This is customized Swing l&f for JSlider.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.plaf.metal.MetalSliderUI |
---|
javax.swing.plaf.metal.MetalSliderUI.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[] |
GREEN_LED
|
protected static java.awt.Color[] |
GREY_LED
|
protected java.awt.image.BufferedImage |
horizTrailerBuffer
|
protected static java.awt.Color[] |
RED_LED
|
protected java.awt.Rectangle |
trailerCache
|
protected double |
trailerPosition
|
protected java.awt.Rectangle |
trailerRect
|
protected javax.swing.Icon |
vertTrailerIcon
|
protected static java.awt.Color[] |
YELLOW_LED
|
Fields inherited from class javax.swing.plaf.metal.MetalSliderUI |
---|
darkShadowColor, filledSlider, highlightColor, horizThumbIcon, SLIDER_FILL, thumbColor, TICK_BUFFER, tickLength, trackWidth, vertThumbIcon |
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 | |
---|---|
CosySliderUI(RangedValueController range)
Creates a new CosySliderUI object. |
Method Summary | |
---|---|
protected void |
calculateTrailerLocation()
|
java.lang.String |
getFormat()
Returns the format used by this ui to format the ticks. |
protected java.awt.Color[] |
getIndicatorColor()
|
double |
getTolerance()
Returns the tolerance. |
protected java.awt.image.BufferedImage |
getTrailer()
Returns the image used to display the trailer. |
double |
getTrailerPosition()
Returns the position of the slider trailer. |
boolean |
isPaintTrailer()
Returns a flag indicating whether the trailer is painted or not. |
void |
paint(java.awt.Graphics g,
javax.swing.JComponent c)
|
void |
paintLabels(java.awt.Graphics g)
|
void |
paintThumb(java.awt.Graphics g)
|
void |
paintTicks(java.awt.Graphics g)
|
void |
paintTrailer(java.awt.Graphics g)
Paints the trailer. |
protected void |
scrollDueToClickInTrack(int dir)
|
void |
setFormat(java.lang.String format)
Sets the value display format. |
void |
setPaintTrailer(boolean paint)
Sets the flag whether the trailer should be painted or not. |
void |
setTolerance(double tol)
Sets the tolerance. |
void |
setTrailerPosition(double value)
Sets the slider trailer position. |
Methods inherited from class javax.swing.plaf.metal.MetalSliderUI |
---|
createPropertyChangeListener, createUI, getThumbOverhang, getThumbSize, getTickLength, getTrackLength, getTrackWidth, installUI, paintFocus, paintMajorTickForHorizSlider, paintMajorTickForVertSlider, paintMinorTickForHorizSlider, paintMinorTickForVertSlider, paintTrack |
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, paintHorizontalLabel, 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 |
---|
protected javax.swing.Icon vertTrailerIcon
protected java.awt.image.BufferedImage horizTrailerBuffer
protected java.awt.Rectangle trailerRect
protected java.awt.Rectangle trailerCache
protected double trailerPosition
protected static final java.awt.Color[] GREEN_LED
protected static final java.awt.Color[] RED_LED
protected static final java.awt.Color[] YELLOW_LED
protected static final java.awt.Color[] GREY_LED
Constructor Detail |
---|
public CosySliderUI(RangedValueController range)
range
- Method Detail |
---|
protected java.awt.image.BufferedImage getTrailer()
protected void calculateTrailerLocation()
public double getTrailerPosition()
public void setTrailerPosition(double value)
value
- new positionpublic void paintTrailer(java.awt.Graphics g)
g
- destination graphicsprotected java.awt.Color[] getIndicatorColor()
public void paintThumb(java.awt.Graphics g)
paintThumb
in class javax.swing.plaf.metal.MetalSliderUI
public void paint(java.awt.Graphics g, javax.swing.JComponent c)
paint
in class javax.swing.plaf.basic.BasicSliderUI
public void paintTicks(java.awt.Graphics g)
paintTicks
in class javax.swing.plaf.basic.BasicSliderUI
public void paintLabels(java.awt.Graphics g)
paintLabels
in class javax.swing.plaf.basic.BasicSliderUI
protected void scrollDueToClickInTrack(int dir)
scrollDueToClickInTrack
in class javax.swing.plaf.metal.MetalSliderUI
public void setFormat(java.lang.String format)
format
- new formatpublic void setTolerance(double tol)
tol
- new tolerancepublic double getTolerance()
public void setPaintTrailer(boolean paint)
paint
- public boolean isPaintTrailer()
public java.lang.String getFormat()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |