Class TagBrowseTree
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JScrollPane
com.inductiveautomation.vision.api.client.components.model.AbstractVisionScrollPane
com.inductiveautomation.factorypmi.application.components.TagBrowseTree
- All Implemented Interfaces:
DynamicPropertyProvider
,LocaleListener
,MutableDynamicPropertyProvider
,StyleProvider
,ComponentLifecycle
,ExtensibleComponent
,QualityMonitor
,VisionComponent
,ImageObserver
,MenuContainer
,Serializable
,Accessible
,ScrollPaneConstants
public class TagBrowseTree
extends AbstractVisionScrollPane
implements ExtensibleComponent, LocaleListener
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected class
Class that helps properly set the properties on the tree during startupclass
Wrapper class that returns gives the tree path relative path of the root node of the current root nodeclass
Nested classes/interfaces inherited from class javax.swing.JScrollPane
JScrollPane.AccessibleJScrollPane, JScrollPane.ScrollBar
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 Font
static final int
static final int
protected String
protected Dataset
protected TreeSelectionListener
protected int
protected Runnable
protected boolean
protected boolean
protected boolean
protected boolean
protected TagBrowseTree.StartupWorker
protected TransferHandler
protected JTree
protected int
protected TreeModel
protected TreeSelectionModel
Fields inherited from class com.inductiveautomation.vision.api.client.components.model.AbstractVisionScrollPane
antialias, context, cursorCode
Fields inherited from class javax.swing.JScrollPane
columnHeader, horizontalScrollBar, horizontalScrollBarPolicy, lowerLeft, lowerRight, rowHeader, upperLeft, upperRight, verticalScrollBar, verticalScrollBarPolicy, viewport
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 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 javax.swing.ScrollPaneConstants
COLUMN_HEADER, HORIZONTAL_SCROLLBAR, HORIZONTAL_SCROLLBAR_ALWAYS, HORIZONTAL_SCROLLBAR_AS_NEEDED, HORIZONTAL_SCROLLBAR_NEVER, HORIZONTAL_SCROLLBAR_POLICY, LOWER_LEADING_CORNER, LOWER_LEFT_CORNER, LOWER_RIGHT_CORNER, LOWER_TRAILING_CORNER, ROW_HEADER, UPPER_LEADING_CORNER, UPPER_LEFT_CORNER, UPPER_RIGHT_CORNER, UPPER_TRAILING_CORNER, VERTICAL_SCROLLBAR, VERTICAL_SCROLLBAR_ALWAYS, VERTICAL_SCROLLBAR_AS_NEEDED, VERTICAL_SCROLLBAR_NEVER, VERTICAL_SCROLLBAR_POLICY, VIEWPORT
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 TypeMethodDescriptionprotected Dataset
protected TransferHandler
protected TreePath[]
dataSetToTreePathsInternal
(Dataset dataset) protected void
getFont()
getLog()
int
protected TreeSelectionModel
protected String
getTree()
int
protected void
init()
protected boolean
boolean
boolean
boolean
boolean
void
localeChanged
(Locale newLocale) void
Subclasses should override this to provide startup logic.protected boolean
pathsInCorrectFormat
(Dataset paths) void
refresh()
this method is used when setting the filterTag extension function and can be used in scripting to properly refresh the component by reloading tags.void
setContext
(VisionClientContext context) void
void
protected void
void
setRootNodePath
(String rootNodePath) void
setSelectedPaths
(Dataset selectedPaths) protected void
setSelectedPaths
(Dataset selectedPaths, boolean notifyTree) void
setSelectionMode
(int selectionMode) void
setShowHistorical
(boolean showHistorical) void
setShowRealtime
(boolean showRealtime) void
setShowRootNode
(boolean showRootNode) void
setShowRootNodeHandles
(boolean showRootNodeHandles) void
setTreeMode
(int treeMode) protected void
protected void
sets model and refreshes the nodes on startup (synchronously from calling thread)protected void
protected void
synch the selected paths dataset to selected paths of the JTreeprotected QualifiedPath
Calling QualifiedPathUtils to create a QualifiedPath from a string builds out an abbreviated TagPath without any system information, like so: [local_mysql]mytagMethods inherited from class com.inductiveautomation.vision.api.client.components.model.AbstractVisionScrollPane
getAppContext, getCursorCode, getDataQuality, getDynamicProps, getProperties, getPropertyValue, getQuality, getStyles, getToolTipText, initStyleListener, isAntialias, isComponentRunning, isPropertyDefined, onShutdown, paintChildren, paintComponent, setAntialias, setCursorCode, setDataQuality, setDynamicProps, setName, setPropertyValue, setQuality, setStyles, setToolTipText, setVisible, shutdownComponent, startupComponent, updateQuality
Methods inherited from class javax.swing.JScrollPane
createHorizontalScrollBar, createVerticalScrollBar, createViewport, getAccessibleContext, getColumnHeader, getCorner, getHorizontalScrollBar, getHorizontalScrollBarPolicy, getRowHeader, getUI, getUIClassID, getVerticalScrollBar, getVerticalScrollBarPolicy, getViewport, getViewportBorder, getViewportBorderBounds, isValidateRoot, isWheelScrollingEnabled, paramString, setColumnHeader, setColumnHeaderView, setComponentOrientation, setCorner, setHorizontalScrollBar, setHorizontalScrollBarPolicy, setLayout, setRowHeader, setRowHeaderView, setUI, setVerticalScrollBar, setVerticalScrollBarPolicy, setViewport, setViewportBorder, setViewportView, setWheelScrollingEnabled, 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, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, 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, setEnabled, setFocusTraversalKeys, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, 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, 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, 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, setBounds, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.inductiveautomation.vision.api.client.components.model.ComponentLifecycle
getAppContext, shutdownComponent, startupComponent
-
Field Details
-
MODE_REALTIME
public static final int MODE_REALTIME- See Also:
-
MODE_HISTORICAL
public static final int MODE_HISTORICAL- See Also:
-
tree
-
treeModel
-
treeSelectionModel
-
selectionListener
-
tagTransferHandler
-
selectionRunner
-
startupWorker
-
rootNodePath
-
selectedPaths
-
selectionMode
protected int selectionMode -
treeMode
protected int treeMode -
showHistorical
protected boolean showHistorical -
showRealtime
protected boolean showRealtime -
showRootNode
protected boolean showRootNode -
showRootNodeHandles
protected boolean showRootNodeHandles -
font
-
-
Constructor Details
-
TagBrowseTree
public TagBrowseTree()
-
-
Method Details
-
init
protected void init() -
getSelectionModel
-
createTransferHandler
-
setContext
-
onStartup
public void onStartup()Description copied from class:AbstractVisionScrollPane
Subclasses should override this to provide startup logic.- Overrides:
onStartup
in classAbstractVisionScrollPane
-
startupModel
protected void startupModel()sets model and refreshes the nodes on startup (synchronously from calling thread) -
createInitialDataset
-
startupTreeModelRoot
protected void startupTreeModelRoot() -
toFullQualifiedPath
Calling QualifiedPathUtils to create a QualifiedPath from a string builds out an abbreviated TagPath without any system information, like so: [local_mysql]mytag Call this method to get a QualifiedPath that looks like this: [local_mysql:/agent-ide-8088:default]mytag This format is needed to match the format of the tag tree -
getFont
- Specified by:
getFont
in interfaceMenuContainer
- Overrides:
getFont
in classComponent
-
setFont
- Overrides:
setFont
in classJComponent
-
setPreferredSize
protected void setPreferredSize() -
getTree
-
getContext
-
getTreeModel
-
synchDatasetToTree
protected void synchDatasetToTree()synch the selected paths dataset to selected paths of the JTree -
showError
-
isSame
-
getStringFromBundle
-
dataSetToTreePathsInternal
-
pathsInCorrectFormat
-
error
-
getExtensionFunctions
- Specified by:
getExtensionFunctions
in interfaceExtensibleComponent
-
setExtensionFunctions
- Specified by:
setExtensionFunctions
in interfaceExtensibleComponent
-
getLog
-
refresh
public void refresh()this method is used when setting the filterTag extension function and can be used in scripting to properly refresh the component by reloading tags. -
setRootNodePath
-
getRootNodePath
-
getSelectedPaths
-
setSelectedPaths
-
setSelectedPaths
-
getSelectionMode
public int getSelectionMode() -
setSelectionMode
public void setSelectionMode(int selectionMode) -
getTreeMode
public int getTreeMode() -
setTreeMode
public void setTreeMode(int treeMode) -
isShowHistorical
public boolean isShowHistorical() -
setShowHistorical
public void setShowHistorical(boolean showHistorical) -
isShowRealtime
public boolean isShowRealtime() -
setShowRealtime
public void setShowRealtime(boolean showRealtime) -
isShowRootNode
public boolean isShowRootNode() -
setShowRootNode
public void setShowRootNode(boolean showRootNode) -
isShowRootNodeHandles
public boolean isShowRootNodeHandles() -
setShowRootNodeHandles
public void setShowRootNodeHandles(boolean showRootNodeHandles) -
localeChanged
- Specified by:
localeChanged
in interfaceLocaleListener
- Overrides:
localeChanged
in classAbstractVisionScrollPane
-