Java 类org.eclipse.jface.dialogs.ControlEnableState 实例源码

项目:APICloud-Studio    文件:PropertyAndPreferenceFieldEditorPage.java   
protected void enablePreferenceContent(boolean enable)
{
    if (enable)
    {
        if (fBlockEnableState != null)
        {
            fBlockEnableState.restore();
            fBlockEnableState = null;
        }
    }
    else
    {
        if (fBlockEnableState == null)
        {
            fBlockEnableState = ControlEnableState.disable(fConfigurationBlockControl);
        }
    }
}
项目:APICloud-Studio    文件:PropertyAndPreferencePage.java   
protected void enablePreferenceContent(boolean enable)
{
    if (enable)
    {
        if (fBlockEnableState != null)
        {
            fBlockEnableState.restore();
            fBlockEnableState = null;
        }
    }
    else
    {
        if (fBlockEnableState == null)
        {
            fBlockEnableState = ControlEnableState.disable(fConfigurationBlockControl);
        }
    }
}
项目:Eclipse-Postfix-Code-Completion    文件:CleanUpSaveParticipantPreferenceConfiguration.java   
/**
 * {@inheritDoc}
 */
@Override
protected void enabled(boolean isEnabled) {
    if (isEnabled) {
        if (fControlEnableState == null)
            return;

        fControlEnableState.restore();
        fControlEnableState= null;
    } else {
        if (fControlEnableState != null)
            return;

        fControlEnableState= ControlEnableState.disable(fCleanUpOptionsComposite);
    }
}
项目:Eclipse-Postfix-Code-Completion-Juno38    文件:CleanUpSaveParticipantPreferenceConfiguration.java   
/**
 * {@inheritDoc}
 */
