private void updateUI(Trigger trigger) { if (trigger == null) { clear(); return; } cmbTriggerType.setText(trigger.getCondition().getName()); cmbActionType.setText(trigger.getAction().getType().getName()); switch (cmbActionType.getSelectionIndex()) { case 0: this.slValues.topControl = cmpURL; URLValue urlValue = (URLValue) trigger.getAction().getValue(); txtBaseURL.setText((urlValue.getBaseUrl().length() > 0) ? urlValue.getBaseUrl() : ""); txtTarget.setText((urlValue.getTarget().length() > 0) ? urlValue.getTarget() : ""); txtBaseParm.setText((urlValue.getBaseParameterName().length() > 0) ? urlValue.getBaseParameterName() : ""); txtValueParm.setText((urlValue.getValueParameterName().length() > 0) ? urlValue.getValueParameterName() : ""); txtSeriesParm.setText((urlValue.getSeriesParameterName().length() > 0) ? urlValue .getSeriesParameterName() : ""); break; case 1: this.slValues.topControl = cmpTooltip; TooltipValue tooltipValue = (TooltipValue) trigger.getAction().getValue(); iscDelay.setValue(tooltipValue.getDelay()); txtTooltipText.setText((tooltipValue.getText().length() > 0) ? tooltipValue.getText() : ""); break; case 2: this.slValues.topControl = cmpVisibility; SeriesValue seriesValue = (SeriesValue) trigger.getAction().getValue(); txtSeriesDefinition.setText((seriesValue.getName().length() > 0) ? seriesValue.getName() : ""); break; case 3: this.slValues.topControl = cmpScript; ScriptValue scriptValue = (ScriptValue) trigger.getAction().getValue(); txtScript.setText((scriptValue.getScript().length() > 0) ? scriptValue.getScript() : ""); break; } grpValue.layout(); }
private void updateUI( Trigger trigger ) { if ( trigger == null ) { clear( ); return; } cmbTriggerType.setText( LiteralHelper.triggerConditionSet.getDisplayNameByName( trigger.getCondition( ) .getName( ) ) ); cmbActionType.setText( LiteralHelper.actionTypeSet.getDisplayNameByName( trigger.getAction( ) .getType( ) .getName( ) ) ); switch ( cmbActionType.getSelectionIndex( ) ) { case 0 : this.slValues.topControl = cmpURL; URLValue urlValue = (URLValue) trigger.getAction( ).getValue( ); txtBaseURL.setText( ( urlValue.getBaseUrl( ).length( ) > 0 ) ? urlValue.getBaseUrl( ) : "" ); txtTarget.setText( ( urlValue.getTarget( ).length( ) > 0 ) ? urlValue.getTarget( ) : "" ); txtBaseParm.setText( ( urlValue.getBaseParameterName( ) .length( ) > 0 ) ? urlValue.getBaseParameterName( ) : "" ); txtValueParm.setText( ( urlValue.getValueParameterName( ) .length( ) > 0 ) ? urlValue.getValueParameterName( ) : "" ); txtSeriesParm.setText( ( urlValue.getSeriesParameterName( ) .length( ) > 0 ) ? urlValue.getSeriesParameterName( ) : "" ); break; case 1 : this.slValues.topControl = cmpTooltip; TooltipValue tooltipValue = (TooltipValue) trigger.getAction( ) .getValue( ); iscDelay.setValue( tooltipValue.getDelay( ) ); txtTooltipText.setText( ( tooltipValue.getText( ).length( ) > 0 ) ? tooltipValue.getText( ) : "" ); break; case 2 : this.slValues.topControl = cmpVisibility; SeriesValue seriesValue = (SeriesValue) trigger.getAction( ) .getValue( ); txtSeriesDefinition.setText( ( seriesValue.getName( ).length( ) > 0 ) ? seriesValue.getName( ) : "" ); break; case 3 : this.slValues.topControl = cmpScript; ScriptValue scriptValue = (ScriptValue) trigger.getAction( ) .getValue( ); txtScript.setText( ( scriptValue.getScript( ).length( ) > 0 ) ? scriptValue.getScript( ) : "" ); break; } grpValue.layout( ); }
    private void updateUI(Trigger trigger)    {        if (trigger == null)        {            clear();            return;        }        cmbTriggerType.setText(trigger.getCondition().getName());        cmbActionType.setText(trigger.getAction().getType().getName());        switch (cmbActionType.getSelectionIndex())        {            case 0:                this.slValues.topControl = cmpURL;                URLValue urlValue = (URLValue) trigger.getAction().getValue();                txtBaseURL.setText((urlValue.getBaseUrl().length() > 0) ? urlValue.getBaseUrl() : ""); //$NON-NLS-1$                txtTarget.setText((urlValue.getTarget().length() > 0) ? urlValue.getTarget() : ""); //$NON-NLS-1$                txtBaseParm.setText((urlValue.getBaseParameterName().length() > 0) ? urlValue.getBaseParameterName()                    : ""); //$NON-NLS-1$                txtValueParm.setText((urlValue.getValueParameterName().length() > 0) ? urlValue.getValueParameterName()                    : ""); //$NON-NLS-1$                txtSeriesParm.setText((urlValue.getSeriesParameterName().length() > 0) ? urlValue                    .getSeriesParameterName() : ""); //$NON-NLS-1$                break;            case 1:                this.slValues.topControl = cmpTooltip;                TooltipValue tooltipValue = (TooltipValue) trigger.getAction().getValue();                iscDelay.setValue(tooltipValue.getDelay());                txtTooltipText.setText((tooltipValue.getText().length() > 0) ? tooltipValue.getText() : ""); //$NON-NLS-1$                break;            case 2:                this.slValues.topControl = cmpVisibility;                SeriesValue seriesValue = (SeriesValue) trigger.getAction().getValue();                txtSeriesDefinition.setText((seriesValue.getName().length() > 0) ? seriesValue.getName() : ""); //$NON-NLS-1$                break;            case 3:                this.slValues.topControl = cmpScript;                ScriptValue scriptValue = (ScriptValue) trigger.getAction().getValue();                txtScript.setText((scriptValue.getScript().length() > 0) ? scriptValue.getScript() : ""); //$NON-NLS-1$                break;        }        grpValue.layout();    }