All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.eclipse.jface.preference.IPreferencePage Maven / Gradle / Ivy

There is a newer version: 3.29.0
Show newest version
/*******************************************************************************
 * Copyright (c) 2000, 2006 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
package org.eclipse.jface.preference;

import org.eclipse.jface.dialogs.IDialogPage;
import org.eclipse.swt.graphics.Point;

/**
 * An interface for a preference page. This interface
 * is used primarily by the page's container 
 */
public interface IPreferencePage extends IDialogPage {

    /**
     * Computes a size for this page's UI component. 
     *
     * @return the size of the preference page encoded as
     *   new Point(width,height), or 
     *   (0,0) if the page doesn't currently have any UI component
     */
    public Point computeSize();

    /**
     * Returns whether this dialog page is in a valid state.
     * 
     * @return true if the page is in a valid state,
     *   and false if invalid
     */
    public boolean isValid();

    /**
     * Checks whether it is alright to leave this page.
     * 
     * @return false to abort page flipping and the
     *  have the current page remain visible, and true
     *  to allow the page flip
     */
    public boolean okToLeave();

    /**
     * Notifies that the container of this preference page has been canceled.
     * 
     * @return false to abort the container's cancel 
     *  procedure and true to allow the cancel to happen
     */
    public boolean performCancel();

    /**
     * Notifies that the OK button of this page's container has been pressed.
     * 
     * @return false to abort the container's OK
     *  processing and true to allow the OK to happen
     */
    public boolean performOk();

    /**
     * Sets or clears the container of this page.
     *
     * @param preferencePageContainer the preference page container, or null 
     */
    public void setContainer(IPreferencePageContainer preferencePageContainer);

    /**
     * Sets the size of this page's UI component.
     *
     * @param size the size of the preference page encoded as
     *   new Point(width,height)
     */
    public void setSize(Point size);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy