Class XViewerTextWidget


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

    • sText

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

      protected java.lang.String text
  • Constructor Details

    • 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 Details

    • setEnabled

      public void setEnabled​(boolean enabled)
    • setSize

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

      public void setHeight​(int height)
    • toString

      public java.lang.String toString()
      toString in class XViewerWidget
    • 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)
    • getText

      public java.lang.String getText()
      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
    • setFocus

      public void setFocus()
      Description copied from class: XViewerWidget
      Set focus to the entry widget
      Specified by:
      setFocus in class XViewerWidget
    • setEditable

      public void setEditable​(boolean editable)
      setEditable in class XViewerWidget
    • setMaxTextLimit

      public void setMaxTextLimit​(int limit)
      Set max character limit on text field
      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()
    • setRequiredEntry

      public void setRequiredEntry​(boolean requiredEntry)
      setRequiredEntry in class XViewerWidget
    • requiredEntry

      public boolean requiredEntry()
    • addModifyListener

      public void addModifyListener​( 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()
      toXml in class XViewerWidget
    • toXml

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

      public java.lang.String toXml​(java.lang.String xmlRoot, java.lang.String xmlSubRoot)
      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
    • setFromXml

      public void setFromXml​(java.lang.String xml)
      setFromXml in class XViewerWidget
    • getInt

      public int getInt()
    • updateTextWidget

      protected void updateTextWidget()
    • set

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

      public void set​(XViewerTextWidget text)
    • append

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

      public void refresh()
      Description copied from class: XViewerWidget
      Refresh the entry widget
      Specified by:
      refresh in class XViewerWidget
    • 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
      Return boolean validity indication.
    • getData

      public java.lang.Object getData()
      Specified by:
      getData in class XViewerWidget
    • getStyledText

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

      public getFont()
      the font
    • setFont

      public void setFont​( font)
      font - the font to set