@Override
protected void enabled(boolean isEnabled) {
    if (isEnabled) {
        if (fControlEnableState == null)
            return;

        fControlEnableState.restore();
        fControlEnableState= null;
    } else {
        if (fControlEnableState != null)
            return;

        fControlEnableState= ControlEnableState.disable(fCleanUpOptionsComposite);
    }
}
项目:birt    文件:OptionsConfigurationBlock.java   
protected void updateCombo( Combo curr )
{
    ControlData data = (ControlData) curr.getData( );

    String currValue = getValue( data.getKey( ) );
    curr.select( data.getSelection( currValue ) );

    if ( fProject != null )
    {
        if ( ignoreKeys != null
                && Arrays.asList( ignoreKeys ).contains( data.getKey( ) ) )
        {
            ControlEnableState.disable( curr );
            Control label = (Control) fLabels.get( curr );
            if ( label != null )
                ControlEnableState.disable( label );
        }
    }
}
项目:birt    文件:OptionsConfigurationBlock.java   
protected void updateCheckBox( Button curr )
{
    ControlData data = (ControlData) curr.getData( );

    String currValue = getValue( data.getKey( ) );
    curr.setSelection( data.getSelection( currValue ) == 0 );

    if ( fProject != null )
    {
        if ( ignoreKeys != null
                && Arrays.asList( ignoreKeys ).contains( data.getKey( ) ) )
        {
            ControlEnableState.disable( curr );
        }
    }
}
项目:birt    文件:OptionsConfigurationBlock.java   
protected void updateRadioComposite( RadioComposite curr )
{
    ControlData data = (ControlData) curr.getData( );

    String currValue = getValue( data.getKey( ) );
    curr.setSelection( data.getSelection( currValue ) );

    if ( fProject != null )
    {
        if ( ignoreKeys != null
                && Arrays.asList( ignoreKeys ).contains( data.getKey( ) ) )
        {
            ControlEnableState.disable( curr );
        }
    }
}
项目:birt    文件:OptionsConfigurationBlock.java   
protected void updateText( Text curr )
{
    Key key = (Key) curr.getData( );

    String currValue = getValue( key );
    if ( currValue != null )
    {
        curr.setText( currValue );
    }

    if ( fProject != null )
    {
        if ( ignoreKeys != null
                && Arrays.asList( ignoreKeys ).contains( key ) )
        {
            ControlEnableState.disable( curr );
            Control label = (Control) fLabels.get( curr );
            if ( label != null )
                ControlEnableState.disable( label );
        }
    }
}
项目:birt    文件:PropertyAndPreferencePage.java   
protected void enablePreferenceContent( boolean enable )
{
    if ( enable )
    {
        if ( fBlockEnableState != null )
        {
            fBlockEnableState.restore( );
            fBlockEnableState = null;
        }
    }
    else
    {
        if ( fBlockEnableState == null )
        {
            fBlockEnableState = ControlEnableState.disable( fConfigurationBlockControl );
        }
    }
}
项目:n4js    文件:AbstractN4JSPreferencePage.java   
/** copied from PropertyAndPreferencePage */
protected void enablePreferenceContent(boolean enable) {
    if (enable) {
        if (blockEnableState != null) {
            blockEnableState.restore();
            blockEnableState = null;
        }
    } else {
        if (blockEnableState == null) {
            blockEnableState = ControlEnableState.disable(configurationBlockControl);
        }
    }
}
项目:angular-eclipse    文件:AngularCLIConfigurationBlock.java   
public void enablePreferenceContent(boolean enable) {
    if (controlsComposite != null && !controlsComposite.isDisposed()) {
        if (enable) {
            if (blockEnableState != null) {
                blockEnableState.restore();
                blockEnableState = null;
            }
        } else {
            if (blockEnableState == null) {
                blockEnableState = ControlEnableState.disable(controlsComposite);
            }
        }
    }
}
项目:typescript.java    文件:PropertyAndPreferencePage.java   
protected void enablePreferenceContent(boolean enable) {
    if (enable) {
        if (fBlockEnableState != null) {
            fBlockEnableState.restore();
            fBlockEnableState = null;
        }
    } else {
        if (fBlockEnableState == null) {
            fBlockEnableState = ControlEnableState.disable(fConfigurationBlockControl);
        }
    }
}
项目:typescript.java    文件:ATAConfigurationBlock.java   
public void enablePreferenceContent(boolean enable) {
    if (controlsComposite != null && !controlsComposite.isDisposed()) {
        if (enable) {
            if (blockEnableState != null) {
                blockEnableState.restore();
                blockEnableState = null;
            }
        } else {
            if (blockEnableState == null) {
                blockEnableState = ControlEnableState.disable(controlsComposite);
            }
        }
    }
}
项目:typescript.java    文件:AbstractTypeScriptRepositoryConfigurationBlock.java   
public void enablePreferenceContent(boolean enable) {
    if (controlsComposite != null && !controlsComposite.isDisposed()) {
        if (enable) {
            if (blockEnableState != null) {
                blockEnableState.restore();
                blockEnableState = null;
            }
        } else {
            if (blockEnableState == null) {
                blockEnableState = ControlEnableState.disable(controlsComposite);
            }
        }
    }
}
项目:typescript.java    文件:TextMateConfigurationBlock.java   
public void enablePreferenceContent(boolean enable) {
    if (controlsComposite != null && !controlsComposite.isDisposed()) {
        if (enable) {
            if (blockEnableState != null) {
                blockEnableState.restore();
                blockEnableState = null;
            }
        } else {
            if (blockEnableState == null) {
                blockEnableState = ControlEnableState.disable(controlsComposite);
            }
        }
    }
}
项目:typescript.java    文件:CodeLensConfigurationBlock.java   
public void enablePreferenceContent(boolean enable) {
    if (controlsComposite != null && !controlsComposite.isDisposed()) {
        if (enable) {
            if (blockEnableState != null) {
                blockEnableState.restore();
                blockEnableState = null;
            }
        } else {
            if (blockEnableState == null) {
                blockEnableState = ControlEnableState.disable(controlsComposite);
            }
        }
    }
}
项目:typescript.java    文件:FormatterConfigurationBlock.java   
public void enablePreferenceContent(boolean enable) {
    if (controlsComposite != null && !controlsComposite.isDisposed()) {
        if (enable) {
            if (blockEnableState != null) {
                blockEnableState.restore();
                blockEnableState = null;
            }
        } else {
            if (blockEnableState == null) {
                blockEnableState = ControlEnableState.disable(controlsComposite);
            }
        }
    }
}
项目:typescript.java    文件:NodejsConfigurationBlock.java   
public void enablePreferenceContent(boolean enable) {
    if (controlsComposite != null && !controlsComposite.isDisposed()) {
        if (enable) {
            if (blockEnableState != null) {
                blockEnableState.restore();
                blockEnableState = null;
            }
        } else {
            if (blockEnableState == null) {
                blockEnableState = ControlEnableState.disable(controlsComposite);
            }
        }
    }
}
项目:typescript.java    文件:SaveActionsConfigurationBlock.java   
public void enablePreferenceContent(boolean enable) {
    if (controlsComposite != null && !controlsComposite.isDisposed()) {
        if (enable) {
            if (blockEnableState != null) {
                blockEnableState.restore();
                blockEnableState = null;
            }
        } else {
            if (blockEnableState == null) {
                blockEnableState = ControlEnableState.disable(controlsComposite);
            }
        }
    }
}
项目:typescript.java    文件:SaveActionsConfigurationBlock.java   
@Override
protected void reconcileControls() {
    if (saveActionsButton.getSelection()) {
        if (saveActionsContainerEnableState != null) {
            saveActionsContainerEnableState.restore();
            saveActionsContainerEnableState = null;
        }
    } else {
        if (saveActionsContainerEnableState == null) {
            saveActionsContainerEnableState = ControlEnableState.disable(saveActionsContainer);
        }
    }
}
项目:typescript.java    文件:TSLintWizardPage.java   
protected void enableTslintContent(boolean enable) {
    if (enable) {
        if (fBlockEnableState != null) {
            fBlockEnableState.restore();
            fBlockEnableState = null;
        }
    } else {
        if (fBlockEnableState == null) {
            fBlockEnableState = ControlEnableState.disable(controlsComposite);
        }
    }
}
项目:bts    文件:PropertyAndPreferencePage.java   
protected void enablePreferenceContent(boolean enable) {
    if (enable) {
        if (blockEnableState != null) {
            blockEnableState.restore();
            blockEnableState = null;
        }
    } else {
        if (blockEnableState == null) {
            blockEnableState = ControlEnableState.disable(configurationBlockControl);
        }
    }
}
项目:eclipse-wtp-json    文件:JSONValidatorPreferencePage.java   
private void handleSyntaxSeveritySelection(boolean selection) {
    if (selection) {
        if (fSyntaxState != null) {
            fSyntaxState.restore();
            fSyntaxState = null;
        }
    } else {
        if (fSyntaxState == null)
            fSyntaxState = ControlEnableState
                    .disable(fSyntaxValidationGroup);
    }
}
项目:p2-installer    文件:WizardDialog.java   
/**
 * Restores the enabled/disabled state of the wizard dialog's buttons and
 * the tree of controls for the currently showing page.
 * 
 * @param state
 *            a map containing the saved state as returned by
 *            <code>saveUIState</code>
 * @see #saveUIState
 */
