Class XViewerWidget
- java.lang.Object
-
- org.eclipse.nebula.widgets.xviewer.util.internal.XViewerWidget
-
- Direct Known Subclasses:
XViewerTextWidget
public abstract class XViewerWidget extends java.lang.ObjectAbstract class for all widgets used in Wizards and Editors
-
-
Field Summary
Fields Modifier and Type Field Description protected booleandisplayLabelprotected booleaneditableprotected booleanfillHorizontallyprotected booleanfillVerticallyprotected java.lang.Stringlabelprotected org.eclipse.swt.widgets.LabellabelWidgetprivate java.util.Set<XViewerWidgetModifiedListener>modifiedListenersprivate org.eclipse.swt.events.MouseListenermouseLabelListenerprotected intreportTypeprotected booleanrequiredEntrystatic intRPT_MULTI_LINEDisplay "label:\n data\n\n"static intRPT_NONEDisplay "label: data"static intRPT_SINGLE_LINEDisplay "label: data\n\n" Default of AAtributeprotected org.eclipse.ui.forms.widgets.FormToolkittoolkitprotected java.lang.StringtoolTipprotected booleanverticalLabelprotected java.lang.StringxmlRootprotected java.lang.StringxmlSubRoot
-
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
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidadaptControls(org.eclipse.ui.forms.widgets.FormToolkit toolkit)voidaddXModifiedListener(XViewerWidgetModifiedListener listener)abstract voidcreateWidgets(org.eclipse.swt.widgets.Composite parent, int horizontalSpan)Create Widgets used to display label and entry for wizards and editorsvoidcreateWidgets(org.eclipse.ui.forms.widgets.FormToolkit toolkit, org.eclipse.swt.widgets.Composite parent, int horizontalSpan)abstract voiddispose()Create Widgets used to display label and entry for wizards and editorsabstract org.eclipse.swt.widgets.ControlgetControl()abstract java.lang.ObjectgetData()java.util.List<java.lang.String>getDisplayLabels()java.lang.StringgetLabel()org.eclipse.swt.widgets.LabelgetLabelWidget()abstract java.lang.StringgetReportData()Return data for display in Report (without label) NOTE: There should be no newlines at end of StringintgetReportType()java.lang.StringgetToolTip()abstract java.lang.StringgetXmlData()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: toXmljava.lang.StringgetXmlRoot()java.lang.StringgetXmlSubRoot()booleanisDisplayLabel()booleanisEditable()booleanisFillHorizontally()booleanisFillVertically()booleanisRequiredEntry()abstract booleanisValid()Return true if entry is validbooleanisVerticalLabel()voidnotifyXModifiedListeners()voidopenHelp()abstract voidrefresh()Refresh the entry widgetvoidsetDisplayLabel(boolean displayLabel)If set, label will be displayed with entry widget.voidsetDisplayLabel(java.lang.String displayLabel)voidsetEditable(boolean editable)voidsetFillHorizontally(boolean fillHorizontally)voidsetFillVertically(boolean fillVertically)abstract voidsetFocus()Set focus to the entry widgetvoidsetFromXml(java.lang.String xml)voidsetLabel(java.lang.String label)voidsetLabelError()voidsetLabelWidget(org.eclipse.swt.widgets.Label labelWidget)voidsetReportType(int reportType)voidsetRequiredEntry(boolean requiredEntry)voidsetToolTip(java.lang.String toolTip)voidsetVerticalLabel(boolean verticalLabel)abstract voidsetXmlData(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.voidsetXmlRoot(java.lang.String xmlRoot)voidsetXmlSubRoot(java.lang.String xmlSubRoot)abstract java.lang.StringtoHTML(java.lang.String labelFont)java.lang.StringtoReport()java.lang.StringtoReport(int rptType)RPT_NONE (label: data), RPT_SINGLE_LINE (label: data\n\n), RPT_MULTI_LINE (label:\n data\n\n)java.lang.StringtoString()java.lang.StringtoXml()java.lang.StringtoXml(java.lang.String xmlRoot)java.lang.StringtoXml(java.lang.String xmlRoot, java.lang.String xmlSubRoot)
-
-
-
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
-
modifiedListeners
private final java.util.Set<XViewerWidgetModifiedListener> modifiedListeners
-
mouseLabelListener
private org.eclipse.swt.events.MouseListener mouseLabelListener
-
RPT_NONE
public static final int RPT_NONE
Display "label: data"- See Also:
- Constant Field Values
-
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
-
-
Method Detail
-
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:
toStringin classjava.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()
-
-