Class PanelEditor

    • Field Detail

      • ID

        public static final java.lang.String ID
        The Part ID.
    • Constructor Detail

      • PanelEditor

        public PanelEditor()
        The Eclipse constructor.
    • Method Detail

      • checkClearInternalBrowserCache

        public static boolean checkClearInternalBrowserCache​(org.eclipse.jface.preference.IPreferenceStore store,
                                                             boolean force)
        Checks if clearing the browser cache is required due to a new iiziGo Build or a compression settings.
        store - The preference store.
        force - For clearing flag.
        true if cache was cleared, false otherwise.
      • clearInternalBrowserCache

        public static final boolean clearInternalBrowserCache​(java.lang.String msg)
        Clears the internal browser cache (IE under Windows).
        msg - Message to log in case of success.
        true if cleared, false otherwise.
      • initEditor

        protected void initEditor​(PropCnr cnr)
                           throws org.eclipse.ui.PartInitException
        The initialize editor method.

        Subclasses may override this method.

        initEditor in class PropEditorPart
        cnr - The property container being edited. Note: the real name of the property is in the parent FilePropCnr Atom.
        org.eclipse.ui.PartInitException - For initialization failures.
      • saveStateImpl

        protected void saveStateImpl​(org.eclipse.ui.IMemento memento)
        Saves the state.
        saveStateImpl in class PropEditorPart
        memento - The storage area for object's state.
      • getEditedPanel

        public UIPanelBase getEditedPanel()
        Gets the edited panel.
      • dispose

        public void dispose()
        Disposes of the Panel Editor.
        Specified by:
        dispose in interface org.eclipse.ui.IWorkbenchPart
        dispose in class PropEditorPart
      • onUpdateStates

        protected void onUpdateStates()
        Called just in the beginning of updateStates() before selections are processed. Override as required.
        onUpdateStates in class PropEditorPart
      • onSetFocus

        public void onSetFocus()
        Asks this part to take focus within the workbench. Parts must assign focus to one of the controls contained in the part's parent composite.
        onSetFocus in class PropEditorPart
      • usePasteBeforeAfter

        protected boolean usePasteBeforeAfter()
        Processing of paste before/after is enabled.
        usePasteBeforeAfter in class PropEditorPart
        true to handle before/after.
      • supportsCopyReference

        protected boolean supportsCopyReference()
        Returns if the Copy reference should be present or not.
        supportsCopyReference in class PropEditorPart
        false indicates no such item should be present, true for maybe, depending on selection.
      • supportsCopyFullPath

        protected boolean supportsCopyFullPath()
        Returns if the Copy path should be present or not.
        supportsCopyFullPath in class PropEditorPart
        false indicates no such item should be present, true for maybe, depending on selection.
      • performCopyReference

        protected boolean performCopyReference​(boolean doPerform)
        Copies the reference.
        performCopyReference in class PropEditorPart
        doPerform - Flag to perform the action or just testing it.
        true for action enabled, false for disabled.
      • performCopyFullPath

        protected boolean performCopyFullPath​(boolean doPerform)
        Copies the full path.
        performCopyFullPath in class PropEditorPart
        doPerform - Flag to perform the action or just testing it.
        true for action enabled, false for disabled.
      • onEditedPropertyChangedForVerify

        protected void onEditedPropertyChangedForVerify​(GEvent event)
        Called when verification listener gets called for verify, very commonly in a non-SWT thread. This method does nothing by default and can be overridden to process the edited property container changes events.
        onEditedPropertyChangedForVerify in class PropEditorPart
      • onFolderSettingsChanged

        public void onFolderSettingsChanged()
        Called when the folder settings are changed. This may result in a change of themes.
      • getThemes

        public java.lang.String getThemes()
        Gets the theme information for the current editor used for the image preview. Currently this consists of the desktop and mobile themes separated by commas.
        Specified by:
        getThemes in interface IPreviewThemeProvider
        String consisting of the themes separated by commas, empty string means no theme (e.g. no mobile theme).
      • setDevice

        public void setDevice​(GSimpleDevice dev)
        Sets the device to use in the panel editor without undo functionality.
        dev - The device to use.
      • waitForClientSideEditor

        public void waitForClientSideEditor()
        Checks if the browser is internal, and if so waits for the ClientSideEditor to start. This operation should be done outside of the main UI thread. If the panel editor is external, no waiting is done. The maximum time to wait is 20 seconds.
      • setFitNow

        public void setFitNow()
        Sets the fit-now zoom level.
      • getDropMode

        public int getDropMode()
        Gets the current drop mode:
        • 0 = Horizontal insert,
        • 1 = Vertical insert,
        • 2 = Horizontal overwrite,
        • 3 = Horizontal overwrite wrapping,
        • 4 = Vertically overwrite.
      • createEditorComposite

        protected void createEditorComposite​(org.eclipse.swt.widgets.Composite parent)
        Creates the Editor Main Composite.
        Specified by:
        createEditorComposite in class PropEditorPart
        parent - The empty parent composite without initialized layout, with the widget background color.
      • setIncludeStyles

        public void setIncludeStyles​(boolean on)
        Enables or disables viewing of styles.
      • areStylesIncluded

        public boolean areStylesIncluded()
        Returns if styles are displayed or not.
      • getTreeViewer

        public FilteredCommonViewer getTreeViewer()
        Returns the tree viewer for the panel editor.
      • selectionChangedEx

        protected void selectionChangedEx​(org.eclipse.jface.viewers.SelectionChangedEvent event)
        Selection changes in the tree.
        selectionChangedEx in class PropEditorPart
      • getMarkedComponents

        public java.util.ArrayList<DesignerProp> getMarkedComponents()
        Gets the selection of marks for drag-drop.
      • doOpen

        public boolean doOpen​(GProp<?>[] props)
        Opens the property by selecting it in focus.
        doOpen in class PropEditorPart
      • doOpen

        public boolean doOpen​(GProp<?> prop,
                              int index,
                              java.lang.String childName)
        Opens the property by selecting it in focus.
        doOpen in class PropEditorPart
        prop - The property to focus.
        index - The index in a multi-property.
        childName - Name of child property or null.
        true for success, false for failure.
      • performInsertRow

        public boolean performInsertRow​(boolean isAfter,
                                        boolean useComponentSelection,
                                        boolean doit)
        Inserts a row before or after.
      • performInsertColumn

        public boolean performInsertColumn​(boolean isAfter,
                                           boolean useComponentSelection,
                                           boolean doit)
        Inserts a column before or after.
      • performDeleteRow

        public boolean performDeleteRow​(boolean useComponentSelection,
                                        boolean doit)
        Delete row.
      • performDeleteColumn

        public boolean performDeleteColumn​(boolean useComponentSelection,
                                           boolean doit)
        Delete column.
      • performClearCells

        public boolean performClearCells​(boolean useComponentSelection,
                                         boolean doit)
        Clears cells in a grid.
      • doFlash

        public static void doFlash​(org.eclipse.swt.widgets.Composite composite,
                                   UIComp uiComp)
        Performs flashing of a component in all open editors.
      • setTreeSelection

        public boolean setTreeSelection​(GProp<?> prop)
        Sets the tree selection to the property in question. The first DesignerProp instance found is used.

        Note that this must be called from the SWT thread.

        prop - The property to select.
        true For success, false for failure.
      • getVirtualSpace

        public EditorVirtualSpace getVirtualSpace()
        Gets the VirtualSpace of the edited panel. If not yet assigned, a question will be asked to create a new VirtualSpace or assign an existing VirtualSpace.
        The VirtualSpace, or null for none (user canceled operation).
      • getCurrentLanguageCode

        public java.lang.String getCurrentLanguageCode()
        Gets the current language code.
        The language code, or null for default.