|
TPTP 4.5.0 Platform Project Public API Specification |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.eclipse.swt.widgets.Widget
org.eclipse.swt.widgets.Control
org.eclipse.swt.widgets.Scrollable
org.eclipse.swt.widgets.Composite
org.eclipse.swt.widgets.Canvas
org.eclipse.hyades.ui.widgets.zoomslider.ZoomSlider
public class ZoomSlider
A ruler-like widget representing a data range. The data range that the widget
operates over is defined by the maxLimit and minLimit configuration settings. The
widget will show data that is outside this range. The visible range, that is the data
that is currently shown on the widget, is set by the minVisible and maxVisible
configuration settings.
Mouse interactions allow the widget to be zoomed or transposed. Zooming narrows the
currently visible data range, and transposing transposes the current visible range
within the maximum and minimum configuration limits.
Zoomsliders also support controls on the zoomslider (ZoomControlBar) and current
indicator lines (ZoomIndicator). The Zoomslider holds all controls and indicators
in collections. Both are optional.
| Field Summary | |
|---|---|
static int |
BOTTOM
The constant representing the bottom of the slider |
static int |
DECREASING
The increasing slider direction constant |
static int |
HORIZONTAL
The horizontal slider orientation constant |
static int |
INCREASING
The increasing slider direction constant |
static int |
MAX
The maximum end constant for this slider |
static int |
MAX_TICKWIDTH
The maximum tick width constant |
static int |
MIN
The minimum end constant for this slider |
static int |
MIN_TICKWIDTH
The minimum tick width constant |
static int |
TOP
The constant representing the top of the slider |
static int |
VERTICAL
The vertical slider orientation constant |
| Fields inherited from class org.eclipse.swt.widgets.Composite |
|---|
embeddedHandle |
| Fields inherited from class org.eclipse.swt.widgets.Widget |
|---|
handle |
| Constructor Summary | |
|---|---|
ZoomSlider(org.eclipse.swt.widgets.Composite parent)
ZoomSlider constructor with no preset limit configuration |
|
ZoomSlider(org.eclipse.swt.widgets.Composite parent,
double minLimit,
double maxLimit,
double minVisible,
double maxVisible,
double resolution)
Construct a ZoomSlider with an initial limits configuration |
|
| Method Summary | |
|---|---|
void |
addZoomControlBar(double value)
Instantiate and add a ZoomControlBar to this ZoomSlider with a preset initial value |
void |
addZoomControlBar(ZoomControlBar bar)
Add a provided ZoomControlBar to this ZoomSlider |
void |
addZoomIndicator(ZoomIndicator indicator)
Add a Zoom Indicator to this slider's indicators collection |
void |
addZoomSliderListener(ZoomSliderListener listener)
Add a ZoomSliderListener to the list of listeners for this slider |
org.eclipse.swt.graphics.Point |
computeSize(int wHint,
int hHint,
boolean changed)
|
void |
configure(double minLimit,
double maxLimit,
double minVisible,
double maxVisible,
double resolution)
Configure a slider limits and resolution. |
void |
externalRepaint()
Force a repaint of this component |
org.eclipse.swt.graphics.Color |
getBackground()
|
int |
getDecimalPointPosition()
Get the pixel position of the decimal point |
int |
getDirection()
Get the direction constant, either increasing or decreasing |
ZoomSliderTick |
getFirstTick()
Return the first ZoomSliderTick instance in the list of ticks |
int |
getFontHeight()
Get the current font height that is used to render text on the slider |
org.eclipse.swt.graphics.Color |
getForeground()
|
double |
getIncrement()
Get the value spacing between ticks on the slider |
int |
getIncrementOOM()
Get the order of magnitude of the value spacing between ticks |
int |
getIndent()
Get the current slider indent |
ZoomSliderTick |
getLastTick()
Return the last ZoomSliderTick instance in the list of ticks |
ZoomSliderTick |
getLastVisible()
Get the last visible slider tick that is present on the slider |
double |
getMaxLimit()
Get the maximum limit for this slider. |
double |
getMaxVisible()
Get the maximum visible for this slider. |
double |
getMinLimit()
Get the minimum limit for this slider. |
double |
getMinRange()
Get the minimum pixel range relative to the resolution and current pixel range of this slider |
double |
getMinVisible()
Get the minimum visible for this slider. |
int |
getOrientation()
Get the current slider orientation. |
double |
getResolution()
Get the current graph resolution |
java.util.Vector |
getTickVector()
Get this ZoomSliders vector of ZoomSliderTicks |
java.lang.String |
getTitle()
Get this slider's title |
org.eclipse.swt.graphics.Color |
getTitleColor()
Get the color used for the slider title text |
org.eclipse.swt.graphics.Font |
getTitleFont()
Get the current Font used to pain the slider title on the slider |
double |
getUnitIncrement()
Get the value spacing between consecutive selectable positions on the scale |
ZoomControlBarsCollection |
getZoomControlBarsCollection()
Get the ZoomControlBarsCollection for this slider |
ZoomIndicatorsCollection |
getZoomIndicatorsCollection()
Get this ZoomSliders indicators collection |
boolean |
hasBars()
Query whether this slider has any control bars |
boolean |
isChanging()
Tells some visiting thread whether or not the scale is currently changing |
boolean |
isLocked(int end)
Return whether the minimum or maximum of a slider is locked |
boolean |
isMinimized()
|
boolean |
isTransposable()
Return wheter this zoom slider is transposable |
boolean |
isZoomable()
Return wheter this zoom slider is zoomable |
void |
layout()
|
void |
lock(int end,
boolean lock)
Set the locked status of an end of the slider |
void |
paint(org.eclipse.swt.events.PaintEvent e)
Paint this ZoomSlider control |
double |
pixel2Value(double pixelPos)
Convert a given pixel position to its corresponding slider value |
void |
recreateScale()
Recreate the scale on this zoom slider. |
void |
removeIndicator(ZoomIndicator indicator)
Remove a Zoom Indicator from this slider's indicators collection |
void |
removeZoomControlBar(ZoomControlBar bar)
Remove a provided ZoomControlBar to this ZoomSlider |
void |
removeZoomSliderListener(ZoomSliderListener listener)
Remove a ZoomSliderListener from the list of listeners for this slider |
void |
resizeScale()
Resize the slider ticks and indicators of this slider |
void |
setBackground(org.eclipse.swt.graphics.Color color)
|
void |
setDirection(int direction)
Set the direction of this slider |
void |
setFont(org.eclipse.swt.graphics.Font font)
|
void |
setForeground(org.eclipse.swt.graphics.Color color)
|
void |
setLastVisible(ZoomSliderTick tick)
Set the last visible slider tick that is present on the slider |
void |
setMaxLimit(double d)
Set the maximum limit for this slider. |
void |
setMaxVisible(double d)
Set the maximum visible limit for this slider. |
void |
setMinimized(boolean minimized)
|
void |
setMinLimit(double d)
Set the maximum limit for this slider. |
void |
setMinVisible(double d)
Set the minimum visible limit for this slider. |
void |
setOrientation(int orientation)
Set the orientation of this slider |
void |
setResolution(double d)
Set the resolution of this Zoom slider. |
void |
setTitle(java.lang.String title)
Set this slider's title |
void |
setTitleColor(org.eclipse.swt.graphics.Color color)
Set the color used for the slider title text |
void |
setTitleFont(org.eclipse.swt.graphics.Font font)
Set the Font to be used to paint the slider title on the slider |
void |
setTransposable(boolean b)
Set whether this slider is transposable or not |
void |
setZoomable(boolean b)
Set whether this slider is zoomable or not |
void |
updateIndicators()
Update the indicators on this slider |
void |
updateScale()
Force a redraw of this ZoomSlider and update the scale of this slider |
double |
value2Pixel(double value)
Convert a given slider value to its corresponding pixel value |
| Methods inherited from class org.eclipse.swt.widgets.Canvas |
|---|
drawBackground, getCaret, getIME, scroll, setCaret, setIME |
| Methods inherited from class org.eclipse.swt.widgets.Composite |
|---|
changed, getBackgroundMode, getChildren, getClientArea, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, setBackgroundMode, setFocus, setLayout, setLayoutDeferred, setTabList |
| Methods inherited from class org.eclipse.swt.widgets.Scrollable |
|---|
computeTrim, getBorderWidth, getHorizontalBar, getVerticalBar |
| Methods inherited from class org.eclipse.swt.widgets.Control |
|---|
addControlListener, addDragDetectListener, addFocusListener, addHelpListener, addKeyListener, addMenuDetectListener, addMouseListener, addMouseMoveListener, addMouseTrackListener, addMouseWheelListener, addPaintListener, addTraverseListener, computeSize, dragDetect, dragDetect, forceFocus, getAccessible, getBackgroundImage, getBounds, getCursor, getDragDetect, getEnabled, getFont, getLayoutData, getLocation, getMenu, getMonitor, getParent, getRegion, getShell, getSize, getToolTipText, getVisible, internal_dispose_GC, internal_new_GC, isEnabled, isFocusControl, isReparentable, isVisible, moveAbove, moveBelow, pack, pack, print, redraw, redraw, removeControlListener, removeDragDetectListener, removeFocusListener, removeHelpListener, removeKeyListener, removeMenuDetectListener, removeMouseListener, removeMouseMoveListener, removeMouseTrackListener, removeMouseWheelListener, removePaintListener, removeTraverseListener, setBackgroundImage, setBounds, setBounds, setCapture, setCursor, setDragDetect, setEnabled, setLayoutData, setLocation, setLocation, setMenu, setParent, setRedraw, setRegion, setSize, setSize, setToolTipText, setVisible, toControl, toControl, toDisplay, toDisplay, traverse, update |
| Methods inherited from class org.eclipse.swt.widgets.Widget |
|---|
addDisposeListener, addListener, dispose, getData, getData, getDisplay, getListeners, getStyle, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, setData, setData, toString |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int MIN
public static final int MAX
public static final int TOP
public static final int BOTTOM
public static final int MIN_TICKWIDTH
public static final int MAX_TICKWIDTH
public static final int VERTICAL
public static final int HORIZONTAL
public static final int INCREASING
public static final int DECREASING
| Constructor Detail |
|---|
public ZoomSlider(org.eclipse.swt.widgets.Composite parent)
parent - the parent composite to place this ZoomSlider on
public ZoomSlider(org.eclipse.swt.widgets.Composite parent,
double minLimit,
double maxLimit,
double minVisible,
double maxVisible,
double resolution)
throws ZoomSliderConfigurationException
parent - the parent compositeminLimit - the minimum value limit of this slidermaxLimit - the maximum value limit of this sliderminVisible - the minimum visible limit of this slidermaxVisible - the maximum visible limit of this sliderresolution - the slider resolution
ZoomSliderConfigurationException - if the configuration limits presented are not valid for this zoomslider| Method Detail |
|---|
public void addZoomControlBar(double value)
value - the initial value of the control barpublic void addZoomControlBar(ZoomControlBar bar)
bar - the ZoomControlBar to add to this slider's control collectionpublic void removeZoomControlBar(ZoomControlBar bar)
bar - the ZoomControlBar to remove from this slider's control collectionpublic boolean hasBars()
public ZoomControlBarsCollection getZoomControlBarsCollection()
public void addZoomIndicator(ZoomIndicator indicator)
indicator - ZoomIndicator to add to the collectionpublic void removeIndicator(ZoomIndicator indicator)
indicator - ZoomIndicator to removepublic ZoomIndicatorsCollection getZoomIndicatorsCollection()
public java.util.Vector getTickVector()
public ZoomSliderTick getFirstTick()
public ZoomSliderTick getLastTick()
public void paint(org.eclipse.swt.events.PaintEvent e)
e - the associated repaint eventpublic void updateScale()
public void recreateScale()
public void updateIndicators()
public void externalRepaint()
public void resizeScale()
public void layout()
layout in class org.eclipse.swt.widgets.Compositepublic void setFont(org.eclipse.swt.graphics.Font font)
setFont in class org.eclipse.swt.widgets.Canvaspublic double pixel2Value(double pixelPos)
pixelPos - the pixel position on this slider
public double value2Pixel(double value)
value - the slider position on this slider
public double getIncrement()
public int getIncrementOOM()
public double getUnitIncrement()
public int getDecimalPointPosition()
public int getIndent()
public int getFontHeight()
public boolean isChanging()
public org.eclipse.swt.graphics.Point computeSize(int wHint,
int hHint,
boolean changed)
computeSize in class org.eclipse.swt.widgets.Composite
public void configure(double minLimit,
double maxLimit,
double minVisible,
double maxVisible,
double resolution)
throws ZoomSliderConfigurationException
minLimit - the minimum limit for this slidermaxLimit - the maximum limit for this sliderminVisible - the minimum visible limit for this slidermaxVisible - the maximum visible limit for this sliderresolution - the resolution for this slider
ZoomSliderConfigurationException - if the new configuration is invalidpublic void setTitle(java.lang.String title)
title - a new string to be used as the title of this sliderpublic java.lang.String getTitle()
public void setTitleColor(org.eclipse.swt.graphics.Color color)
color - the new title colorpublic org.eclipse.swt.graphics.Color getTitleColor()
public void setTitleFont(org.eclipse.swt.graphics.Font font)
font - the new Font to be used to pain the slider title on the sliderpublic org.eclipse.swt.graphics.Font getTitleFont()
public void setForeground(org.eclipse.swt.graphics.Color color)
setForeground in class org.eclipse.swt.widgets.Controlpublic org.eclipse.swt.graphics.Color getForeground()
getForeground in class org.eclipse.swt.widgets.Controlpublic void setBackground(org.eclipse.swt.graphics.Color color)
setBackground in class org.eclipse.swt.widgets.Controlpublic org.eclipse.swt.graphics.Color getBackground()
getBackground in class org.eclipse.swt.widgets.Control
public void setMaxVisible(double d)
throws ZoomSliderConfigurationException
d - the maximum visible limit of this slider
ZoomSliderConfigurationException - if the new visible maximum results in an invalid slider configurationpublic double getMaxVisible()
public void setMinVisible(double d)
throws ZoomSliderConfigurationException
d - the minimum visible limit of this slider
ZoomSliderConfigurationException - if the new visible minimum results in an invalid slider configurationpublic double getMinVisible()
public void setMaxLimit(double d)
throws ZoomSliderConfigurationException
d - the maximum limit of this slider
ZoomSliderConfigurationException - if the new maximum results in an invalid slider configurationpublic double getMaxLimit()
public void setMinLimit(double d)
throws ZoomSliderConfigurationException
d - the minimum limit of this slider
ZoomSliderConfigurationException - if the new minimum results in an invalid slider configurationpublic double getMinLimit()
public void setResolution(double d)
throws ZoomSliderConfigurationException
d - the resolution value you wish to set for this slider
ZoomSliderConfigurationException - if this resolution results in an invalid Zoom Slider configurationpublic double getResolution()
public void setDirection(int direction)
throws ZoomSliderConfigurationException
direction - the direction constant, either INCREASING or DESCREASING
ZoomSliderConfigurationException - if altering the direction of the slider results in an invalid slider configurationINCREASING,
DECREASINGpublic int getDirection()
INCREASING,
DECREASING
public void setOrientation(int orientation)
throws ZoomSliderConfigurationException
orientation - the orientation constant for this slider, either VERTICAL or HORIZONTAL
ZoomSliderConfigurationException - if this orientation causes the current slider configuration to be invalidHORIZONTAL,
VERTICALpublic int getOrientation()
HORIZONTAL,
VERTICAL
public void lock(int end,
boolean lock)
end - a constant defining which end is queried for lock statuslock - a boolean of true if the end should be locked, and false otherwiseMIN,
MAXpublic boolean isLocked(int end)
end - a constant defining which end is queried for lock status
MIN,
MAXpublic void setZoomable(boolean b)
b - a boolean indicating whether this slider is zoomable or notpublic boolean isZoomable()
public void setTransposable(boolean b)
b - a boolean indicating whether this slider is transposablepublic boolean isTransposable()
public void setLastVisible(ZoomSliderTick tick)
tick - to set to the last ZoomSliderTickpublic ZoomSliderTick getLastVisible()
public double getMinRange()
public void addZoomSliderListener(ZoomSliderListener listener)
listener - the ZoomSliderListener to get added to the list of ZoomSliderListenerspublic void removeZoomSliderListener(ZoomSliderListener listener)
listener - the ZoomSliderListener to remove from the list of ZoomSliderListenerspublic boolean isMinimized()
public void setMinimized(boolean minimized)
|
TPTP 4.5.0 Platform Project Public API Specification |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||