private void restoreUIState(Map state) {
    restoreEnableState(backButton, state, "back"); //$NON-NLS-1$
    restoreEnableState(nextButton, state, "next"); //$NON-NLS-1$
    restoreEnableState(finishButton, state, "finish"); //$NON-NLS-1$
    restoreEnableState(cancelButton, state, "cancel"); //$NON-NLS-1$
    restoreEnableState(helpButton, state, "help"); //$NON-NLS-1$
    Object pageValue = state.get("page"); //$NON-NLS-1$
    if (pageValue != null) {
        ((ControlEnableState) pageValue).restore();
    }
}
项目:p2-installer    文件:WizardDialog.java   
/**
 * Captures and returns the enabled/disabled state of the wizard dialog's
 * buttons and the tree of controls for the currently showing page. All
 * these controls are disabled in the process, with the possible exception
 * of the Cancel button.
 * 
 * @param keepCancelEnabled
 *            <code>true</code> if the Cancel button should remain
 *            enabled, and <code>false</code> if it should be disabled
 * @return a map containing the saved state suitable for restoring later
 *         with <code>restoreUIState</code>
 * @see #restoreUIState
 */
private Map saveUIState(boolean keepCancelEnabled) {
    Map savedState = new HashMap(10);
    saveEnableStateAndSet(backButton, savedState, "back", false); //$NON-NLS-1$
    saveEnableStateAndSet(nextButton, savedState, "next", false); //$NON-NLS-1$
    saveEnableStateAndSet(finishButton, savedState, "finish", false); //$NON-NLS-1$
    saveEnableStateAndSet(cancelButton, savedState, "cancel", keepCancelEnabled); //$NON-NLS-1$
    saveEnableStateAndSet(helpButton, savedState, "help", false); //$NON-NLS-1$
    if (currentPage != null) {
        savedState
                .put(
                        "page", ControlEnableState.disable(currentPage.getControl())); //$NON-NLS-1$
    }
    return savedState;
}
项目:Eclipse-Postfix-Code-Completion    文件:JavadocProblemsConfigurationBlock.java   
protected void enableConfigControls(boolean enable) {
    if (enable) {
        if (fBlockEnableState != null) {
            fBlockEnableState.restore();
            fBlockEnableState= null;
        }
    } else {
        if (fBlockEnableState == null) {
            fBlockEnableState= ControlEnableState.disable(fJavadocComposite);
        }
    }
}
项目:Eclipse-Postfix-Code-Completion    文件:PropertyAndPreferencePage.java   
protected void enablePreferenceContent(boolean enable) {
    if (enable) {
        if (fBlockEnableState != null) {
            fBlockEnableState.restore();
            fBlockEnableState= null;
        }
    } else {
        if (fBlockEnableState == null) {
            fBlockEnableState= ControlEnableState.disable(fConfigurationBlockControl);
        }
    }
}
项目:Eclipse-Postfix-Code-Completion    文件:ComplianceConfigurationBlock.java   
public void enablePreferenceContent(boolean enable) {
    if (fControlsComposite != null && !fControlsComposite.isDisposed()) {
        if (enable) {
            if (fBlockEnableState != null) {
                fBlockEnableState.restore();
                fBlockEnableState= null;
            }
        } else {
            if (fBlockEnableState == null) {
                fBlockEnableState= ControlEnableState.disable(fControlsComposite);
            }
        }
    }
}
项目:Eclipse-Postfix-Code-Completion    文件:CleanUpRefactoringWizard.java   
private void updateEnableState(boolean isCustom, final ListDialogField<IJavaProject> settingsField, Button configureCustom, BulletListBlock bulletListBlock) {
    settingsField.getListControl(null).setEnabled(!isCustom);
    if (isCustom) {
        fEnableState= ControlEnableState.disable(settingsField.getButtonBox(null));
    } else if (fEnableState != null) {
        fEnableState.restore();
        fEnableState= null;
    }
    bulletListBlock.setEnabled(isCustom);
    configureCustom.setEnabled(isCustom);
}
项目:translationstudio8    文件:TSWizardDialog.java   
/**
 * Restores the enabled/disabled state of the wizard dialog's buttons and
 * the tree of controls for the currently showing page.
 * 
 * @param state
 *            a map containing the saved state as returned by
 *            <code>saveUIState</code>
 * @see #saveUIState
 */
