Class XViewerWidget

  • Direct Known Subclasses:
    XViewerTextWidget

    public abstract class XViewerWidget
    extends java.lang.Object
    Abstract class for all widgets used in Wizards and Editors
    • Field Detail

      • labelWidget

        protected org.eclipse.swt.widgets.Label labelWidget
      • label

        protected java.lang.String label
      • xmlRoot

        protected java.lang.String xmlRoot
      • xmlSubRoot

        protected java.lang.String xmlSubRoot
      • toolTip

        protected java.lang.String toolTip
      • requiredEntry

        protected boolean requiredEntry
      • editable

        protected boolean editable
      • verticalLabel

        protected boolean verticalLabel
      • fillVertically

        protected boolean fillVertically
      • fillHorizontally

        protected boolean fillHorizontally
      • displayLabel

        protected boolean displayLabel
      • mouseLabelListener

        private org.eclipse.swt.events.MouseListener mouseLabelListener
      • RPT_SINGLE_LINE

        public static final int RPT_SINGLE_LINE
        Display "label: data\n\n" Default of AAtribute
        See Also:
        Constant Field Values
      • RPT_MULTI_LINE

        public static final int RPT_MULTI_LINE
        Display "label:\n data\n\n"
        See Also:
        Constant Field Values
      • reportType

        protected int reportType
      • toolkit

        protected org.eclipse.ui.forms.widgets.FormToolkit toolkit
    • Constructor Detail

      • XViewerWidget

        public XViewerWidget​(java.lang.String label)
      • XViewerWidget

        public XViewerWidget​(java.lang.String label,
                             java.lang.String xmlRoot)
      • XViewerWidget

        public XViewerWidget​(java.lang.String label,
                             java.lang.String xmlRoot,
                             java.lang.String xmlSubRoot)
    • Method Detail

      • isFillHorizontally

        public boolean isFillHorizontally()
      • setToolTip

        public void setToolTip​(java.lang.String toolTip)
      • notifyXModifiedListeners

        public void notifyXModifiedListeners()
      • setLabelError

        public void setLabelError()
      • getControl

        public abstract org.eclipse.swt.widgets.Control getControl()
      • openHelp

        public void openHelp()
      • createWidgets

        public abstract void createWidgets​(org.eclipse.swt.widgets.Composite parent,
                                           int horizontalSpan)
        Create Widgets used to display label and entry for wizards and editors
      • createWidgets

        public void createWidgets​(org.eclipse.ui.forms.widgets.FormToolkit toolkit,
                                  org.eclipse.swt.widgets.Composite parent,
                                  int horizontalSpan)
      • adaptControls

        public void adaptControls​(org.eclipse.ui.forms.widgets.FormToolkit toolkit)
      • dispose

        public abstract void dispose()
        Create Widgets used to display label and entry for wizards and editors
      • setFocus

        public abstract void setFocus()
        Set focus to the entry widget
      • refresh

        public abstract void refresh()
        Refresh the entry widget
      • isValid

        public abstract boolean isValid()
        Return true if entry is valid
        Returns:
        Return boolean validity indication.
      • setXmlData

        public abstract void setXmlData​(java.lang.String str)
        Called with string found between xml tags Used by setFromXml() String will be sent through AXml.xmlToText() before being sent to setXmlData implementation. Used by: setFromXml
      • getXmlData

        public abstract java.lang.String getXmlData()
        Return string to save off between xml tags Used by call to toXml() String returned will be sent through AXml.textToXml() before being saved Used by: toXml
      • toHTML

        public abstract java.lang.String toHTML​(java.lang.String labelFont)
      • toXml

        public java.lang.String toXml()
                               throws java.lang.Exception
        Throws:
        java.lang.Exception
      • toXml

        public java.lang.String toXml​(java.lang.String xmlRoot)
                               throws java.lang.Exception
        Throws:
        java.lang.Exception
      • toXml

        public java.lang.String toXml​(java.lang.String xmlRoot,
                                      java.lang.String xmlSubRoot)
                               throws java.lang.Exception
        Throws:
        java.lang.Exception
      • setFromXml

        public void setFromXml​(java.lang.String xml)
                        throws java.lang.IllegalStateException
        Throws:
        java.lang.IllegalStateException
      • getDisplayLabels

        public java.util.List<java.lang.String> getDisplayLabels()
      • setDisplayLabel

        public void setDisplayLabel​(java.lang.String displayLabel)
      • isEditable

        public boolean isEditable()
      • setEditable

        public void setEditable​(boolean editable)
      • isVerticalLabel

        public boolean isVerticalLabel()
      • setVerticalLabel

        public void setVerticalLabel​(boolean verticalLabel)
      • getXmlRoot

        public java.lang.String getXmlRoot()
      • setXmlRoot

        public void setXmlRoot​(java.lang.String xmlRoot)
      • getXmlSubRoot

        public java.lang.String getXmlSubRoot()
      • setXmlSubRoot

        public void setXmlSubRoot​(java.lang.String xmlSubRoot)
      • getToolTip

        public java.lang.String getToolTip()
      • isFillVertically

        public boolean isFillVertically()
      • setFillVertically

        public void setFillVertically​(boolean fillVertically)
      • getLabel

        public java.lang.String getLabel()
      • setLabel

        public void setLabel​(java.lang.String label)
      • getLabelWidget

        public org.eclipse.swt.widgets.Label getLabelWidget()
      • setLabelWidget

        public void setLabelWidget​(org.eclipse.swt.widgets.Label labelWidget)
      • isRequiredEntry

        public boolean isRequiredEntry()
      • setRequiredEntry

        public void setRequiredEntry​(boolean requiredEntry)
      • getReportType

        public int getReportType()
      • setReportType

        public void setReportType​(int reportType)
      • getReportData

        public abstract java.lang.String getReportData()
        Return data for display in Report (without label) NOTE: There should be no newlines at end of String
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • toReport

        public java.lang.String toReport()
      • toReport

        public java.lang.String toReport​(int rptType)
        RPT_NONE (label: data), RPT_SINGLE_LINE (label: data\n\n), RPT_MULTI_LINE (label:\n data\n\n)
      • setDisplayLabel

        public void setDisplayLabel​(boolean displayLabel)
        If set, label will be displayed with entry widget.
      • setFillHorizontally

        public void setFillHorizontally​(boolean fillHorizontally)
      • getData

        public abstract java.lang.Object getData()
      • isDisplayLabel

        public boolean isDisplayLabel()