|
SGT Home | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Container | +--gov.noaa.pmel.swing.JSlider2Date
Class provides graphical and textual input of a time range. Time calculations are performed using GeoDate. Minimum value are required to be less than or equal to the maximum value. Support has been added for java.util.Date, for both setting the range and getting and setting the slider values.
JSlider2
,
GeoDate
, Serialized FormFields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
JSlider2Date()
Default constructor. |
|
JSlider2Date(boolean twoHandles)
Constructs a single or double time slider. |
Method Summary | |
void |
addPropertyChangeListener(java.beans.PropertyChangeListener l)
Add a property change listener. |
boolean |
getAlwaysPost()
Get the always post flag for the slider. |
GeoDate |
getEndValue()
|
java.lang.String |
getFormat()
Get the format for the slider range label. |
int |
getHandleSize()
Get the current slider handle size. |
java.util.Date |
getMaxDate()
Get the maximum for the range. |
java.awt.Dimension |
getMaximumSize()
Returns the maximum size of this container. |
GeoDate |
getMaxRange()
Get the maximum for the range. |
GeoDate |
getMaxValue()
Get the maximum handle value |
java.util.Date |
getMinDate()
Get the minimum for the range. |
java.awt.Dimension |
getMinimumSize()
Returns the minimum size of this container. |
GeoDate |
getMinRange()
Get the minimum for the range. |
GeoDate |
getMinValue()
Get the minimum handle value |
java.awt.Dimension |
getPreferredSize()
Returns the preferred size of this container. |
TimeRange |
getRange()
Get the slider range. |
boolean |
getShowBorder()
Get border status for the slider. |
GeoDate |
getStartValue()
|
boolean |
getTwoHandles()
Get the two handle flag. |
boolean |
isTwoHandles()
Get the two handle flag. |
static void |
main(java.lang.String[] args)
|
void |
removePropertyChangeListener(java.beans.PropertyChangeListener l)
Remove a property change listener. |
void |
reset()
Reset the slider handles |
void |
setAlwaysPost(boolean ap)
Set the always post flag for the slider. |
void |
setEndValue(GeoDate tmax)
|
void |
setFormat(java.lang.String frmt)
Set the format for the slider range label. |
void |
setHandleSize(int sz)
Set the handle size for the slider. |
void |
setMaxDate(java.util.Date dmax)
Set the maximum for the range. |
void |
setMaxRange(GeoDate max)
Set the maximum for the range. |
void |
setMaxValue(GeoDate tmax)
Set the maximum handle value. |
void |
setMinDate(java.util.Date dmin)
Set the minimum for the range. |
void |
setMinRange(GeoDate min)
Set the minimum for the range. |
void |
setMinValue(GeoDate tmin)
Set the minimum handle value. |
void |
setRange(java.util.Date dmin,
java.util.Date dmax)
Set the range for the slider. |
void |
setRange(GeoDate min,
GeoDate max)
Set the range for the slider. |
void |
setRange(TimeRange range)
Set the range for the slider. |
void |
setShowBorder(boolean sb)
Show a border around the slider. |
void |
setSize(java.awt.Dimension dim)
Resizes this component so that it has width d.width
and height d.height . |
void |
setSize(int w,
int h)
Resizes this component so that it has width width
and height . |
void |
setStartValue(GeoDate tmin)
|
void |
setTwoHandles(boolean th)
Set the two handle mode. |
Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addNotify, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getInsets, getLayout, getListeners, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, remove, remove, removeAll, removeContainerListener, removeNotify, setFont, setLayout, update, validate |
Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, bounds, checkImage, checkImage, contains, contains, createImage, createImage, disable, dispatchEvent, enable, enable, enableInputMethods, getAccessibleContext, getBackground, getBounds, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setForeground, setLocale, setLocation, setLocation, setName, setVisible, show, show, size, toString, transferFocus |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public JSlider2Date()
public JSlider2Date(boolean twoHandles)
twoHandles
- if true create two handlesMethod Detail |
public void setRange(GeoDate min, GeoDate max)
min
- minimum valuemax
- maximum valuepublic void setRange(java.util.Date dmin, java.util.Date dmax)
min
- minimum valuemax
- maximum valuepublic void setRange(TimeRange range)
range
- slider time rangepublic TimeRange getRange()
public void setMinRange(GeoDate min)
min
- minimum range valuepublic GeoDate getMinRange()
public void setMaxRange(GeoDate max)
max
- maximum range valuepublic GeoDate getMaxRange()
public void reset()
public void setTwoHandles(boolean th)
th
- if true set two handlespublic boolean getTwoHandles()
public boolean isTwoHandles()
public void setMinDate(java.util.Date dmin)
dmin
- minimum range valuepublic java.util.Date getMinDate()
minimum
- range valuepublic void setMaxDate(java.util.Date dmax)
dmax
- maximum range valuepublic java.util.Date getMaxDate()
maximum
- range valuepublic GeoDate getStartValue()
public GeoDate getEndValue()
public void setStartValue(GeoDate tmin)
public void setEndValue(GeoDate tmax)
public void setMinValue(GeoDate tmin)
tmin
- minimum handle valuepublic void setMaxValue(GeoDate tmax)
tmax
- maximum handle valuepublic GeoDate getMinValue()
public GeoDate getMaxValue()
public void setFormat(java.lang.String frmt)
frmt
- Format in GeoDate syntaxGeoDate
public java.lang.String getFormat()
GeoDate
public void setShowBorder(boolean sb)
sb
- if true show the borderpublic boolean getShowBorder()
public void setHandleSize(int sz)
sz
- handle size in pixelspublic int getHandleSize()
public void setAlwaysPost(boolean ap)
ap
- if true always postpublic boolean getAlwaysPost()
public void addPropertyChangeListener(java.beans.PropertyChangeListener l)
addPropertyChangeListener
in class java.awt.Component
l
- property change listenerpublic void removePropertyChangeListener(java.beans.PropertyChangeListener l)
removePropertyChangeListener
in class java.awt.Component
l
- property change listenerpublic java.awt.Dimension getMinimumSize()
java.awt.Container
getMinimumSize
in class java.awt.Container
java.awt.Container
Dimension
that represents
the minimum size of this container.Container.getPreferredSize()
,
Container.getLayout()
,
LayoutManager.minimumLayoutSize(java.awt.Container)
,
Component.getMinimumSize()
public java.awt.Dimension getPreferredSize()
java.awt.Container
getPreferredSize
in class java.awt.Container
java.awt.Container
Dimension
that represents
the preferred size of this container.Container.getMinimumSize()
,
Container.getLayout()
,
LayoutManager.preferredLayoutSize(java.awt.Container)
,
Component.getPreferredSize()
public java.awt.Dimension getMaximumSize()
java.awt.Container
getMaximumSize
in class java.awt.Container
java.awt.Container
Container.getPreferredSize()
public void setSize(java.awt.Dimension dim)
java.awt.Component
d.width
and height d.height
.setSize
in class java.awt.Component
java.awt.Component
d
- The dimension specifying the new size
of this component.Component.setSize(int, int)
,
Component.setBounds(int, int, int, int)
public void setSize(int w, int h)
java.awt.Component
width
and height
.setSize
in class java.awt.Component
java.awt.Component
width
- The new width of this component in pixels.height
- The new height of this component in pixels.Component.getSize()
,
Component.setBounds(int, int, int, int)
public static void main(java.lang.String[] args)
|
SGT Home | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |