Class TextTableEditor

    • Field Detail


        public static final java.lang.Class<?>[] TEXT_TABLE_CLASSES
        Text table classes.
      • ID

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

      • TextTableEditor

        public TextTableEditor()
        Eclipse constructor.
    • Method Detail

      • 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.
      • dispose

        public void dispose()
        Disposes of editor.
        Specified by:
        dispose in interface org.eclipse.ui.IWorkbenchPart
        dispose in class PropEditorPart
      • getEditedTextTable

        public EditorTextTable getEditedTextTable​(int column)
        Gets the edited text table at specified column index.
      • onUpdateStates

        protected void onUpdateStates()
        Called just in the beginning of updateStates() before selections are processed. Override as required.
        onUpdateStates in class PropEditorPart
      • 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.
      • validateTextID

        public static java.lang.String validateTextID​(java.lang.String id)
        Validates the Text ID.
        error message, null for OK.
      • 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.
      • doOpen

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

        public java.lang.String getHTTPServer()
        Gets the HTTP Server string prefix including port.
        Specified by:
        getHTTPServer in interface IKStringInfoProvider
        The "HTTP[S]//server[:port]" String or null for none.
      • getImageTarget

        public IImageTarget getImageTarget​(java.lang.String ref)
        Gets the image reference.
        Specified by:
        getImageTarget in interface IKStringInfoProvider
        ref - The image definition reference string.
        The image found, or null if not found.
      • doAddReference

        public boolean doAddReference()
        Gets the flag for adding the reference string in an attribute when editing the KString.
        Specified by:
        doAddReference in interface IKStringInfoProvider
        true for the Designer (will add additional parameters for the rich text editor), false for normal processing.
      • shouldResolve

        public boolean shouldResolve()
        Flag indicating the "real" resolved string should be returned. This value is true for the runtime client when in "real run mode".
        Specified by:
        shouldResolve in interface IKStringInfoProvider
        true to resolve all references, false if inside e.g. the Designer.
      • getResolveReferenceProperty

        public GProp<?> getResolveReferenceProperty()
        Gets the property used for references look-up's.
        Specified by:
        getResolveReferenceProperty in interface IKStringInfoProvider
        The property to use for reference property look-up.
      • getDPR

        public double getDPR()
        Gets the device pixel ratio.
        Specified by:
        getDPR in interface IKStringInfoProvider
        The device pixel ratio, default 1.0.
      • getTargetLanguageCode

        public java.lang.String getTargetLanguageCode()
        Gets the language code to use.
        Specified by:
        getTargetLanguageCode in interface IKStringInfoProvider
        The language code, or null for default.
      • getResourcePrefix

        public java.lang.String getResourcePrefix()
        Gets the base reference name for the resource, typically an image, for the Server or the Designer. This reference is "/$" (the default in this interface) for the Designer, but should be "/$APPID/" for the Server, where APPID is the application being run by the client. The Server must therefore implement this method and return that string instead.
        Specified by:
        getResourcePrefix in interface IKStringInfoProvider
        The resource prefix string, "/$" by default, but "/$APPID/" for the Server,' where APPID is the application being run by the client.
      • installFont

        public boolean installFont​(java.lang.String fontFamily)
        Installs the font families as specified by the font family.
        Specified by:
        installFont in interface IKStringInfoProvider
        fontFamily - The font family or families.
        true for success, false if the remote part doesn't support installation, e.g. in a preview browser.
      • installFonts

        public boolean installFonts​(java.util.List<FontFiles> fontList)
        Installs the font face as specified by the FontFiles instance for the Client Session. Once installed, the font family can be used.
        Specified by:
        installFonts in interface IKStringInfoProvider
        fontList - The list of font files to install.
        true for success, false if the remote part doesn't support installation, e.g. in a preview browser.
      • onFilter

        public void onFilter​(java.lang.String text)
        Called when a filter text has been applied.
        Specified by:
        onFilter in interface IFilterListener
        text - The filter text to apply, null for none (never empty string).
      • onEvent

        public void onEvent​(GEvent event)
        Called to process an event.
        Specified by:
        onEvent in interface EventListener
        event - The event.
      • doubleClick

        public void doubleClick​(org.eclipse.jface.viewers.DoubleClickEvent event)
        Notifies of a double click in table.
        Specified by:
        doubleClick in interface org.eclipse.jface.viewers.IDoubleClickListener
        event - event object describing the double-click
      • openInParallel

        public boolean openInParallel​(java.lang.String ref)
        Opens a text table in parallel.
        ref - The reference.
        true for success, false for failure.
      • onFileClosed

        protected void onFileClosed​(FilePropCnr fpc)
        Called when an open file in the editor has been closed and needs to be removed. This is called in the SWT thread. This call is not done for the main file of this editor, but secondary files. For the main file, the editor is closed directory.

        Subclasses with multiple files override this method.

        onFileClosed in class PropEditorPart
        fpc - The file closed.
      • isSelectionEnablerProcessingEnabled

        public boolean isSelectionEnablerProcessingEnabled​(SelectionEnabler se)
        Checks if the processing is active.
        Specified by:
        isSelectionEnablerProcessingEnabled in interface ISelectionEnablerHandler
        se - The selection enabler instance that should be updated.
        The processing enabled flag: true = processed, false = process as default.
      • isReturningSelectionBeforeOperation

        public boolean isReturningSelectionBeforeOperation()
        Checks if this interface returns the selection before the operation takes place or not.
        Specified by:
        isReturningSelectionBeforeOperation in interface IComplexOperationSelection
        false, must be overridden to return the selection before.
      • onKStringPropChanged

        public static void onKStringPropChanged​(EditorTextTable tt,
                                                KStringProp ksp)
        Called when a text has changed and perhaps needs automatic translation to other tables. It is assumed that the "ksp" property is valid and is owned by "tt".
        tt - The text table.
        ksp - The property.