Class CommonBeanInfo
- All Implemented Interfaces:
- BeanInfo
- Direct Known Subclasses:
- AbstractButtonBeanInfo,- AlarmJournalTableBeanInfo,- AlarmStatusTableBeanInfo,- AlertSummaryTableBeanInfo,- BasicContainerBeanInfo,- ColumnSelectorPanelBeanInfo,- EquipmentScheduleViewBeanInfo,- FileExplorerBeanInfo,- LanguageSelectorBeanInfo,- LinearScaleBeanInfo,- MovingAnalogIndicatorBeanInfo,- PathBasedVisionShapeBeanInfo,- PDFViewerBeanInfo,- PMIBarChartBeanInfo,- PMIBarcodeBeanInfo,- PMIBoxWhiskerChartBeanInfo,- PMIChartBeanInfo,- PMICheckBoxBeanInfo,- PMICircleBeanInfo,- PMIComboBoxBeanInfo,- PMICommentsPanel2BeanInfo,- PMICommentsPanelBeanInfo,- PMICompassBeanInfo,- PMICylindricalTankBeanInfo,- PMIDateRangeBeanInfo,- PMIDateTimeSelectorBeanInfo,- PMIDayViewBeanInfo,- PMIDigitalDisplayBeanInfo,- PMIEasyChartBeanInfo,- PMIEditorPaneBeanInfo,- PMIFillLevelIndicatorBeanInfo,- PMIFormattedTextFieldBeanInfo,- PMIGanttChartBeanInfo,- PMIImageBeanInfo,- PMIIPCamViewerBeanInfo,- PMILabelBeanInfo,- PMILightrailSignalBeanInfo,- PMILineBeanInfo,- PMIListBeanInfo,- PMIMeterBeanInfo,- PMIMomentaryButton2BeanInfo,- PMIMomentaryButtonBeanInfo,- PMIMonthViewBeanInfo,- PMIMultiStateIndicatorBeanInfo,- PMINStateButtonBeanInfo,- PMINumericLabelBeanInfo,- PMINumericTextFieldBeanInfo,- PMIPaintableCanvasBeanInfo,- PMIPasswordFieldBeanInfo,- PMIPieChartBeanInfo,- PMIPipeBeanInfo,- PMIPipeJointBeanInfo,- PMIPolygonBeanInfo,- PMIProgressBarBeanInfo,- PMIRadioButtonBeanInfo,- PMIRectangleBeanInfo,- PMISignalGeneratorBeanInfo,- PMISliderBeanInfo,- PMISoundComponentBeanInfo,- PMISpinnerBeanInfo,- PMIStatusChartBeanInfo,- PMITableBeanInfo,- PMITabStripBeanInfo,- PMITextAreaBeanInfo,- PMITextFieldBeanInfo,- PMIThermometerBeanInfo,- PMITimerBeanInfo,- PMIToggleButtonBeanInfo,- PMITrackSegmentBeanInfo,- PMITreeViewBeanInfo,- PMIWeekViewBeanInfo,- RadarChart2BeanInfo,- RadarChartBeanInfo,- ReportPanelBeanInfo,- ReportViewerBeanInfo,- RosterManagementPanelBeanInfo,- RowSelectorTreeBeanInfo,- ScheduleManagementPanelBeanInfo,- SFCMonitoringPanelBeanInfo,- ShapeGroupBeanInfo,- SparklineChartBeanInfo,- TagBrowseTreeBeanInfo,- TemplateCanvasBeanInfo,- TemplateHolderBeanInfo,- TemplateRepeaterBeanInfo,- UserManagementPanelBeanInfo,- VisionAdvancedTableBeanInfo,- VisionTemplateBeanInfo
initProperties() and DefaultBeanInfo.getIcon(int). You may also override initEventSets().- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringUse this as a key on your bean descriptor whose value is your customizer's VALUE_NAME to make double-clicking on your bean open up that customizer.static final StringUse this as a key on your bean descriptor whose value is an instance of DoubleClickHandler, and that double-click handler will be called on double-clicks of instances of this beanstatic final StringUse this as a key on your bean descriptor whose value is an instance of DoubleClickHandler, and that edit-click will be called when your bean is edit-clicked.static final StringUse this key on your bean descriptor if you want to add custom actions to the right-click menu of your component.static final StringThis key is used on the bean descriptor to hold a List<ComponentRestriction> that are compatible with this bean type.static final Stringstatic final StringThe class that should be instantiated as a custom translation term finder.Fields inherited from class com.inductiveautomation.vision.api.designer.beans.DefaultBeanInfobeanClass, BOUND_MASK, CATEGORY_KEY, CONSTRAINED_MASK, DISPLAY_ORDER_KEY, EXPERT_MASK, HIDDEN_MASK, log, NO_MASK, NOT_BINDABLE_KEY, NOT_BINDABLE_MASK, NOT_TRANSLATABLE_KEY, NOT_TRANSLATABLE_MASK, PREFERRED_MASK, PREFFERED_MASK, TRANSIENT_KEY, TRANSIENT_MASKFields inherited from interface java.beans.BeanInfoICON_COLOR_16x16, ICON_COLOR_32x32, ICON_MONO_16x16, ICON_MONO_32x32
- 
Constructor SummaryConstructorsConstructorDescriptionUse this constructor for components with no customizersCommonBeanInfo(Class c, CustomizerDescriptor... custDesc) Use this constructor if your component uses customizers.CommonBeanInfo(Class c, Class customizer) Deprecated.
- 
Method SummaryModifier and TypeMethodDescriptionprotected voidAdds the cursorCode property with correct enum translation, with no special flagsprotected voidaddCursorCode(int flags) protected voidAdds the dataQuality property using BOUND_MASK | EXPERT_MASKprotected static voidCall this in toinitEventSets()add focus events to your component.static voidAdds focus and key eventsstatic voidAdds propertyChange, mouse, and mouseMotion events sets.protected static voidaddKeyEvents(DefaultBeanInfo info) Call this in toinitEventSets()add key events to your component.protected voidAdds the rotation propertyprotected voidAdds rotation propertyprotected voidSubclasses should override this to add custom mappings to the default tag drop handler.protected TagDropHandlerCreates the tag drop handler to be installed for this component.protected voidinitComponentRestrictions(List<ComponentRestriction> restrictions) Adds appropriate restrictions based on the bean's attributes.protected voidCalled to add the event sets that this component will fire and should be handled by user scripting.protected voidCommonBeanInfo adds common properties, such as: preferredSize (hidden, for serialization) bounds (hidden, for serialization) name componentEnabled if the component is an EnabledEx visible border toolTipText font foreground background opaqueprotected voidCalled during construction to install a SQLTags drop handler for this component.Methods inherited from class com.inductiveautomation.vision.api.designer.beans.DefaultBeanInfoaddBoundProp, addBoundProp, addEnumProp, addEnumProp, addEnumProp, addEnumProp, addEventSet, addEventSet, addEventSet, addEventSet, addMethod, addMethod, addMethod, addProp, addProp, addProp, addProp, addProp, addTransientProp, addTransientProp, addTransientProp, createProp, createProp, createProp, findProperty, getBeanDescriptor, getEventSetDescriptors, getIcon, getIconPath, getIconPrefix, getIconResource, getMethodDescriptors, getPropertyDescriptors, initDesc, initMethods, removeProp, setBackgroundProperty, setBackgroundProperty, setFlags, setFlags, setForegroundProperty, setForegroundProperty, toStringMethods inherited from class java.beans.SimpleBeanInfogetAdditionalBeanInfo, getDefaultEventIndex, getDefaultPropertyIndex, loadImage
- 
Field Details- 
TAG_DROP_HANDLER_KEY- See Also:
 