private void restoreUIState(Map state) {
    restoreEnableState(backButton, state, "back"); //$NON-NLS-1$
    restoreEnableState(nextButton, state, "next"); //$NON-NLS-1$
    restoreEnableState(finishButton, state, "finish"); //$NON-NLS-1$
    restoreEnableState(cancelButton, state, "cancel"); //$NON-NLS-1$
    restoreEnableState(helpButton, state, "help"); //$NON-NLS-1$
    Object pageValue = state.get("page"); //$NON-NLS-1$
    if (pageValue != null) {
        ((ControlEnableState) pageValue).restore();
    }
}
项目:translationstudio8    文件:TSWizardDialog.java   
/**
 * Captures and returns the enabled/disabled state of the wizard dialog's
 * buttons and the tree of controls for the currently showing page. All
 * these controls are disabled in the process, with the possible exception
 * of the Cancel button.
 * 
 * @param keepCancelEnabled
 *            <code>true</code> if the Cancel button should remain
 *            enabled, and <code>false</code> if it should be disabled
 * @return a map containing the saved state suitable for restoring later
 *         with <code>restoreUIState</code>
 * @see #restoreUIState
 */
private Map saveUIState(boolean keepCancelEnabled) {
    Map savedState = new HashMap(10);
    saveEnableStateAndSet(backButton, savedState, "back", false); //$NON-NLS-1$
    saveEnableStateAndSet(nextButton, savedState, "next", false); //$NON-NLS-1$
    saveEnableStateAndSet(finishButton, savedState, "finish", false); //$NON-NLS-1$
    saveEnableStateAndSet(cancelButton, savedState, "cancel", keepCancelEnabled); //$NON-NLS-1$
    saveEnableStateAndSet(helpButton, savedState, "help", false); //$NON-NLS-1$
    if (currentPage != null) {
        savedState
                .put(
                        "page", ControlEnableState.disable(currentPage.getControl())); //$NON-NLS-1$
    }
    return savedState;
}
项目:gef-gwt    文件:WizardDialog.java   
/**
 * Restores the enabled/disabled state of the wizard dialog's buttons and
 * the tree of controls for the currently showing page.
 * 
 * @param state
 *            a map containing the saved state as returned by
 *            <code>saveUIState</code>
 * @see #saveUIState
 */
