public class VisionDesignerImpl extends AbstractDesignerModuleHook implements VisionDesignerInterface
DesignerModuleHook
and
VisionDesignerInterface
. Most of the heavy lifting is actually done in the WindowWorkspace
class.Modifier and Type | Class and Description |
---|---|
class |
VisionDesignerImpl.Handler |
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
MODULE_ID |
VISION_MODULE_ID
Constructor and Description |
---|
VisionDesignerImpl() |
Modifier and Type | Method and Description |
---|---|
void |
addExtensibleBindingType(BindingType binding)
Adds a new binding type to be used in the extensible binding system
|
long |
addNewTemplate(java.util.UUID parentFolder,
int width,
int height,
ProjectScope scope) |
long |
addNewTemplate(java.util.UUID parentFolder,
VisionTemplate template,
ProjectScope scope) |
long |
addNewWindow(java.util.UUID parentFolder,
FPMIWindow newWindow)
Adds a new window to the
FHMIApp being designed |
long |
addNewWindow(java.util.UUID parentFolder,
int width,
int height)
Adds a new popup window to the
FPMIApp being designed |
boolean |
addWindow(java.util.UUID parent,
WindowInfo wi)
Directly adds a window.
|
void |
addWindowDropHandler(WindowDropHandler handler)
Add a new drop handler for custom drop types onto windows and templates
|
void |
addWindowListener(VisionWindowListener listener)
Adds a listener to be notified when windows are opened and closed.
|
java.awt.Component |
cloneComponent(java.awt.Component comp) |
boolean |
configureBinding(java.awt.Component component,
java.lang.String property,
BindingConfiguration configuration)
Configures a new property binding for the component.property using the given configuration.
|
void |
configureDeserializer(XMLDeserializer deserializer) |
void |
configureSerializer(XMLSerializer s)
Provides the module a chance to add serialization delegates to the serializer custom for classes that might be
encountered when serializing objects provided by this module
|
BindingType |
getBindingType(java.lang.String bindingTypeKey) |
ClientScriptEditor |
getClientEventScriptEditor() |
DesignerPrefs |
getCurrentPrefs() |
DesignerContext |
getDesignerContext() |
java.util.Collection<BindingType> |
getExtensibleBindings() |
java.util.List<com.jidesoft.docking.DockableFrame> |
getFrames()
A list of DockableFrames that this module provides, that should be available to all workspaces.
|
WindowUtilities |
getGuiUtil() |
WindowUtilities |
getGuiUtil(java.lang.String desktopHandle)
Gets the WindowUtilities for a secondary desktop, by handle
|
VisionDesignerImpl.Handler |
getHandler() |
MenuBarMerge |
getModuleMenu()
Returns a menu merge for any global menu additions.
|
java.util.List<com.jidesoft.action.CommandBar> |
getModuleToolbars()
Returns the toolbars for the module.
|
NavUtilities |
getNavUtil()
Gets the NavUtilities (for the primary desktop
|
NavUtilities |
getNavUtil(java.lang.String desktopHandle)
Gets the NavUtilities for a secondary desktop, by handle
|
PaletteImpl |
getPalette() |
Project |
getProject() |
java.lang.String |
getResourceCategoryKey(Project project,
ProjectResource resource)
Used by modules that add project resources to an Ignition project.
|
java.lang.String |
getResourceDisplayName(Project project,
ProjectResource resource)
Allows a module to give an appropriate display name for the resource.
|
javax.swing.Icon |
getResourceIcon(Project project,
ProjectResource resource)
Allows a module to give an appropriate icon for a resource.
|
FPMIApp |
getRoot() |
WindowFolderNode |
getRootFolderNode() |
java.util.UUID |
getSelectedTemplateFolder() |
java.util.UUID |
getSelectedWindowFolder()
Returns the id of the currently selected window folder in the project browser tree.
|
java.util.List<WindowDropHandler> |
getWindowDropHandlers() |
WindowWorkspace |
getWorkspace() |
protected void |
initSearchProviders() |
long |
newDockedWindow(java.util.UUID parentFolder) |
long |
newMainWindow(java.util.UUID folder) |
long |
newPopupWindow(java.util.UUID parentFolder) |
void |
notifyActivationStateChanged(LicenseState licenseState)
Notifies this designer module that it's license state has changed.
|
void |
notifyDesignableContainerClosed(long id) |
void |
notifyProjectSaveDone()
Notifies the module that the save operation has finished.
|
void |
notifyProjectSaveStart(SaveContext save)
Notifies the module that the user has requested that the project is saved.
|
void |
openBindingDialog(java.awt.Component component,
java.lang.String propertyName)
Opens the binding dialog for a given component.
|
void |
removeWindowListener(VisionWindowListener listiner)
Removes window listener
|
byte[] |
serializeProjectResource(java.lang.Object obj)
Serializes an object to be stored in a ProjectResource.
|
void |
setContext(DesignerContext context) |
void |
setWorkspace(WindowWorkspace workspace) |
void |
shutdown()
Called when the module is shut down.
|
void |
startup(DesignerContext designerContext,
LicenseState activationState)
The main entrypoint for the module hook.
|
configureFunctionFactory, initializeScriptManager
public static final java.lang.String MODULE_ID
public void startup(DesignerContext designerContext, LicenseState activationState) throws java.lang.Exception
DesignerModuleHook
DesignerModuleHook.shutdown()
will be called and a new hook will be instantiatedstartup
in interface DesignerModuleHook
startup
in class AbstractDesignerModuleHook
java.lang.Exception
- if the module was not able to be initialized for the given project.public void shutdown()
DesignerModuleHook
shutdown
in interface DesignerModuleHook
shutdown
in class AbstractDesignerModuleHook
public void addWindowDropHandler(WindowDropHandler handler)
VisionDesignerInterface
addWindowDropHandler
in interface VisionDesignerInterface
public java.util.List<WindowDropHandler> getWindowDropHandlers()
public java.lang.String getResourceCategoryKey(Project project, ProjectResource resource)
DesignerModuleHook
Used by modules that add project resources to an Ignition project. This will be called when the exporter is displaying all of the resources inside a project for export. Only project resources that match this module's ID will passed to this function.
Used by the import/export system.
getResourceCategoryKey
in interface DesignerModuleHook
getResourceCategoryKey
in class AbstractDesignerModuleHook
resource
- A project resource that was added by this module.public java.lang.String getResourceDisplayName(Project project, ProjectResource resource)
DesignerModuleHook
Allows a module to give an appropriate display name for the resource. For most resources this won't be necessary (the resource's name itself should be used), but for some resources whose name is null, this may be appropriate.
Used by the import/export system.
getResourceDisplayName
in interface DesignerModuleHook
getResourceDisplayName
in class AbstractDesignerModuleHook
public javax.swing.Icon getResourceIcon(Project project, ProjectResource resource)
DesignerModuleHook
Allows a module to give an appropriate icon for a resource.
Used by the import/export system.
getResourceIcon
in interface DesignerModuleHook
getResourceIcon
in class AbstractDesignerModuleHook
public MenuBarMerge getModuleMenu()
DesignerModuleHook
getModuleMenu
in interface DesignerModuleHook
getModuleMenu
in class AbstractDesignerModuleHook
JMenuMerge
public java.util.List<com.jidesoft.action.CommandBar> getModuleToolbars()
DesignerModuleHook
getModuleToolbars
in interface DesignerModuleHook
getModuleToolbars
in class AbstractDesignerModuleHook
public java.util.List<com.jidesoft.docking.DockableFrame> getFrames()
DesignerModuleHook
getFrames
in interface DesignerModuleHook
getFrames
in class AbstractDesignerModuleHook
public void notifyActivationStateChanged(LicenseState licenseState)
DesignerModuleHook
notifyActivationStateChanged
in interface DesignerModuleHook
notifyActivationStateChanged
in class AbstractDesignerModuleHook
public void addWindowListener(VisionWindowListener listener)
VisionClientInterface
addWindowListener
in interface VisionClientInterface
public void removeWindowListener(VisionWindowListener listiner)
VisionClientInterface
removeWindowListener
in interface VisionClientInterface
public void configureSerializer(XMLSerializer s)
DesignerModuleHook
configureSerializer
in interface DesignerModuleHook
configureSerializer
in class AbstractDesignerModuleHook
public void configureDeserializer(XMLDeserializer deserializer)
configureDeserializer
in interface DesignerModuleHook
configureDeserializer
in class AbstractDesignerModuleHook
public void notifyProjectSaveStart(SaveContext save)
DesignerModuleHook
notifyProjectSaveStart
in interface DesignerModuleHook
notifyProjectSaveStart
in class AbstractDesignerModuleHook
public void notifyProjectSaveDone()
DesignerModuleHook
notifyProjectSaveDone
in interface DesignerModuleHook
notifyProjectSaveDone
in class AbstractDesignerModuleHook
protected void initSearchProviders()
public void notifyDesignableContainerClosed(long id)
public void setContext(DesignerContext context)
public Project getProject()
public FPMIApp getRoot()
public VisionDesignerImpl.Handler getHandler()
public ClientScriptEditor getClientEventScriptEditor()
public long addNewTemplate(java.util.UUID parentFolder, int width, int height, ProjectScope scope)
public long addNewTemplate(java.util.UUID parentFolder, VisionTemplate template, ProjectScope scope)
public long newMainWindow(java.util.UUID folder)
public long newDockedWindow(java.util.UUID parentFolder)
public long newPopupWindow(java.util.UUID parentFolder)
public long addNewWindow(java.util.UUID parentFolder, FPMIWindow newWindow)
FHMIApp
being designedpublic boolean addWindow(java.util.UUID parent, WindowInfo wi)
parent
- wi
- public java.util.UUID getSelectedWindowFolder()
public java.util.UUID getSelectedTemplateFolder()
public WindowFolderNode getRootFolderNode()
public byte[] serializeProjectResource(java.lang.Object obj) throws SerializationException
obj
- SerializationException
public void addExtensibleBindingType(BindingType binding)
VisionClientInterface
addExtensibleBindingType
in interface VisionClientInterface
public BindingType getBindingType(java.lang.String bindingTypeKey)
getBindingType
in interface VisionClientInterface
public NavUtilities getNavUtil()
VisionClientInterface
getNavUtil
in interface VisionClientInterface
public NavUtilities getNavUtil(java.lang.String desktopHandle)
VisionClientInterface
getNavUtil
in interface VisionClientInterface
public WindowUtilities getGuiUtil()
getGuiUtil
in interface VisionClientInterface
public WindowUtilities getGuiUtil(java.lang.String desktopHandle)
VisionClientInterface
getGuiUtil
in interface VisionClientInterface
public java.util.Collection<BindingType> getExtensibleBindings()
public PaletteImpl getPalette()
getPalette
in interface VisionDesignerInterface
public long addNewWindow(java.util.UUID parentFolder, int width, int height)
FPMIApp
being designedaddNewWindow
in interface VisionDesignerInterface
public java.awt.Component cloneComponent(java.awt.Component comp)
cloneComponent
in interface VisionDesignerInterface
public DesignerPrefs getCurrentPrefs()
getCurrentPrefs
in interface VisionDesignerInterface
public WindowWorkspace getWorkspace()
getWorkspace
in interface VisionDesignerInterface
public void setWorkspace(WindowWorkspace workspace)
public DesignerContext getDesignerContext()
getDesignerContext
in interface VisionDesignerInterface
public void openBindingDialog(java.awt.Component component, java.lang.String propertyName) throws NotBindableException
VisionDesignerInterface
openBindingDialog
in interface VisionDesignerInterface
NotBindableException
public boolean configureBinding(java.awt.Component component, java.lang.String property, BindingConfiguration configuration) throws java.lang.Exception
VisionDesignerInterface
BindingConfiguration.getBindingType()
configureBinding
in interface VisionDesignerInterface
java.lang.Exception