public class TemplateCanvas extends AbstractVisionPanel implements DesignerInitializable, ExtensibleComponent
Modifier and Type | Class and Description |
---|---|
static class |
TemplateCanvas.LoadSpec |
static class |
TemplateCanvas.ScrollBehavior |
javax.swing.JPanel.AccessibleJPanel
javax.swing.JComponent.AccessibleJComponent
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COL_H |
static java.lang.String |
COL_LAYOUT |
static java.lang.String |
COL_NAME |
static java.lang.String |
COL_PARAMETERS |
static java.lang.String |
COL_TEMPLATE |
static java.lang.String |
COL_W |
static java.lang.String |
COL_X |
static java.lang.String |
COL_Y |
static java.lang.String |
COL_Z |
antialias, context, cursorCode, dynamicProps
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
COMPONENT_RUNNING
RESERVED_SET_KEY
COMPONENT_LOCKED, COMPONENT_PERMISSIONS, COMPONENT_SECURITY, COMPONENT_TRANSLATIONS
Constructor and Description |
---|
TemplateCanvas() |
Modifier and Type | Method and Description |
---|---|
protected void |
_finishBuilding(com.inductiveautomation.factorypmi.application.components.TemplateCanvas.LoadedTemplates templates) |
java.util.List<PyComponentWrapper> |
getAllTemplates() |
java.util.Map<java.lang.String,ExtensionFunction> |
getExtensionFunctions() |
java.lang.String |
getLayoutConstraints() |
int |
getScrollBehavior() |
TemplateCanvas.ScrollBehavior |
getScrollBehaviorEnum() |
PyComponentWrapper |
getTemplate(java.lang.String name) |
Dataset |
getTemplates() |
void |
initialize() |
boolean |
isOpaque() |
void |
localeChanged(java.util.Locale newLocale) |
protected void |
onShutdown()
Subclasses should override this to provide shutdown logic.
|
protected void |
onStartup()
Subclasses should override this to provide startup logic.
|
protected void |
paintComponent(java.awt.Graphics g) |
protected void |
rebuild()
Rebuilds the UI, re-creating all the templates.
|
void |
setExtensionFunctions(java.util.Map<java.lang.String,ExtensionFunction> map) |
void |
setLayoutConstraints(java.lang.String layoutConstraints) |
void |
setScrollBehavior(int scrollBehavior) |
void |
setTemplates(Dataset templates) |
getAppContext, getCursorCode, getDataQuality, getDynamicProps, getProperties, getPropertyValue, getStyles, getToolTipText, initStyleListener, isAntialias, isComponentRunning, isPropertyDefined, paintChildren, paintOverlayOverChildren, setAntialias, setCursorCode, setDataQuality, setDynamicProps, setName, setPropertyValue, setStyles, setToolTipText, setVisible, shutdownComponent, startupComponent, translate, updateQuality
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
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, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, unregisterKeyboardAction, update
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
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, 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, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getAppContext, shutdownComponent, startupComponent
public static final java.lang.String COL_PARAMETERS
public static final java.lang.String COL_TEMPLATE
public static final java.lang.String COL_NAME
public static final java.lang.String COL_X
public static final java.lang.String COL_Y
public static final java.lang.String COL_W
public static final java.lang.String COL_H
public static final java.lang.String COL_Z
public static final java.lang.String COL_LAYOUT
public boolean isOpaque()
isOpaque
in class javax.swing.JComponent
protected void paintComponent(java.awt.Graphics g)
paintComponent
in class AbstractVisionPanel
protected void onShutdown()
AbstractVisionPanel
onShutdown
in class AbstractVisionPanel
protected void onStartup()
AbstractVisionPanel
onStartup
in class AbstractVisionPanel
protected void rebuild()
public void localeChanged(java.util.Locale newLocale)
localeChanged
in interface LocaleListener
localeChanged
in class AbstractVisionPanel
protected void _finishBuilding(com.inductiveautomation.factorypmi.application.components.TemplateCanvas.LoadedTemplates templates)
public void initialize()
initialize
in interface DesignerInitializable
public void setTemplates(Dataset templates)
public Dataset getTemplates()
public java.util.List<PyComponentWrapper> getAllTemplates()
public PyComponentWrapper getTemplate(java.lang.String name)
public void setScrollBehavior(int scrollBehavior)
public int getScrollBehavior()
public TemplateCanvas.ScrollBehavior getScrollBehaviorEnum()
public void setLayoutConstraints(java.lang.String layoutConstraints)
public java.lang.String getLayoutConstraints()
public java.util.Map<java.lang.String,ExtensionFunction> getExtensionFunctions()
getExtensionFunctions
in interface ExtensibleComponent
public void setExtensionFunctions(java.util.Map<java.lang.String,ExtensionFunction> map)
setExtensionFunctions
in interface ExtensibleComponent