private void restoreUIState(Map state) {
    restoreEnableState(backButton, state, "back"); //$NON-NLS-1$
    restoreEnableState(nextButton, state, "next"); //$NON-NLS-1$
    restoreEnableState(finishButton, state, "finish"); //$NON-NLS-1$
    restoreEnableState(cancelButton, state, "cancel"); //$NON-NLS-1$
    restoreEnableState(helpButton, state, "help"); //$NON-NLS-1$
    Object pageValue = state.get("page"); //$NON-NLS-1$
    if (pageValue != null) {
        ((ControlEnableState) pageValue).restore();
    }
}
项目:gef-gwt    文件:WizardDialog.java   
/**
 * Captures and returns the enabled/disabled state of the wizard dialog's
 * buttons and the tree of controls for the currently showing page. All
 * these controls are disabled in the process, with the possible exception
 * of the Cancel button.
 * 
 * @param keepCancelEnabled
 *            <code>true</code> if the Cancel button should remain enabled,
 *            and <code>false</code> if it should be disabled
 * @return a map containing the saved state suitable for restoring later
 *         with <code>restoreUIState</code>
 * @see #restoreUIState
 */
private Map saveUIState(boolean keepCancelEnabled) {
    Map savedState = new HashMap(10);
    saveEnableStateAndSet(backButton, savedState, "back", false); //$NON-NLS-1$
    saveEnableStateAndSet(nextButton, savedState, "next", false); //$NON-NLS-1$
    saveEnableStateAndSet(finishButton, savedState, "finish", false); //$NON-NLS-1$
    saveEnableStateAndSet(cancelButton, savedState,
            "cancel", keepCancelEnabled); //$NON-NLS-1$
    saveEnableStateAndSet(helpButton, savedState, "help", false); //$NON-NLS-1$
    if (currentPage != null) {
        savedState
                .put("page", ControlEnableState.disable(currentPage.getControl())); //$NON-NLS-1$
    }
    return savedState;
}
项目:eclipse-wtp-webresources    文件:PropertyPreferencePage.java   
/**
 * Controls the enablement of the common content region
 * of a property or preference page
 * 
 * @param enable the enabled state of the common content
 * area
 */
