Class BasicContainer
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.BasicContainer
- All Implemented Interfaces:
DynamicPropertyProvider
,LocaleListener
,MutableDynamicPropertyProvider
,StyleProvider
,ComponentLifecycle
,QualityMonitor
,VisionComponent
,VisionContainer
,ImageObserver
,MenuContainer
,VetoableChangeListener
,Serializable
,EventListener
,Accessible
- Direct Known Subclasses:
VisionTemplate
The SpringPanel is the container for FactoryPMI. A lightweight subclass of JPanel, this panel always uses the
FPMILayout for its layout manager. add() is overwritten and privateAdd() used instead to ensure that adding logic is
always correct. The name SpringPanel is a historical leftover, as SpringLayout was used in earlier versions.
- See Also:
-
Nested Class Summary
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 TypeFieldDescriptionstatic final String
This string is used as a JComponent client property key if the panel contains a default button, or contains a panel who contains a default button.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 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
addComponent
(Component comp) getComponent
(String name) static String
getNextName
(VisionContainer container, String name) int
getPosition
(Component comp) getSpringInfo
(Component comp) static void
initializeName
(Component newComponent, VisionContainer container) boolean
boolean
isGroup()
boolean
boolean
boolean
void
moveBackward
(Component comp) void
moveForward
(Component comp) void
moveToBack
(Component comp) void
moveToFront
(Component comp) protected void
void
protected boolean
protected void
void
privateAdd
(Component comp) Only for use with classes that know how to use the BasicContainer.void
putSpringInfo
(Component comp, SpringInfo si) Deprecated.void
static String
sanitizeName
(String name) void
setBackground
(Color bg) void
setBoundsEx
(Rectangle2D r2d) This helps the serializer call the correct bounds setting method.void
setCombineRepaints
(boolean groupDrawingEnabled) void
setForeground
(Color fg) void
setGroup
(boolean group) void
setLayout
(LayoutManager mgr) void
Deprecated.void
setOpaque
(boolean b) void
setOptimizedDrawingEnabled
(boolean b) void
setPosition
(Component comp, int i) void
void
setRotation
(int i) void
setSecuritySettings
(String name, SecuritySettings settings) Deprecated.void
setTexturePath
(String texturePath) toString()
static boolean
validateName
(String name) static void
validateName
(String newName, VisionContainer container, Component component) 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, localeChanged, onShutdown, onStartup, paintChildren, 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, isOpaque, 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, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setPreferredSize, setRequestFocusEnabled, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, unregisterKeyboardAction, update
Methods inherited from class java.awt.Container
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, 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, 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, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setSize, setSize, show, show, size, 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
Methods inherited from interface com.inductiveautomation.vision.api.client.components.model.QualityMonitor
getDataQuality, getQuality, setDataQuality, setQuality, updateQuality
Methods inherited from interface com.inductiveautomation.vision.api.client.components.model.VisionContainer
getComponent, getComponentCount, getComponents, getParent, repaint, revalidate
-
Field Details
-
PANEL_CONTAINS_DEFAULT_BTN
This string is used as a JComponent client property key if the panel contains a default button, or contains a panel who contains a default button. The value of the JComponent client property is the button to make 'default'. Because of how deserialization sets fields before adding components to their parent, the HMIButton cannot truly register itself as default upon deserialization, so the button is passed up to enclosing RootPaneContainer (FHMIWindow) via this property.- See Also:
-
-
Constructor Details
-
BasicContainer
public BasicContainer() -
BasicContainer
-
-
Method Details
-
setBoundsEx
This helps the serializer call the correct bounds setting method. -
setPreferredBoundsEx
-
getSpringLayout
-
setLayout
-
isOptimizedDrawingEnabled
public boolean isOptimizedDrawingEnabled()- Overrides:
isOptimizedDrawingEnabled
in classJComponent
-
setOptimizedDrawingEnabled
public void setOptimizedDrawingEnabled(boolean b) -
isCombineRepaints
public boolean isCombineRepaints() -
setCombineRepaints
public void setCombineRepaints(boolean groupDrawingEnabled) -
add
-
addComponent
- Specified by:
addComponent
in interfaceVisionContainer
-
initializeName
-
privateAdd
Only for use with classes that know how to use the BasicContainer. Enforces name uniqueness by callinggetNextName(VisionContainer, String)
if a name collision is detected. -
getNextName
-
getComponent
- Specified by:
getComponent
in interfaceVisionContainer
-
vetoableChange
- Specified by:
vetoableChange
in interfaceVetoableChangeListener
- Throws:
PropertyVetoException
-
validateName
public static void validateName(String newName, VisionContainer container, Component component) throws IllegalArgumentException - Throws:
IllegalArgumentException
-
validateName
-
sanitizeName
-
remove
- Specified by:
remove
in interfaceVisionContainer
- Overrides:
remove
in classContainer
-
moveToFront
-
moveToBack
-
moveForward
-
moveBackward
-
paintComponent
- Overrides:
paintComponent
in classAbstractVisionPanel
-
paintBackground
-
paintTexture
-
paintOverlayOverChildren
protected boolean paintOverlayOverChildren()- Overrides:
paintOverlayOverChildren
in classAbstractVisionPanel
-
setPosition
- Specified by:
setPosition
in interfaceVisionContainer
-
getPosition
-
isOffsettingContainer
public boolean isOffsettingContainer()- Specified by:
isOffsettingContainer
in interfaceVisionContainer
-
getSpringInfo
-
putSpringInfo
Deprecated.This call is from a SpringPanel that was serialized with SpringLayout. Try to look at the SpringInfo class to see what kind of new layout constraints to give the component -
setRotation
public void setRotation(int i) -
toString
-
setLocked
Deprecated. -
setOpaque
public void setOpaque(boolean b) - Overrides:
setOpaque
in classJComponent
-
setSecuritySettings
Deprecated.For serialization. -
setBackground
- Overrides:
setBackground
in classJComponent
-
setForeground
- Overrides:
setForeground
in classJComponent
-
isGroup
public boolean isGroup() -
setGroup
public void setGroup(boolean group) -
layoutAsGroup
public boolean layoutAsGroup()- Specified by:
layoutAsGroup
in interfaceVisionContainer
-
getTexturePath
-
setTexturePath
-