org.cs3.prolog.ui.util.preferences.MyStringFieldEditor.java Source code

Java tutorial

Introduction

Here is the source code for org.cs3.prolog.ui.util.preferences.MyStringFieldEditor.java

Source

/*****************************************************************************
 * This file is part of the Prolog Development Tool (PDT)
 * 
 * WWW: http://sewiki.iai.uni-bonn.de/research/pdt/start
 * Mail: pdt@lists.iai.uni-bonn.de
 * Copyright (C): 2004-2012, CS Dept. III, University of Bonn
 * 
 * All rights reserved. This program is  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
 * 
 ****************************************************************************/

package org.cs3.prolog.ui.util.preferences;

import org.eclipse.jface.preference.StringFieldEditor;
import org.eclipse.swt.widgets.Composite;

public class MyStringFieldEditor extends StringFieldEditor implements FieldEditorForStructuredPreferencePage {

    private Composite parent;

    public MyStringFieldEditor(String name, String labelText, int width, int strategy, Composite parent) {
        super(name, labelText, width, strategy, parent);
        this.parent = parent;
    }

    public MyStringFieldEditor(String name, String labelText, int width, Composite parent) {
        super(name, labelText, width, parent);
        this.parent = parent;
    }

    public MyStringFieldEditor(String name, String labelText, Composite parent) {
        super(name, labelText, parent);
        this.parent = parent;
    }

    @Override
    public void adjustColumns(int numColumns) {
        adjustForNumColumns(numColumns);
    }

    @Override
    public Composite getParent() {
        return parent;
    }

}