protected void enablePreferenceContent(boolean enable) {
    if(enable) {
        if(fEnablements != null) {
            fEnablements.restore();
            fEnablements = null;
        }
    }
    else {
        if(fEnablements == null)
            fEnablements = ControlEnableState.disable(fCommon);
    }
}
项目:Eclipse-Postfix-Code-Completion-Juno38    文件:JavadocProblemsConfigurationBlock.java   
protected void enableConfigControls(boolean enable) {
    if (enable) {
        if (fBlockEnableState != null) {
            fBlockEnableState.restore();
            fBlockEnableState= null;
        }
    } else {
        if (fBlockEnableState == null) {
            fBlockEnableState= ControlEnableState.disable(fJavadocComposite);
        }
    }
}
项目:Eclipse-Postfix-Code-Completion-Juno38    文件:PropertyAndPreferencePage.java   
protected void enablePreferenceContent(boolean enable) {
    if (enable) {
        if (fBlockEnableState != null) {
            fBlockEnableState.restore();
            fBlockEnableState= null;
        }
    } else {
        if (fBlockEnableState == null) {
            fBlockEnableState= ControlEnableState.disable(fConfigurationBlockControl);
        }
    }
}
项目:Eclipse-Postfix-Code-Completion-Juno38    文件:ComplianceConfigurationBlock.java   
public void enablePreferenceContent(boolean enable) {
    if (fControlsComposite != null && !fControlsComposite.isDisposed()) {
        if (enable) {
            if (fBlockEnableState != null) {
                fBlockEnableState.restore();
                fBlockEnableState= null;
            }
        } else {
            if (fBlockEnableState == null) {
                fBlockEnableState= ControlEnableState.disable(fControlsComposite);
            }
        }
    }
}
项目:Eclipse-Postfix-Code-Completion-Juno38    文件:CleanUpRefactoringWizard.java   
private void updateEnableState(boolean isCustom, final ListDialogField<IJavaProject> settingsField, Button configureCustom, BulletListBlock bulletListBlock) {
    settingsField.getListControl(null).setEnabled(!isCustom);
    if (isCustom) {
        fEnableState= ControlEnableState.disable(settingsField.getButtonBox(null));
    } else if (fEnableState != null) {
        fEnableState.restore();
        fEnableState= null;
    }
    bulletListBlock.setEnabled(isCustom);
    configureCustom.setEnabled(isCustom);
}
项目:tmxeditor8    文件:TSWizardDialog.java   
/**
 * Restores the enabled/disabled state of the wizard dialog's buttons and
 * the tree of controls for the currently showing page.
 * 
 * @param state
 *            a map containing the saved state as returned by
 *            <code>saveUIState</code>
 * @see #saveUIState
 */
private void restoreUIState(Map state) {
    restoreEnableState(backButton, state, "back"); //$NON-NLS-1$
    restoreEnableState(nextButton, state, "next"); //$NON-NLS-1$
    restoreEnableState(finishButton, state, "finish"); //$NON-NLS-1$
    restoreEnableState(cancelButton, state, "cancel"); //$NON-NLS-1$
    restoreEnableState(helpButton, state, "help"); //$NON-NLS-1$
    Object pageValue = state.get("page"); //$NON-NLS-1$
    if (pageValue != null) {
        ((ControlEnableState) pageValue).restore();
    }
}
项目:tmxeditor8    文件:TSWizardDialog.java   
/**
 * Captures and returns the enabled/disabled state of the wizard dialog's
 * buttons and the tree of controls for the currently showing page. All
 * these controls are disabled in the process, with the possible exception
 * of the Cancel button.
 * 
 * @param keepCancelEnabled
 *            <code>true</code> if the Cancel button should remain
 *            enabled, and <code>false</code> if it should be disabled
 * @return a map containing the saved state suitable for restoring later
 *         with <code>restoreUIState</code>
 * @see #restoreUIState
 */
private Map saveUIState(boolean keepCancelEnabled) {
    Map savedState = new HashMap(10);
    saveEnableStateAndSet(backButton, savedState, "back", false); //$NON-NLS-1$
    saveEnableStateAndSet(nextButton, savedState, "next", false); //$NON-NLS-1$
    saveEnableStateAndSet(finishButton, savedState, "finish", false); //$NON-NLS-1$
    saveEnableStateAndSet(cancelButton, savedState, "cancel", keepCancelEnabled); //$NON-NLS-1$
    saveEnableStateAndSet(helpButton, savedState, "help", false); //$NON-NLS-1$
    if (currentPage != null) {
        savedState
                .put(
                        "page", ControlEnableState.disable(currentPage.getControl())); //$NON-NLS-1$
    }
    return savedState;
}