|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sysord.mad.widget.AbstractSpecificWidget
com.sysord.mad.ui.swt.widget.AbstractSWTWidget
public abstract class AbstractSWTWidget
XXX Comment role class
Field Summary | |
---|---|
protected static int |
GRAY
|
protected static int |
NAVIGATION_COLOR
|
protected static int |
PALE_RED
|
protected com.sysord.mad.widget.SpecificContextHolder |
specificContextHolder
|
protected static int |
WHITE
|
Fields inherited from class com.sysord.mad.widget.AbstractSpecificWidget |
---|
ID |
Constructor Summary | |
---|---|
AbstractSWTWidget()
|
Method Summary | ||
---|---|---|
protected void |
addCommandsButtons(org.eclipse.swt.widgets.Composite container,
org.eclipse.ui.forms.widgets.FormToolkit toolkit,
com.sysord.mad.widget.Widget<?> widget,
org.eclipse.swt.widgets.Control control)
Add the command buttons for the specified MAD widget. |
|
protected void |
addControlDisposedListener(com.sysord.mad.widget.Widget<?> madWidget,
org.eclipse.swt.widgets.Control swtWidget)
Adds the disposed listeners to the MAD widget and its corresponding SWT widget. |
|
protected void |
addFlexibleCommandsButtons(org.eclipse.swt.widgets.Composite container,
org.eclipse.ui.forms.widgets.FormToolkit toolkit,
com.sysord.mad.widget.FlexibleWidget<?> widget)
Add the command buttons for the specified MAD widget. |
|
protected void |
addVisibilityListener(com.sysord.mad.widget.Widget<?> madWidget,
org.eclipse.swt.widgets.Control swtWidget)
Adds the visibility listeners to he MAD widget and its corresponding SWT widget. |
|
protected
|
castWidget(com.sysord.mad.widget.Widget<?> widget)
Casts the given widget into the needed type. |
|
protected abstract void |
checkMadWidget(com.sysord.mad.widget.Widget<?> widget)
Checks the widget type and raises an exception if the type is not valid for this specific widget. |
|
protected void |
createCommandButton(org.eclipse.swt.widgets.Composite container,
org.eclipse.ui.forms.widgets.FormToolkit toolkit,
com.sysord.mad.widget.Widget<?> widget,
com.sysord.mad.configuration.CommandDefinition command)
Creates an SWT button in the specified container and add a mouseUp listener
executing the command commandId contained in the given widget . |
|
protected abstract org.eclipse.swt.widgets.Control |
createSpecificWidget(com.sysord.mad.widget.Widget<?> madWidget)
Creates the SWT widget. |
|
java.lang.Object |
createWidget(com.sysord.mad.widget.SpecificContextHolder specificContextHolder,
com.sysord.mad.widget.Widget<?> madWidget)
|
|
protected SWTSpecificWidgetContext |
getSwtContext()
|
|
protected java.util.List<com.sysord.mad.configuration.CommandDefinition> |
getUsedCommands(com.sysord.mad.widget.Widget<?> widget)
|
|
protected void |
refreshView()
|
Methods inherited from class com.sysord.mad.widget.AbstractSpecificWidget |
---|
candidatesToElementList, createLabelColumn, createSelection, createSelection, getFormatExprEvaluationService, getId, getInjector, getLogger, getMao, getValidationService, getViewBuilder, setId, toCandidateElement, toCandidateList, validate, widgetValueEqualsCandidate |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final int NAVIGATION_COLOR
protected static final int GRAY
protected static final int PALE_RED
protected static final int WHITE
protected com.sysord.mad.widget.SpecificContextHolder specificContextHolder
Constructor Detail |
---|
public AbstractSWTWidget()
Method Detail |
---|
protected SWTSpecificWidgetContext getSwtContext()
public java.lang.Object createWidget(com.sysord.mad.widget.SpecificContextHolder specificContextHolder, com.sysord.mad.widget.Widget<?> madWidget)
protected void addControlDisposedListener(com.sysord.mad.widget.Widget<?> madWidget, org.eclipse.swt.widgets.Control swtWidget)
madWidget
- swtWidget
- protected void addVisibilityListener(com.sysord.mad.widget.Widget<?> madWidget, org.eclipse.swt.widgets.Control swtWidget)
madWidget
- swtWidget
- protected abstract org.eclipse.swt.widgets.Control createSpecificWidget(com.sysord.mad.widget.Widget<?> madWidget)
This method is called after #checkMadWidget()
, the widget can be casted
with
madWidget
-
protected abstract void checkMadWidget(com.sysord.mad.widget.Widget<?> widget)
java.lang.IllegalStateException
- if the widget is of an incorrect type.protected <T extends com.sysord.mad.widget.Widget<?>> T castWidget(com.sysord.mad.widget.Widget<?> widget)
widget
-
protected java.util.List<com.sysord.mad.configuration.CommandDefinition> getUsedCommands(com.sysord.mad.widget.Widget<?> widget)
protected void addCommandsButtons(org.eclipse.swt.widgets.Composite container, org.eclipse.ui.forms.widgets.FormToolkit toolkit, com.sysord.mad.widget.Widget<?> widget, org.eclipse.swt.widgets.Control control)
container
- widget
- control
- protected void addFlexibleCommandsButtons(org.eclipse.swt.widgets.Composite container, org.eclipse.ui.forms.widgets.FormToolkit toolkit, com.sysord.mad.widget.FlexibleWidget<?> widget)
container
- widget
- control
- protected void createCommandButton(org.eclipse.swt.widgets.Composite container, org.eclipse.ui.forms.widgets.FormToolkit toolkit, com.sysord.mad.widget.Widget<?> widget, com.sysord.mad.configuration.CommandDefinition command)
container
and add a mouseUp listener
executing the command commandId
contained in the given widget
.
container
- The SWT button container.widget
- The widget containing the command.commandID
- The ID of the command to execute.commandLabel
- The label to set on the button.protected void refreshView()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |