public class TestPlanVisualDisplay
extends org.eclipse.swt.custom.CTabFolder
Constructor and Description |
---|
TestPlanVisualDisplay(org.eclipse.swt.widgets.Composite parent,
java.util.Map<java.lang.String,ClifDeployDefinition> testPlan,
org.eclipse.ui.forms.IManagedForm managedForm,
org.eclipse.ui.IEditorInput editorInput,
int style,
org.eclipse.jface.viewers.ISelectionChangedListener selectionChangedListener,
org.eclipse.swt.events.MouseListener checkListener,
boolean withCheck,
boolean withState)
Create a tab folder that display in tab each blade sort by class.
|
Modifier and Type | Method and Description |
---|---|
java.util.Map<java.lang.String,ClifDeployDefinition> |
addBlade()
Add an injector or a probe in the opened tab (with the right blade class).
|
void |
createTabByClass()
Create one tab by blade class.
|
void |
deselectAll()
If withCheck, deselect all blades in every tabs.
|
java.util.List<java.lang.String> |
getCheckedBlades() |
java.lang.String |
getSelectedBlade()
Return id of the selected blade
|
java.util.Map<java.lang.String,ClifDeployDefinition> |
getTestPlan()
Get test plan
|
BladeState |
globalState()
Return the global state of all selected blades.
|
void |
initBladeStates()
Init blade state to UNDEPLOYED state.
|
boolean |
isTestPlanCorrect()
Test if args are correct
|
boolean |
isWithCheck()
Return true if check box is diplayed in the first column.
|
boolean |
isWithState()
Return true if state column is diplayed as the last column.
|
java.util.Map<java.lang.String,ClifDeployDefinition> |
modifyBlade(java.lang.String bladeId,
java.lang.String newBladeId,
java.lang.String serverName,
java.lang.String bClass,
java.lang.String argument,
java.lang.String comment,
boolean isProbe)
Modify the specified blade with these new properties.
|
void |
refresh()
Refresh all table viewer in each tabs.
|
java.util.Map<java.lang.String,ClifDeployDefinition> |
removeAllBlades()
Remove all blades in the test plan.
|
void |
removeAllTab()
Remove all tabs.
|
java.util.Map<java.lang.String,ClifDeployDefinition> |
removeSelectedBlade()
Remove the selected blade in the opened tab.
|
void |
selectAll()
If withCheck, select all blades in every tabs.
|
java.lang.String[] |
selectedTestPlan()
Return a new test plan with the selected blades.
Return all test plan if not with ckeck. |
void |
setBladeState(java.lang.String id,
BladeState state)
Modify the state of the id blade.
|
void |
setSelection(java.lang.String bladeId,
boolean removeSelectListener)
Select the right blade in table.
|
void |
setTestPlan(java.util.Map<java.lang.String,ClifDeployDefinition> testPlan)
Set test plan
|
addCTabFolder2Listener, addCTabFolderListener, addSelectionListener, computeTrim, getBorderVisible, getClientArea, getItem, getItem, getItemCount, getItems, getMaximized, getMaximizeVisible, getMinimized, getMinimizeVisible, getMinimumCharacters, getMRUVisible, getSelection, getSelectionBackground, getSelectionForeground, getSelectionIndex, getSimple, getSingle, getStyle, getTabHeight, getTabPosition, getTopRight, getUnselectedCloseVisible, getUnselectedImageVisible, indexOf, removeCTabFolder2Listener, removeCTabFolderListener, removeSelectionListener, setBackground, setBorderVisible, setFont, setForeground, setInsertMark, setInsertMark, setLayout, setMaximized, setMaximizeVisible, setMinimized, setMinimizeVisible, setMinimumCharacters, setMRUVisible, setSelection, setSelection, setSelectionBackground, setSelectionBackground, setSelectionBackground, setSelectionBackground, setSelectionForeground, setSimple, setSingle, setTabHeight, setTabPosition, setTopRight, setTopRight, setUnselectedCloseVisible, setUnselectedImageVisible, showItem, showSelection
changed, checkSubclass, computeSize, getBackgroundMode, getChildren, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, setBackgroundMode, setFocus, setLayoutDeferred, setTabList
getBorderWidth, getHorizontalBar, getVerticalBar
addControlListener, addDragDetectListener, addFocusListener, addHelpListener, addKeyListener, addMenuDetectListener, addMouseListener, addMouseMoveListener, addMouseTrackListener, addMouseWheelListener, addPaintListener, addTraverseListener, computeSize, dragDetect, dragDetect, forceFocus, getAccessible, getBackground, getBackgroundImage, getBounds, getCursor, getDragDetect, getEnabled, getFont, getForeground, getLayoutData, getLocation, getMenu, getMonitor, getParent, getShell, getSize, getToolTipText, getVisible, internal_dispose_GC, internal_new_GC, isEnabled, isFocusControl, isReparentable, isVisible, moveAbove, moveBelow, pack, pack, redraw, redraw, removeControlListener, removeDragDetectListener, removeFocusListener, removeHelpListener, removeKeyListener, removeMenuDetectListener, removeMouseListener, removeMouseMoveListener, removeMouseTrackListener, removeMouseWheelListener, removePaintListener, removeTraverseListener, setBackgroundImage, setBounds, setBounds, setCapture, setCursor, setDragDetect, setEnabled, setLayoutData, setLocation, setLocation, setMenu, setParent, setRedraw, setSize, setSize, setToolTipText, setVisible, toControl, toControl, toDisplay, toDisplay, traverse, update
public TestPlanVisualDisplay(org.eclipse.swt.widgets.Composite parent, java.util.Map<java.lang.String,ClifDeployDefinition> testPlan, org.eclipse.ui.forms.IManagedForm managedForm, org.eclipse.ui.IEditorInput editorInput, int style, org.eclipse.jface.viewers.ISelectionChangedListener selectionChangedListener, org.eclipse.swt.events.MouseListener checkListener, boolean withCheck, boolean withState)
parent
- the composite parenttestPlan
- the display test planmanagedForm
- the managed formeditorInput
- the editor inputstyle
- the tab folde styleselectionChangedListener
- default listener for all table viewer (can be null)checkListener
- listener used when check box are modifiedwithCheck
- true if check box is diplayed in the first columnwithState
- true if state column is diplayed as the last columnpublic void createTabByClass()
public void removeAllTab()
public boolean isWithCheck()
public boolean isWithState()
public void refresh()
public void selectAll()
public void deselectAll()
public java.lang.String[] selectedTestPlan()
public java.lang.String getSelectedBlade()
public java.util.List<java.lang.String> getCheckedBlades()
public void setSelection(java.lang.String bladeId, boolean removeSelectListener)
bladeId
- blade's id to selectremoveSelectListener
- true if a selectlistener has been assigned
to this blade in viewer needed to avoid recurrent setSelectionpublic void initBladeStates()
public void setBladeState(java.lang.String id, BladeState state)
id
- the id bladestate
- the new statepublic BladeState globalState()
public java.util.Map<java.lang.String,ClifDeployDefinition> addBlade()
public java.util.Map<java.lang.String,ClifDeployDefinition> modifyBlade(java.lang.String bladeId, java.lang.String newBladeId, java.lang.String serverName, java.lang.String bClass, java.lang.String argument, java.lang.String comment, boolean isProbe) throws ExistingBladeIdException, BadBladePropertiesException
bladeId
- id of the modify bladenewBladeId
- new blade id (can be the same as bladeId)serverName
- the CLIF server namebClass
- the blade class (not empty)argument
- the blade definition argumentcomment
- the blade definition commentisProbe
- true if probe, else injectorExistingBladeIdException
- if new blade id already existsBadBladePropertiesException
- if id, role or class are not definedpublic java.util.Map<java.lang.String,ClifDeployDefinition> removeSelectedBlade()
public java.util.Map<java.lang.String,ClifDeployDefinition> removeAllBlades()
public java.util.Map<java.lang.String,ClifDeployDefinition> getTestPlan()
public void setTestPlan(java.util.Map<java.lang.String,ClifDeployDefinition> testPlan)
testPlan
- The testPlan to set.public boolean isTestPlanCorrect()