Class TagReferenceAction
- java.lang.Object
-
- javax.swing.AbstractAction
-
- com.inductiveautomation.ignition.client.util.action.BaseAction
-
- com.inductiveautomation.ignition.designer.tags.tree.selection.TagReferenceAction
-
- All Implemented Interfaces:
java.awt.event.ActionListener
,java.io.Serializable
,java.lang.Cloneable
,java.util.EventListener
,javax.swing.Action
- Direct Known Subclasses:
InsertTagAction
public class TagReferenceAction extends BaseAction
This action, which needs to be initalized with a text component, will show a dialog box prompting the user to find a tag. When they choose one, the tag's path will be inserted into the text component. Optionally, aRelativePathProvider
can be provided in order to generate relative paths instead of absolute paths.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
TagReferenceAction.ReferenceStyle
-
Field Summary
Fields Modifier and Type Field Description protected TextlikeComponent
comp
protected TagSelectionComponent
component
-
Constructor Summary
Constructors Constructor Description TagReferenceAction(TextlikeComponent comp)
TagReferenceAction(TextlikeComponent comp, RelativePathProvider relProvider)
TagReferenceAction(TextlikeComponent comp, RelativePathProvider relProvider, TagSelectionComponent selector)
TagReferenceAction(TextlikeComponent comp, RelativePathProvider relProvider, java.util.function.Supplier<TagSelectionComponent> componentGenerator)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
actionPerformed(java.awt.event.ActionEvent evt)
javax.swing.JButton
createButton()
protected java.awt.Component
getParentComponent()
TagSelectionComponent
getSelectionComponent()
Gets the selection component, lazily if necessary.protected void
init()
void
reset(TextlikeComponent area)
void
setSelectionComponent(TagSelectionComponent component)
TagReferenceAction
setStyle(TagReferenceAction.ReferenceStyle style)
protected void
setText(java.lang.String s)
void
setToStringFull(boolean toStringFull)
-
Methods inherited from class com.inductiveautomation.ignition.client.util.action.BaseAction
create, createButton, createButton, evaluateEnabled, listenTo, listenTo, setBundleKey, setIcon, updateEnabled
-
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
-
-
-
-
Field Detail
-
component
protected TagSelectionComponent component
-
comp
protected TextlikeComponent comp
-
-
Constructor Detail
-
TagReferenceAction
public TagReferenceAction(TextlikeComponent comp)
-
TagReferenceAction
public TagReferenceAction(TextlikeComponent comp, RelativePathProvider relProvider)
-
TagReferenceAction
public TagReferenceAction(TextlikeComponent comp, RelativePathProvider relProvider, java.util.function.Supplier<TagSelectionComponent> componentGenerator)
-
TagReferenceAction
public TagReferenceAction(TextlikeComponent comp, RelativePathProvider relProvider, TagSelectionComponent selector)
-
-
Method Detail
-
createButton
public javax.swing.JButton createButton()
-
init
protected void init()
-
getSelectionComponent
public final TagSelectionComponent getSelectionComponent()
Gets the selection component, lazily if necessary.
-
setSelectionComponent
public void setSelectionComponent(TagSelectionComponent component)
-
setText
protected void setText(java.lang.String s)
-
reset
public void reset(TextlikeComponent area)
-
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent evt)
-
getParentComponent
protected java.awt.Component getParentComponent()
-
setToStringFull
public void setToStringFull(boolean toStringFull)
-
setStyle
public TagReferenceAction setStyle(TagReferenceAction.ReferenceStyle style)
-
-