- 
DOUBLE_CLICK_CUSTOMIZER_KEYUse this as a key on your bean descriptor whose value is your customizer's VALUE_NAME to make double-clicking on your bean open up that customizer.- See Also:
 
- 
DOUBLE_CLICK_HANDLERUse this as a key on your bean descriptor whose value is an instance of DoubleClickHandler, and that double-click handler will be called on double-clicks of instances of this bean- See Also:
 
- 
EDIT_CLICK_HANDLERUse this as a key on your bean descriptor whose value is an instance of DoubleClickHandler, and that edit-click will be called when your bean is edit-clicked. An edit-click is a click on an already selected component.- See Also:
 
- 
RIGHT_CLICK_HANDLERUse this key on your bean descriptor if you want to add custom actions to the right-click menu of your component. The value should be an instance of ComponentPopupInitializer.- See Also:
 
- 
SECURITY_RESTRICTIONSThis key is used on the bean descriptor to hold a List<ComponentRestriction> that are compatible with this bean type. CommonBeanInfo will automatically add the following:- A VisibilityRestriction to any bean that exposes its visible property.
- An EnabledRestriction to any bean that is a --something or other for new enabled stuff--
- An OverlayRestriction to any bean that is a QualityMonitor.
 - See Also:
 
- 
TERM_FINDER_CLASSThe class that should be instantiated as a custom translation term finder. If not set, a standard component finder will be used.- See Also:
 
