Class XViewerTextWidget


  • public class XViewerTextWidget
    extends XViewerWidget
    Generic label and text field object for use by single entry artifact attributes
    • Field Detail

      • sText

        protected org.eclipse.swt.custom.StyledText sText
      • parent

        private org.eclipse.swt.widgets.Composite parent
      • text

        protected java.lang.String text
      • maxTextChars

        private int maxTextChars
      • width

        private int width
      • height

        private int height
      • font

        private org.eclipse.swt.graphics.Font font
    • Constructor Detail

      • XViewerTextWidget

        public XViewerTextWidget()
      • XViewerTextWidget

        public XViewerTextWidget​(java.lang.String displayLabel)
      • XViewerTextWidget

        public XViewerTextWidget​(java.lang.String displayLabel,
                                 java.lang.String xmlRoot)
      • XViewerTextWidget

        public XViewerTextWidget​(java.lang.String displayLabel,
                                 java.lang.String xmlRoot,
                                 java.lang.String xmlSubRoot)
    • Method Detail

      • setEnabled

        public void setEnabled​(boolean enabled)
      • setSize

        public void setSize​(int width,
                            int height)
      • setHeight

        public void setHeight​(int height)
      • getControl

        public org.eclipse.swt.widgets.Control getControl()
        Specified by:
        getControl in class XViewerWidget
      • createWidgets

        public void createWidgets​(org.eclipse.swt.widgets.Composite parent,
                                  int horizontalSpan)
        Create Text Widgets. Widgets Created: Label: "text entry" horizonatalSpan takes up 2 columns; horizontalSpan must be >=2
        Specified by:
        createWidgets in class XViewerWidget
      • createWidgets

        public void createWidgets​(org.eclipse.swt.widgets.Composite parent,
                                  int horizontalSpan,
                                  boolean fillText)
      • addModificationListener

        private void addModificationListener()
      • createLabelWidget

        private void createLabelWidget​(org.eclipse.swt.widgets.Composite composite)
      • createComposite

        private org.eclipse.swt.widgets.Composite createComposite​(org.eclipse.swt.widgets.Composite parent,
                                                                  int horizontalSpan)
      • getText

        public java.lang.String getText()
        Returns:
        text including xml tags replaced for references
      • setText

        public void setText​(java.lang.String text)
      • getDefaultMenu

        public org.eclipse.swt.widgets.Menu getDefaultMenu()
      • dispose

        public void dispose()
        Description copied from class: XViewerWidget
        Create Widgets used to display label and entry for wizards and editors
        Specified by:
        dispose in class XViewerWidget
      • setMaxTextLimit

        public void setMaxTextLimit​(int limit)
        Set max character limit on text field
        Parameters:
        limit - - if 0, then limit is 999, else sets to limit
      • forceFocus

        public void forceFocus()
      • isInteger

        public boolean isInteger()
      • isFloat

        public boolean isFloat()
      • getInteger

        public int getInteger()
      • getFloat

        public double getFloat()
      • requiredEntry

        public boolean requiredEntry()
      • addModifyListener

        public void addModifyListener​(org.eclipse.swt.events.ModifyListener modifyListener)
      • get

        public java.lang.String get()
      • getXmlData

        public java.lang.String getXmlData()
        Description copied from class: XViewerWidget
        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
        Specified by:
        getXmlData in class XViewerWidget
      • toXml

        public java.lang.String toXml​(java.lang.String xmlRoot)
        Overrides:
        toXml in class XViewerWidget
      • toXml

        public java.lang.String toXml​(java.lang.String xmlRoot,
                                      java.lang.String xmlSubRoot)
        Overrides:
        toXml in class XViewerWidget
      • setXmlData

        public void setXmlData​(java.lang.String str)
        Description copied from class: XViewerWidget
        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
        Specified by:
        setXmlData in class XViewerWidget
      • getInt

        public int getInt()
      • updateTextWidget

        protected void updateTextWidget()
      • set

        public void set​(java.lang.String text)
      • append

        public void append​(java.lang.String text)
      • getReportData

        public java.lang.String getReportData()
        Description copied from class: XViewerWidget
        Return data for display in Report (without label) NOTE: There should be no newlines at end of String
        Specified by:
        getReportData in class XViewerWidget
      • toHTML

        public java.lang.String toHTML​(java.lang.String labelFont,
                                       boolean newLineText)
      • toHTML

        public java.lang.String toHTML​(java.lang.String labelFont)
        Specified by:
        toHTML in class XViewerWidget
      • isValid

        public boolean isValid()
        Description copied from class: XViewerWidget
        Return true if entry is valid
        Specified by:
        isValid in class XViewerWidget
        Returns:
        Return boolean validity indication.
      • getStyledText

        public org.eclipse.swt.custom.StyledText getStyledText()
        Returns:
        the sText
      • getFont

        public org.eclipse.swt.graphics.Font getFont()
        Returns:
        the font
      • setFont

        public void setFont​(org.eclipse.swt.graphics.Font font)
        Parameters:
        font - the font to set