org.eclipse.hyades.test.ui.internal.editor.form.base
Class SharedPartWithButtons
java.lang.Object
org.eclipse.hyades.test.ui.internal.editor.form.base.SharedPart
org.eclipse.hyades.test.ui.internal.editor.form.base.SharedPartWithButtons
- Direct Known Subclasses:
- StructuredViewerPart
public abstract class SharedPartWithButtons
- extends SharedPart
|
Method Summary |
void |
addButton(java.lang.String buttonLabel,
java.lang.String buttonToolTip,
int index)
This method gives the user the ability to add buttons to the Test
Case form at a particular index. |
protected abstract void |
buttonSelected(org.eclipse.swt.widgets.Button button,
int index)
|
protected org.eclipse.swt.widgets.Button |
createButton(org.eclipse.swt.widgets.Composite parent,
java.lang.String label,
int index,
org.eclipse.ui.forms.widgets.FormToolkit factory)
|
protected org.eclipse.swt.widgets.Button |
createButton(org.eclipse.swt.widgets.Composite parent,
java.lang.String label,
int index,
FormWidgetFactory factory)
|
protected org.eclipse.swt.layout.GridLayout |
createButtonsLayout()
|
void |
createControl(org.eclipse.swt.widgets.Composite parent,
int style,
int span,
org.eclipse.ui.forms.widgets.FormToolkit toolkit)
|
void |
createControl(org.eclipse.swt.widgets.Composite parent,
int style,
int span,
FormWidgetFactory factory)
|
protected abstract void |
createMainControl(org.eclipse.swt.widgets.Composite parent,
int style,
int span,
org.eclipse.ui.forms.widgets.FormToolkit factory)
|
protected abstract void |
createMainControl(org.eclipse.swt.widgets.Composite parent,
int style,
int span,
FormWidgetFactory factory)
|
protected void |
createMainLabel(org.eclipse.swt.widgets.Composite parent,
int span,
org.eclipse.ui.forms.widgets.FormToolkit factory)
Needs to be over-written by clients |
protected void |
createMainLabel(org.eclipse.swt.widgets.Composite parent,
int span,
FormWidgetFactory factory)
|
org.eclipse.swt.widgets.Button |
getButton(int index)
|
java.lang.String |
getButtonLabel(int index)
|
int |
getButtonLength()
|
org.eclipse.swt.widgets.Menu |
getButtonMenu(int index)
|
int |
getStandardButtonLength()
|
void |
setButtonEnabled(int index,
boolean enabled)
|
protected void |
updateEnabledState()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SharedPartWithButtons
public SharedPartWithButtons(java.lang.String[] buttonLabels)
SharedPartWithButtons
public SharedPartWithButtons(java.lang.String[] buttonLabels,
java.lang.String[] toolTips)
setButtonEnabled
public void setButtonEnabled(int index,
boolean enabled)
getButtonLabel
public java.lang.String getButtonLabel(int index)
getButtonMenu
public org.eclipse.swt.widgets.Menu getButtonMenu(int index)
getButton
public org.eclipse.swt.widgets.Button getButton(int index)
createMainControl
protected abstract void createMainControl(org.eclipse.swt.widgets.Composite parent,
int style,
int span,
FormWidgetFactory factory)
createMainControl
protected abstract void createMainControl(org.eclipse.swt.widgets.Composite parent,
int style,
int span,
org.eclipse.ui.forms.widgets.FormToolkit factory)
buttonSelected
protected abstract void buttonSelected(org.eclipse.swt.widgets.Button button,
int index)
createControl
public void createControl(org.eclipse.swt.widgets.Composite parent,
int style,
int span,
FormWidgetFactory factory)
- Specified by:
createControl in class SharedPart
createControl
public void createControl(org.eclipse.swt.widgets.Composite parent,
int style,
int span,
org.eclipse.ui.forms.widgets.FormToolkit toolkit)
addButton
public void addButton(java.lang.String buttonLabel,
java.lang.String buttonToolTip,
int index)
- This method gives the user the ability to add buttons to the Test
Case form at a particular index.
Pre-conditions:
- index must be greater or equalled to zero. If the index is less than zero,
then it is set to zero and if it's greater than the total number of buttons, then
it is set to the last entry.
- Parameters:
buttonLable - The label of the buttonbuttonToolTip - The button's tooltip (can be null)index - The index at which it will be inserted.
createButtonsLayout
protected org.eclipse.swt.layout.GridLayout createButtonsLayout()
createButton
protected org.eclipse.swt.widgets.Button createButton(org.eclipse.swt.widgets.Composite parent,
java.lang.String label,
int index,
FormWidgetFactory factory)
createButton
protected org.eclipse.swt.widgets.Button createButton(org.eclipse.swt.widgets.Composite parent,
java.lang.String label,
int index,
org.eclipse.ui.forms.widgets.FormToolkit factory)
updateEnabledState
protected void updateEnabledState()
- Overrides:
updateEnabledState in class SharedPart
createMainLabel
protected void createMainLabel(org.eclipse.swt.widgets.Composite parent,
int span,
FormWidgetFactory factory)
createMainLabel
protected void createMainLabel(org.eclipse.swt.widgets.Composite parent,
int span,
org.eclipse.ui.forms.widgets.FormToolkit factory)
- Needs to be over-written by clients
getButtonLength
public int getButtonLength()
getStandardButtonLength
public int getStandardButtonLength()