- 
CAT_COMMON- See Also:
 
- 
CAT_APPEARANCE- See Also:
 
- 
CAT_POSITION- See Also:
 
- 
CAT_BEHAVIOR- See Also:
 
- 
CAT_DATA- See Also:
 
- 
CAT_LAYOUT- See Also:
 
- 
CAT_DEPRECATED- See Also:
 
 
- 
- 
Constructor Details- 
CommonBeanInfoUse this constructor for components with no customizers
- 
CommonBeanInfoDeprecated.
- 
CommonBeanInfoUse this constructor if your component uses customizers. Common customizers have static descriptors available. For example, your subclass might call this constructor as follows if it has dynamic properties and styles:super(MyComponent.class, new CustomizerDescriptor[] { DynamicPropertyProviderCustomizer.VALUE_DESCRIPTOR, StyleCustomizer.VALUE_DESCRIPTOR });
 
- 
- 
Method Details- 
installTagDropHandlerprotected void installTagDropHandler()Called during construction to install a SQLTags drop handler for this component. A SQLTags drop handler is stored as a property on the BeanDescriptor with the key "tagDropHandler", and must implement TagDropHandler. The default implementation of this function calls createTagDropHandler(). If that function returns a subclass ofDefaultTagDropHandler, then it will also callconfigureTagDropHandler(DefaultTagDropHandler). If you override this function, then both createTagDropHandler() and configureTagDropHandler() will not be used.Typically you won't override this function. Most implementations will override configureTagDropHandler(DefaultTagDropHandler)to simply set-up the default tag drop handler for the component.
- 
createTagDropHandlerCreates the tag drop handler to be installed for this component. Default implementation creates aDefaultTagDropHandler
- 
configureTagDropHandlerSubclasses should override this to add custom mappings to the default tag drop handler. By default the only mapping installed is to bind the component's toolTipText property to the tag's Tooltip property. Example. Suppose your component has an integer property named "myValue " and when a SQLTag was dropped on your component you want to set up a tag binding for "myValue" to the sqltag's value. You'd configure the tag drop handler like this: handler.addBinding(TagProp.Value, "myValue"); 
- 
initComponentRestrictionsAdds appropriate restrictions based on the bean's attributes.- See Also:
 
- 
initPropertiesCommonBeanInfo adds common properties, such as: - preferredSize (hidden, for serialization)
- bounds (hidden, for serialization)
- name
- componentEnabled if the component is an EnabledEx
- visible
- border
- toolTipText
- font
- foreground
- background
- opaque
 It is typical to override this function and then call super(). If you want to hide some of these functions, call removeProp with their names. After that you can add your own properties. Remember, only properties you add here will be serialized on your component. All properties must have proper getter/setter functions. If you need a property to be serialized but not shown, use the HIDDEN_MASK. If you want to expose a read-only bound property, use HIDDEN_MASK | BOUND_MASK. - Overrides:
- initPropertiesin class- DefaultBeanInfo
- Throws:
- IntrospectionException
- See Also:
 
- 
addCursorCodeAdds the cursorCode property with correct enum translation, with no special flags- Throws:
- IntrospectionException
 
- 
addCursorCode- Throws:
- IntrospectionException
 
- 
addDataQualityAdds the dataQuality property using BOUND_MASK | EXPERT_MASK- Throws:
- IntrospectionException
 
- 
addRotationAdds the rotation property
- 
addVisualPropsAdds rotation property
- 
initEventSetsCalled to add the event sets that this component will fire and should be handled by user scripting. By default this implementation adds common JComponent events scuh as propertyChange, mouse, and mouseMotion To add a new eventSet, call DefaultBeanInfo.addEventSet(Class, String, Class, String)or one of its overloads.- Overrides:
- initEventSetsin class- DefaultBeanInfo
- Throws:
- IntrospectionException
 
- 
addJComponentEventSetsAdds propertyChange, mouse, and mouseMotion events sets. This is automatically called by the default implementation ofinitEventSets()- Throws:
- IntrospectionException
 
- 
addInputEventSetsAdds focus and key events- Throws:
- IntrospectionException
 
- 
addFocusEventsCall this in toinitEventSets()add focus events to your component.- Throws:
- IntrospectionException
 
- 
addKeyEventsCall this in toinitEventSets()add key events to your component.- Throws:
- IntrospectionException
 
 
-