Class XViewerWidget

java.lang.Object
org.eclipse.nebula.widgets.xviewer.util.internal.XViewerWidget
Direct Known Subclasses:
XViewerTextWidget

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

    Fields 
    Modifier and Type Field Description
    protected boolean displayLabel  
    protected boolean editable  
    protected boolean fillHorizontally  
    protected boolean fillVertically  
    protected java.lang.String label  
    protected org.eclipse.swt.widgets.Label labelWidget  
    protected int reportType  
    protected boolean requiredEntry  
    static int RPT_MULTI_LINE
    Display "label:\n data\n\n"
    static int RPT_NONE
    Display "label: data"
    static int RPT_SINGLE_LINE
    Display "label: data\n\n" Default of AAtribute
    protected org.eclipse.ui.forms.widgets.FormToolkit toolkit  
    protected java.lang.String toolTip  
    protected boolean verticalLabel  
    protected java.lang.String xmlRoot  
    protected java.lang.String xmlSubRoot  
  • Constructor Summary

    Constructors 
    Constructor Description
    XViewerWidget​(java.lang.String label)  
    XViewerWidget​(java.lang.String label, java.lang.String xmlRoot)  
    XViewerWidget​(java.lang.String label, java.lang.String xmlRoot, java.lang.String xmlSubRoot)  
  • Method Summary

    Modifier and Type Method Description
    void adaptControls​(org.eclipse.ui.forms.widgets.FormToolkit toolkit)  
    void addXModifiedListener​(XViewerWidgetModifiedListener listener)  
    abstract void createWidgets​(org.eclipse.swt.widgets.Composite parent, int horizontalSpan)
    Create Widgets used to display label and entry for wizards and editors
    void createWidgets​(org.eclipse.ui.forms.widgets.FormToolkit toolkit, org.eclipse.swt.widgets.Composite parent, int horizontalSpan)  
    abstract void dispose()
    Create Widgets used to display label and entry for wizards and editors
    abstract org.eclipse.swt.widgets.Control getControl()  
    abstract java.lang.Object getData()  
    java.util.List<java.lang.String> getDisplayLabels()  
    java.lang.String getLabel()  
    org.eclipse.swt.widgets.Label getLabelWidget()  
    abstract java.lang.String getReportData()
    Return data for display in Report (without label) NOTE: There should be no newlines at end of String
    int getReportType()  
    java.lang.String getToolTip()  
    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
    java.lang.String getXmlRoot()  
    java.lang.String getXmlSubRoot()  
    boolean isDisplayLabel()  
    boolean isEditable()  
    boolean isFillHorizontally()  
    boolean isFillVertically()  
    boolean isRequiredEntry()  
    abstract boolean isValid()
    Return true if entry is valid
    boolean isVerticalLabel()  
    void notifyXModifiedListeners()  
    void openHelp()  
    abstract void refresh()
    Refresh the entry widget
    void setDisplayLabel​(boolean displayLabel)
    If set, label will be displayed with entry widget.
    void setDisplayLabel​(java.lang.String displayLabel)  
    void setEditable​(boolean editable)  
    void setFillHorizontally​(boolean fillHorizontally)  
    void setFillVertically​(boolean fillVertically)  
    abstract void setFocus()
    Set focus to the entry widget
    void setFromXml​(java.lang.String xml)  
    void setLabel​(java.lang.String label)  
    void setLabelError()  
    void setLabelWidget​(org.eclipse.swt.widgets.Label labelWidget)  
    void setReportType​(int reportType)  
    void setRequiredEntry​(boolean requiredEntry)  
    void setToolTip​(java.lang.String toolTip)  
    void setVerticalLabel​(boolean verticalLabel)  
    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.
    void setXmlRoot​(java.lang.String xmlRoot)  
    void setXmlSubRoot​(java.lang.String xmlSubRoot)  
    abstract java.lang.String toHTML​(java.lang.String labelFont)  
    java.lang.String toReport()  
    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)
    java.lang.String toString()  
    java.lang.String toXml()  
    java.lang.String toXml​(java.lang.String xmlRoot)  
    java.lang.String toXml​(java.lang.String xmlRoot, java.lang.String xmlSubRoot)  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

  • Constructor Details

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

    • isFillHorizontally

      public boolean isFillHorizontally()
    • setToolTip

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

      public void addXModifiedListener​(XViewerWidgetModifiedListener listener)
    • 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()