Class PMIDateRange
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
com.inductiveautomation.vision.api.client.components.model.AbstractVisionPanel
com.inductiveautomation.factorypmi.application.components.PMIDateRange
- All Implemented Interfaces:
DynamicPropertyProvider
,LocaleListener
,MutableDynamicPropertyProvider
,StyleProvider
,ComponentLifecycle
,DesignerInitializable
,EnabledEx
,QualityMonitor
,VisionComponent
,ActionListener
,ImageObserver
,MenuContainer
,PropertyChangeListener
,Serializable
,EventListener
,Accessible
public class PMIDateRange
extends AbstractVisionPanel
implements ActionListener, PropertyChangeListener, LocaleListener, DesignerInitializable, EnabledEx
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Represents a range of dates, from a start to an endstatic class
static class
Nested classes/interfaces inherited from class javax.swing.JPanel
JPanel.AccessibleJPanel
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected boolean
static final int
static final int
Fields inherited from class com.inductiveautomation.vision.api.client.components.model.AbstractVisionPanel
antialias, context, cursorCode, dynamicProps
Fields inherited from class javax.swing.JComponent
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
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface com.inductiveautomation.vision.api.client.components.model.ComponentLifecycle
COMPONENT_RUNNING
Fields inherited from interface com.inductiveautomation.vision.api.client.components.model.EnabledEx
DISABLED_BY_PERMISSIONS
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Fields inherited from interface com.inductiveautomation.ignition.client.model.LocaleListener
LOCAL_CHANGE_EVENT
Fields inherited from interface com.inductiveautomation.vision.api.client.binding.MutableDynamicPropertyProvider
RESERVED_SET_KEY
Fields inherited from interface com.inductiveautomation.vision.api.client.components.model.VisionComponent
COMPONENT_LOCKED, COMPONENT_PERMISSIONS, COMPONENT_SECURITY, COMPONENT_TRANSLATIONS
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
This handles the scroll and zoom buttonsprotected Icon
createIcon
(String name) protected void
doZoomIn()
protected void
void
int
protected PMIDateRange.DateRange
int
float
int
int
int
getUnit()
protected void
void
void
boolean
boolean
boolean
isOpaque()
void
localeChanged
(Locale newLocale) static void
protected void
Subclasses should override this to provide startup logic.protected void
void
This handles the gross unit editor (the text field) changing its date range, as well as the slider changing its selected rangevoid
setBounds
(int x, int y, int width, int height) void
setBoxFill
(Color boxFill) void
setComponentEnabled
(boolean componentEnabled) void
setDateStyle
(int dateStyle) void
setDensityData
(Dataset densityData) void
void
setEditorForegroundColor
(Color color) void
setEnabled
(boolean en) void
setEndDate
(Date endDate) void
setFillBackground
(boolean fillBackground) void
void
setForeground
(Color fg) protected void
void
setHighDensityColor
(Color color) void
setHistogram
(IHistogram histogram) void
setMaxSelectionSize
(String maxSelectionSize) void
setOpaque
(boolean isOpaque) void
setOuterRange
(Date rangeStartDate, Date rangeEndDate) Scripting function to let user change the outer range without running into complications with the order dates are set.void
setOuterRangeEndDate
(Date rangeEndDate) void
setOuterRangeStartDate
(Date rangeStartDate) void
Scripting function to let user change the selected range without running into complications with the order dates are set.void
setSelectionHighlight
(Color selectionHighlight) void
setStartDate
(Date startDate) void
setStartupMode
(int startupMode) void
setStartupRange
(String startupRange) void
setStartupSelection
(String startupSelection) void
setTickDensity
(float tickDensity) void
setTimeStyle
(int timeStyle) void
setTodayIndicatorColor
(Color todayIndicatorColor) void
setTrackMargin
(int trackMargin) void
setUnit
(int unit) protected void
Methods inherited from class com.inductiveautomation.vision.api.client.components.model.AbstractVisionPanel
getAppContext, getCursorCode, getDataQuality, getDynamicProps, getProperties, getPropertyValue, getQuality, getStyles, getToolTipText, initStyleListener, isAntialias, isComponentRunning, isPropertyDefined, onShutdown, paintChildren, paintOverlayOverChildren, setAntialias, setCursorCode, setDataQuality, setDynamicProps, setName, setPropertyValue, setQuality, setStyles, setToolTipText, setVisible, shutdownComponent, startupComponent, translate, updateQuality
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, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setFocusTraversalKeys, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setPreferredSize, setRequestFocusEnabled, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, 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, 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, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, 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, requestFocus, requestFocus, requestFocusInWindow, resize, resize, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
-
Field Details
-
STARTUP_NONE
public static final int STARTUP_NONE- See Also:
-
STARTUP_AUTO
public static final int STARTUP_AUTO- See Also:
-
fillBackground
protected boolean fillBackground
-
-
Constructor Details
-
PMIDateRange
public PMIDateRange()
-
-
Method Details
-
main
-
updateTooltipText
protected void updateTooltipText() -
localeChanged
- Specified by:
localeChanged
in interfaceLocaleListener
- Overrides:
localeChanged
in classAbstractVisionPanel
-
initComponents
protected void initComponents() -
createIcon
-
setEnabled
public void setEnabled(boolean en) - Overrides:
setEnabled
in classJComponent
-
isComponentEnabled
public boolean isComponentEnabled()- Specified by:
isComponentEnabled
in interfaceEnabledEx
-
setComponentEnabled
public void setComponentEnabled(boolean componentEnabled) - Specified by:
setComponentEnabled
in interfaceEnabledEx
-
evaluateEnabled
public void evaluateEnabled()- Specified by:
evaluateEnabled
in interfaceEnabledEx
-
getEndDate
-
setEndDate
-
getStartDate
-
setStartDate
-
getOuterRangeEndDate
-
setOuterRangeEndDate
-
getOuterRangeStartDate
-
setOuterRangeStartDate
-
setGrossRange
-
getGrossRange
-
setRange
Scripting function to let user change the selected range without running into complications with the order dates are set. Outer range will move (but not expand) if needed. Assumes start/end not null. If start > end, reverses their order.- Since:
- 7.8.1
-
setOuterRange
Scripting function to let user change the outer range without running into complications with the order dates are set. Selected range will move (but not expand) if needed. Assumes start/end not null If start > end, reverses their order.- Since:
- 7.8.1
-
getTickDensity
public float getTickDensity() -
setTickDensity
public void setTickDensity(float tickDensity) -
getDensityData
-
setDensityData
-
setHistogram
-
getTrackMargin
public int getTrackMargin() -
setTrackMargin
public void setTrackMargin(int trackMargin) -
getEditorBackground
-
setEditorBackground
-
getTodayIndicatorColor
-
setTodayIndicatorColor
-
getBoxFill
-
setBoxFill
-
getSelectionHighlight
-
setSelectionHighlight
-
getHighDensityColor
-
setHighDensityColor
-
getMaxSelectionSize
-
setMaxSelectionSize
-
getStartupMode
public int getStartupMode() -
setStartupMode
public void setStartupMode(int startupMode) -
getDateStyle
public int getDateStyle() -
setDateStyle
public void setDateStyle(int dateStyle) -
getTimeStyle
public int getTimeStyle() -
setTimeStyle
public void setTimeStyle(int timeStyle) -
getStartupRange
-
setStartupRange
-
getStartupSelection
-
setStartupSelection
-
setOpaque
public void setOpaque(boolean isOpaque) - Overrides:
setOpaque
in classJComponent
-
isOpaque
public boolean isOpaque()- Overrides:
isOpaque
in classJComponent
-
isFillBackground
public boolean isFillBackground() -
setFillBackground
public void setFillBackground(boolean fillBackground) -
paintComponent
- Overrides:
paintComponent
in classAbstractVisionPanel
-
initialize
public void initialize()- Specified by:
initialize
in interfaceDesignerInitializable
-
onStartup
protected void onStartup()Description copied from class:AbstractVisionPanel
Subclasses should override this to provide startup logic.- Overrides:
onStartup
in classAbstractVisionPanel
-
initializeStartupRange
public void initializeStartupRange() -
actionPerformed
This handles the scroll and zoom buttons- Specified by:
actionPerformed
in interfaceActionListener
-
doZoomIn
protected void doZoomIn() -
doZoomOut
protected void doZoomOut() -
propertyChange
This handles the gross unit editor (the text field) changing its date range, as well as the slider changing its selected range- Specified by:
propertyChange
in interfacePropertyChangeListener
-
setBounds
public void setBounds(int x, int y, int width, int height) -
getUnit
public int getUnit() -
setUnit
public void setUnit(int unit) -
setFont
- Overrides:
setFont
in classJComponent
-
setForeground
- Overrides:
setForeground
in classJComponent
-
setEditorForegroundColor
-
getEditorForegroundColor
-