public abstract class EsxComposite
extends Composite
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ID |
protected boolean |
isActive |
protected EsxEditorPart |
parentPart |
| Constructor and Description |
|---|
EsxComposite(Composite parent,
int style) |
EsxComposite(EsxEditorPart parentPart,
Composite parentComposite,
int style) |
| Modifier and Type | Method and Description |
|---|---|
protected Combo |
createGridData2ColumnComboInput(Composite parent,
java.lang.String title,
java.lang.String[] comboItems,
SelectionAdapter selectionAdapter) |
protected void |
createGridData2ColumnSpacer(Composite parent) |
protected Text |
createGridData2ColumnTextInput(Composite parent,
java.lang.String title,
SelectionAdapter selectionAdapter) |
protected Text |
createGridData2ColumnTextLabel(Composite parent,
java.lang.String title) |
protected Button |
createGridData4ColumnCheckButton(Composite parent,
java.lang.String title,
boolean setSelection) |
protected AdapterFactory |
getAdapterFactory() |
protected BasicCommandStack |
getCommandStack() |
protected int |
getCountInListWithValue(java.util.List<? extends EObject> list,
EStructuralFeature feature,
java.lang.Object value) |
EditingDomain |
getEditingDomain() |
protected java.util.List<? extends EObject> |
getListOfEObjectsWithinEObject(java.util.List<? extends EObject> list,
EStructuralFeature feature)
This is shorthand for calling
getListOfEObjectsWithinEObject(List, EStructuralFeature, int)
with a -1 for featureIndex. |
protected java.util.List<? extends EObject> |
getListOfEObjectsWithinEObject(java.util.List<? extends EObject> list,
EStructuralFeature feature,
int featureIndex) |
protected java.lang.String[] |
getLiteralStrings(Enumerator[] enumArray) |
protected java.lang.String[] |
getLiteralStrings(int startValue,
int length) |
protected java.lang.String |
getMultiNumberString(java.lang.String string,
int currentIndex,
int listSize,
int maxAppendStringLength)
This function is intended to be called from within a loop, passing
a different currentIndex each time.
|
protected java.lang.String |
getMultiString(java.util.List<? extends EObject> list,
EStructuralFeature featureOne,
int featureOneIndex,
EStructuralFeature featureTwo,
java.lang.String multiText) |
protected java.lang.String |
getMultiString(java.util.List<? extends EObject> list,
EStructuralFeature feature,
java.lang.String multiText)
This takes a list of EObjects and compares the given feature's toString() values.
|
protected java.lang.String |
getMultiString(java.util.List<? extends EObject> list,
EStructuralFeature feature,
java.lang.String multiText,
EStructuralFeature featureLabel)
This takes a list of EObjects and compares the given feature's toString() values.
|
protected java.lang.String |
getMultiStringPatternLabels(java.util.List<? extends EObject> list,
EStructuralFeature feature,
java.lang.String multiText) |
protected java.lang.String[] |
getPatternLabelStrings() |
abstract void |
refresh()
Refreshes this component with information freshly obtained from the component's model.
|
abstract void |
refreshInputs()
This method is similar to the refresh() method, but it should typically
only be called with setInput() is called.
|
protected void |
setFeatureForSelectedItems(java.util.List<? extends EObject> list,
EStructuralFeature feature,
java.lang.Object value,
boolean appendNumber,
int maxAppendStringLength) |
abstract void |
setInput(java.lang.Object input)
Sets the input to this component.
|
public static final java.lang.String ID
protected EsxEditorPart parentPart
protected boolean isActive
public EsxComposite(Composite parent,
int style)
parent - style - public EsxComposite(EsxEditorPart parentPart, Composite parentComposite, int style)
parentPart - parentComposite - style - public abstract void setInput(java.lang.Object input)
input - public abstract void refresh()
public abstract void refreshInputs()
public EditingDomain getEditingDomain()
protected BasicCommandStack getCommandStack()
protected AdapterFactory getAdapterFactory()
protected java.lang.String[] getPatternLabelStrings()
protected java.lang.String getMultiStringPatternLabels(java.util.List<? extends EObject> list,
EStructuralFeature feature,
java.lang.String multiText)
list - A list of EObjectsfeature - The feature to comparemultiText - The String to return if the given features toString() values don't matchprotected java.lang.String getMultiString(java.util.List<? extends EObject> list,
EStructuralFeature feature,
java.lang.String multiText)
list - A list of EObjectsfeature - The feature to comparemultiText - The String to return if the given features toString() values don't matchprotected java.lang.String getMultiString(java.util.List<? extends EObject> list,
EStructuralFeature featureOne,
int featureOneIndex,
EStructuralFeature featureTwo,
java.lang.String multiText)
list - A list of EObjectsfeatureOne - The main feature. Should be an Elist.featureOneIndex - The index of featureOne.featureTwo - Look in featureOne.get(featureOneIndex) for featureTwo.multiText - The String to return if the given features toString() values don't matchprotected java.lang.String getMultiString(java.util.List<? extends EObject> list,
EStructuralFeature feature,
java.lang.String multiText,
EStructuralFeature featureLabel)
list - A list of EObjectsfeature - The feature to comparemultiText - The String to return if the given features toString() values don't matchfeatureLabel - Can be null, or a "sub-feature" of feature.protected java.lang.String getMultiNumberString(java.lang.String string,
int currentIndex,
int listSize,
int maxAppendStringLength)
string - The string to append a number tocurrentIndex - The current index (the number appended will be currentIndex+1)listSize - The total size of the list you are appending numbers tomaxAppendStringLength - The maximum length of the string that is returnedprotected int getCountInListWithValue(java.util.List<? extends EObject> list,
EStructuralFeature feature,
java.lang.Object value)
list - A list of EObjectsfeature - The feature to comparevalue - The value to compareprotected void setFeatureForSelectedItems(java.util.List<? extends EObject> list,
EStructuralFeature feature,
java.lang.Object value,
boolean appendNumber,
int maxAppendStringLength)
list - A list of EObjectsfeature - The feature we will be settingvalue - The value we will be settingappendNumber - If true, then we will attempt to append a number to the end of value (value should be a string)maxAppendStringLength - Only used if appendNumber is true. This is the maxlength of the string we are trying to append toprotected java.util.List<? extends EObject> getListOfEObjectsWithinEObject(java.util.List<? extends EObject> list,
EStructuralFeature feature)
getListOfEObjectsWithinEObject(List, EStructuralFeature, int)
with a -1 for featureIndex.list - A list of EObjectsfeature - The feature to look for within each EObjectprotected java.util.List<? extends EObject> getListOfEObjectsWithinEObject(java.util.List<? extends EObject> list,
EStructuralFeature feature,
int featureIndex)
list - A list of EObjectsfeature - The feature to look for within each EObjectfeatureIndex - If this is specified, then the feature is an EList. This is the index of the feature.protected void createGridData2ColumnSpacer(Composite parent)
parent - protected Text createGridData2ColumnTextLabel(Composite parent,
java.lang.String title)
parent - title - protected Text createGridData2ColumnTextInput(Composite parent,
java.lang.String title,
SelectionAdapter selectionAdapter)
parent - title - selectionAdapter - protected Combo createGridData2ColumnComboInput(Composite parent,
java.lang.String title,
java.lang.String[] comboItems,
SelectionAdapter selectionAdapter)
parent - title - comboItems - selectionAdapter - protected Button createGridData4ColumnCheckButton(Composite parent,
java.lang.String title,
boolean setSelection)
parent - title - setSelection - protected java.lang.String[] getLiteralStrings(Enumerator[] enumArray)
enumArray - protected java.lang.String[] getLiteralStrings(int startValue,
int length)
startValue - The first value in our string array.length - Must be a postive value or else an error is thrown