/** {@inheritDoc} */ public String getText(Object element) { if (element instanceof AbstractParamValueController) { AbstractParamValueController controller = (AbstractParamValueController) element; return String.valueOf(controller.getProperty()); } return super.getText(element); }
/** {@inheritDoc} */ public Color getForeground(Object element) { if (element instanceof AbstractParamValueController) { AbstractParamValueController controller = (AbstractParamValueController) element; IParamNodePO paramNode = controller.getParamNode(); if (paramNode.getReferencedDataCube() != null) { return LayoutUtil.GRAY_COLOR; } } return null; }
/** {@inheritDoc} */ public Image getImage(Object element) { if (element instanceof AbstractParamValueController) { AbstractParamValueController controller = (AbstractParamValueController) element; IParamNodePO paramNode = controller.getParamNode(); if (controller.getPropertySource().isReadOnly()) { return IconConstants.READ_ONLY_IMAGE; } if (StringUtils.isNotEmpty(paramNode.getDataFile())) { return IconConstants.EXCEL_DATA_IMAGE; } String property = controller.getProperty(); if (StringConstants.EMPTY.equals(property)) { return m_missingDataImage; } if (paramNode.getReferencedDataCube() != null) { return IconConstants.TDC_IMAGE; } ParamValueConverter conv = new GuiParamValueConverter( property, paramNode, controller.getParamDesc(), new NullValidator()); if (conv.containsReferences()) { if (paramNode.getParentNode() instanceof ITestSuitePO) { return m_missingDataImage; } return IconConstants.REF_VALUE_IMAGE; } else if (paramNode instanceof IExecTestCasePO) { IExecTestCasePO exTc = (IExecTestCasePO) paramNode; if (exTc.getHasReferencedTD()) { return IconConstants.ORIGINAL_DATA_IMAGE; } return IconConstants.OVERWRITTEN_DATA_IMAGE; } return null; } return super.getImage(element); }