|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component java.awt.Container javax.swing.JComponent javax.swing.JPanel com.isti.util.gui.IstiAbstractTimeRangePanel com.isti.util.gui.IstiTimeRangePanel
public class IstiTimeRangePanel
Class IstiTimeRangePanel implements the time range panel.
Nested Class Summary | |
---|---|
static interface |
IstiTimeRangePanel.DurationChangeType
The duration change type determines how changes to duration are handled. |
Nested classes/interfaces inherited from class javax.swing.JPanel |
---|
javax.swing.JPanel.AccessibleJPanel |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
javax.swing.JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
java.awt.Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary | |
---|---|
protected static boolean |
debugFlag
|
static java.lang.String |
DEFAULT_END_TITLE
|
static java.lang.Double |
DEFAULT_MAX_DURATION_VALUE
|
static java.lang.String |
DEFAULT_MIN_MAX_TITLE
|
static java.lang.String |
DEFAULT_START_END_TITLE
|
static java.lang.String |
DEFAULT_START_TITLE
|
static java.lang.String |
DEFAULT_VALUES_TEXT_SEPARATOR_TEXT
The default values text separator text, which is a comma. |
protected java.lang.String |
durationTextTipText
|
protected java.lang.String |
durationTimeSliderTipText
|
protected java.lang.String |
endTimeSliderTipText
|
static double |
FLOAT_MS_PER_HOUR
|
protected static java.awt.Color |
FOREGROUND_COLOR
|
protected static boolean |
ignoreSlidersWhileValueIsAdjusting
|
protected java.lang.String |
maxOffsetTipText
|
protected java.lang.String |
maxTimeSliderTipText
|
protected java.lang.String |
minOffsetTipText
|
protected java.lang.String |
minTimeSliderTipText
|
static long |
MS_PER_HOUR
|
protected java.lang.String |
offsetTipText
|
protected java.lang.String |
offsetTipTextSuffix
|
protected static boolean |
showLabelsFlag
|
protected java.lang.String |
sliderTipTextSuffix
|
protected java.lang.String |
startTimeSliderTipText
|
Fields inherited from class javax.swing.JComponent |
---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields 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 | |
---|---|
IstiTimeRangePanel()
Constructs a time range panel. |
|
IstiTimeRangePanel(java.lang.String minMaxTitle,
java.lang.String startEndTitle)
Constructs a time range panel. |
|
IstiTimeRangePanel(java.lang.String minMaxTitle,
java.lang.String startEndTitle,
java.util.TimeZone value)
Constructs a time range panel. |
|
IstiTimeRangePanel(java.lang.String minMaxTitle,
java.lang.String startEndTitle,
java.util.TimeZone value,
java.lang.String startTitle,
java.lang.String endTitle,
java.lang.Double maxDurationValue)
Constructs a time range panel. |
|
IstiTimeRangePanel(java.lang.String minMaxTitle,
java.lang.String startEndTitle,
java.util.TimeZone value,
java.lang.String startTitle,
java.lang.String endTitle,
java.lang.Double maxDurationValue,
TimeUnits offsetUnits)
Constructs a time range panel. |
|
IstiTimeRangePanel(java.util.TimeZone value)
Constructs a time range panel. |
|
IstiTimeRangePanel(java.util.TimeZone value,
java.lang.Double maxDurationValue)
Constructs a time range panel. |
Method Summary | |
---|---|
protected void |
checkValues(boolean startTimeUpdateFlag,
boolean endTimeUpdateFlag)
Checks the values and makes sure the start time is not greater than the end time. |
int |
getDurationChangeType()
Get the duration change type. |
java.util.Date |
getEndDate()
Gets the end date. |
long |
getEndTime()
Gets the end time (number of milliseconds since January 1, 1970, 00:00:00 GMT.) |
java.util.Date |
getMaxDate()
Gets the maximum date; |
long |
getMaxTime()
Gets the maximum time (number of milliseconds since January 1, 1970, 00:00:00 GMT.) |
java.util.Date |
getMinDate()
Gets the minimum date; |
long |
getMinTime()
Gets the minimum time (number of milliseconds since January 1, 1970, 00:00:00 GMT.) |
protected double |
getMsPerUnit()
Get the number of milliseconds per unit as a double. |
int |
getQuickSelectButtonsLength()
Gets the number of quick select buttons. |
java.util.Date |
getStartDate()
Gets the start date. |
long |
getStartTime()
Gets the start time (number of milliseconds since January 1, 1970, 00:00:00 GMT.) |
java.util.TimeZone |
getTimeZone()
Gets the time zone. |
protected java.lang.String[] |
getValueTextArray(java.lang.String valuesText)
Get the value text array. |
protected java.lang.String[] |
getValueTextArray(java.lang.String valuesText,
java.lang.String separatorText)
Get the value text array. |
boolean |
isShowLabels()
Determines if the labels are shown. |
static void |
main(java.lang.String[] args)
|
protected void |
printValues(java.lang.String title)
Print the current values. |
void |
processUpdate(java.awt.Component component,
java.lang.Object e)
Process an update. |
void |
requestFocus()
Requests that the panel get the input focus. |
void |
setDurationChangeType(int durationChangeType)
Set the duration change type. |
void |
setEndDate(java.util.Date endDate)
Sets the end date. |
void |
setEndTime(long endTime)
Sets the end time. |
void |
setMaxDate(java.util.Date maxDate)
Sets the maximum date. |
void |
setMaxTime(long time)
Sets the maximum time (number of milliseconds since January 1, 1970, 00:00:00 GMT.) |
void |
setMinDate(java.util.Date minDate)
Sets the minimum date. |
void |
setMinMaxPanelVisible(boolean b)
Sets the min/max panel visible. |
void |
setMinTime(long time)
Sets the minimum time (number of milliseconds since January 1, 1970, 00:00:00 GMT.) |
protected void |
setQuickSelectButtonText(int buttonIndex,
java.lang.String buttonText)
Sets the text for the specified quick select button. |
void |
setQuickSelectButtonValue(int buttonIndex,
int value)
Sets the value for the specified quick select button. |
void |
setQuickSelectButtonValue(int buttonIndex,
java.lang.String valueText)
Sets the value for the specified quick select button. |
void |
setQuickSelectButtonValues(java.lang.String valuesText)
Set the quick selection button values. |
void |
setQuickSelectButtonValues(java.lang.String[] valueTextArray)
Set the quick selection button values. |
void |
setShowLabels(boolean b)
Enables or disables showing the labels. |
protected static boolean |
setSliderValue(javax.swing.JSlider slider,
int value)
Sets the slider value for the specified slider. |
void |
setStartDate(java.util.Date startDate)
Sets the start date. |
void |
setStartTime(long startTime)
Sets the start time. |
void |
setTimeZone(java.util.TimeZone value)
Sets the time zone with the given time zone value. |
protected void |
updateDurationTimes(java.awt.Component component)
Update the duration times. |
protected void |
updateTimeOffsets()
Updates the time offsets. |
Methods inherited from class com.isti.util.gui.IstiAbstractTimeRangePanel |
---|
convertOffsetToTime, convertTimeToOffset, getEndTimeOffset, getStartTimeOffset |
Methods inherited from class javax.swing.JPanel |
---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
Methods inherited from class javax.swing.JComponent |
---|
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
Methods inherited from class java.awt.Container |
---|
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree |
Methods inherited from class java.awt.Component |
---|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final long MS_PER_HOUR
public static final double FLOAT_MS_PER_HOUR
public static final java.lang.String DEFAULT_VALUES_TEXT_SEPARATOR_TEXT
protected static final java.awt.Color FOREGROUND_COLOR
protected static boolean showLabelsFlag
protected static boolean ignoreSlidersWhileValueIsAdjusting
protected static boolean debugFlag
public static final java.lang.String DEFAULT_MIN_MAX_TITLE
public static final java.lang.String DEFAULT_START_TITLE
public static final java.lang.String DEFAULT_END_TITLE
public static final java.lang.String DEFAULT_START_END_TITLE
public static final java.lang.Double DEFAULT_MAX_DURATION_VALUE
protected final java.lang.String maxTimeSliderTipText
protected final java.lang.String minTimeSliderTipText
protected final java.lang.String sliderTipTextSuffix
protected final java.lang.String startTimeSliderTipText
protected final java.lang.String endTimeSliderTipText
protected final java.lang.String durationTimeSliderTipText
protected final java.lang.String offsetTipTextSuffix
protected final java.lang.String minOffsetTipText
protected final java.lang.String maxOffsetTipText
protected final java.lang.String offsetTipText
protected final java.lang.String durationTextTipText
Constructor Detail |
---|
public IstiTimeRangePanel()
public IstiTimeRangePanel(java.lang.String minMaxTitle, java.lang.String startEndTitle)
minMaxTitle
- the title for the min/max panel.startEndTitle
- the title for the start/end panel.public IstiTimeRangePanel(java.lang.String minMaxTitle, java.lang.String startEndTitle, java.util.TimeZone value)
minMaxTitle
- the title for the min/max panel.startEndTitle
- the title for the start/end panel.value
- the given time zone.public IstiTimeRangePanel(java.lang.String minMaxTitle, java.lang.String startEndTitle, java.util.TimeZone value, java.lang.String startTitle, java.lang.String endTitle, java.lang.Double maxDurationValue)
minMaxTitle
- the title for the min/max panel.startEndTitle
- the title for the start/end panel.value
- the given time zone.startTitle
- the title for the start time panel.endTitle
- the title for the end time panel.maxDurationValue
- the max duration value or null for no max.public IstiTimeRangePanel(java.lang.String minMaxTitle, java.lang.String startEndTitle, java.util.TimeZone value, java.lang.String startTitle, java.lang.String endTitle, java.lang.Double maxDurationValue, TimeUnits offsetUnits)
minMaxTitle
- the title for the min/max panel.startEndTitle
- the title for the start/end panel.value
- the given time zone.startTitle
- the title for the start time panel.endTitle
- the title for the end time panel.maxDurationValue
- the max duration value or null for no max.public IstiTimeRangePanel(java.util.TimeZone value)
value
- the given time zone.public IstiTimeRangePanel(java.util.TimeZone value, java.lang.Double maxDurationValue)
value
- the given time zone.maxDurationValue
- the max duration value or null for no max.Method Detail |
---|
protected void checkValues(boolean startTimeUpdateFlag, boolean endTimeUpdateFlag)
startTimeUpdateFlag
- true if the start time was updated, false
otherwise.endTimeUpdateFlag
- true if the end time was updated, false otherwise.public int getDurationChangeType()
public java.util.Date getEndDate()
public long getEndTime()
getEndTime
in class IstiAbstractTimeRangePanel
public java.util.Date getMaxDate()
public long getMaxTime()
getMaxTime
in class IstiAbstractTimeRangePanel
public java.util.Date getMinDate()
public long getMinTime()
getMinTime
in class IstiAbstractTimeRangePanel
protected double getMsPerUnit()
public int getQuickSelectButtonsLength()
public java.util.Date getStartDate()
public long getStartTime()
getStartTime
in class IstiAbstractTimeRangePanel
public java.util.TimeZone getTimeZone()
protected java.lang.String[] getValueTextArray(java.lang.String valuesText)
valuesText
- the comma separated values text.
protected java.lang.String[] getValueTextArray(java.lang.String valuesText, java.lang.String separatorText)
valuesText
- the values text.separatorText
- the separator text.
public boolean isShowLabels()
protected void printValues(java.lang.String title)
title
- the title.public void processUpdate(java.awt.Component component, java.lang.Object e)
processUpdate
in interface UpdateListener
component
- the component.e
- the event or null if none.public void requestFocus()
requestFocus
in class javax.swing.JComponent
public void setDurationChangeType(int durationChangeType)
durationChangeType
- the duration change type.public void setEndDate(java.util.Date endDate)
setEndDate
in class IstiAbstractTimeRangePanel
endDate
- the end date.public void setEndTime(long endTime)
setEndTime
in class IstiAbstractTimeRangePanel
endTime
- the end time.public void setMaxDate(java.util.Date maxDate)
setMaxDate
in class IstiAbstractTimeRangePanel
maxDate
- the maximum date.public void setMaxTime(long time)
setMaxTime
in class IstiAbstractTimeRangePanel
time
- the maximum time.public void setMinDate(java.util.Date minDate)
setMinDate
in class IstiAbstractTimeRangePanel
minDate
- the minimum date.public void setMinMaxPanelVisible(boolean b)
b
- true for visible, false otherwise.public void setMinTime(long time)
setMinTime
in class IstiAbstractTimeRangePanel
time
- the minimum time.protected void setQuickSelectButtonText(int buttonIndex, java.lang.String buttonText)
buttonIndex
- the button index.buttonText
- the button text or null to disable.public void setQuickSelectButtonValue(int buttonIndex, int value)
buttonIndex
- the button index.value
- the number of time units. The number must be greater or equal
to 1 to make the button visible.public void setQuickSelectButtonValue(int buttonIndex, java.lang.String valueText)
buttonIndex
- the button index.valueText
- the value text is the number of time units and may include
text for the time units. The number must be greater or equal to 1
to make the button visible.public void setQuickSelectButtonValues(java.lang.String valuesText)
valuesText
- the comma separated values text.public void setQuickSelectButtonValues(java.lang.String[] valueTextArray)
valueTextArray
- the value text array.public void setShowLabels(boolean b)
b
- If true the labels are shown; otherwise the labels are not shown.public void setStartDate(java.util.Date startDate)
setStartDate
in class IstiAbstractTimeRangePanel
startDate
- the start date.public void setStartTime(long startTime)
setStartTime
in class IstiAbstractTimeRangePanel
startTime
- the start time.public void setTimeZone(java.util.TimeZone value)
value
- the given time zone.protected void updateDurationTimes(java.awt.Component component)
component
- the component.protected void updateTimeOffsets()
public static void main(java.lang.String[] args)
protected static boolean setSliderValue(javax.swing.JSlider slider, int value)
slider
- the slider.value
- the value.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |