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

org.nuiton.widget.SwitchPane Maven / Gradle / Ivy

There is a newer version: 1.1.1
Show newest version
/**
 * *##% Graphical Widget
 * Copyright (C) 2004 - 2008 CodeLutin
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as
 * published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Lesser Public License for more details.
 *
 * You should have received a copy of the GNU General Lesser Public
 * License along with this program.  If not, see
 * . ##%*
 */
/*
 * Created on 16 mai 2005
 *
 * TODO To change the template for this generated file go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
package org.nuiton.widget;

import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.LayoutManager;

import javax.swing.JPanel;

/**
 * @author cedric
 * 
 *         TODO To change the template for this generated type comment go to
 *         Window - Preferences - Java - Code Style - Code Templates
 */
public class SwitchPane extends JPanel {

    private static final long serialVersionUID = 1L;
    
    /**
     * Constructeur unique pour le SwitchPane
     */
    public SwitchPane() {
        super();
    }

    @Override
    public void setLayout(LayoutManager mgr) {
        super.setLayout(new BorderLayout());
    }

    public void switchTo(Component component) {
        super.removeAll();
        super.add(component, BorderLayout.CENTER);
        revalidate();
        repaint();
    }

    public SwitchPane(LayoutManager layout, boolean isDoubleBuffered) {
        throw new UnsupportedOperationException();
    }

    public SwitchPane(LayoutManager layout) {
        throw new UnsupportedOperationException();
    }

    public SwitchPane(boolean isDoubleBuffered) {
        throw new UnsupportedOperationException();
    }

    @Override
    public Component add(Component component) {
        throw new UnsupportedOperationException();
    }

    @Override
    public Component add(Component component, int index) {
        throw new UnsupportedOperationException();
    }

    @Override
    public void add(Component component, Object constraints) {
        throw new UnsupportedOperationException();
    }

    @Override
    public void add(Component component, Object constraints, int index) {
        throw new UnsupportedOperationException();
    }

    @Override
    public Component add(String name, Component component) {
        throw new UnsupportedOperationException();
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy