/* dIntProg Browser. A webbrowser written in Java.
 * Copyright (C) 2001 Martin Geisler <gimpster@gimpster.com>
 *  
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License as
 * published by the Free Software Foundation; either version 2 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 Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the
 * 
 * Free Software Foundation, Inc.,
 * 59 Temple Place - Suite 330,
 * Boston, MA 02111-1307, USA.
 */

import java.awt.Graphics;
import javax.swing.*;
import java.util.*;
import java.net.*;

/** Adaptor class for rigid boxes. It implements all methods specified
 *  in {@link Box}. */
public abstract class AbstractRigidBox
    extends AbstractBox
    implements RigidBox {

    /** The Graphics context used when drawing this rigid box. */
    protected Graphics pen;

    /** Reports wether or not the box can be split at <code>w</code>.
     * @param w the place where the split should be.
     * @return true if <code>w</code> is greather than the value
     * returned by {@link #getMinimumWidth()}. */
    public boolean splitIsPossible(int w) {
        return (w > getMinimumWidth());
    }
    
    /** Tries to split the box at <code>w</code>.
     * @param w the place where the split should be.
     * @return always <code>null</code> to indicate that the box can't
     * be split. */
    public Box splitHead(int w) {
        return null;
    }
    
    /** Tries to split the box at <code>w</code>.
     * @param w the place where the split should be.
     * @return always <code>null</code> to indicate that the box can't
     * be split. */
    public Box splitTail(int w) {
        return null;
    }

    /** Tries to make the smallest left part from a split. 
     * @return always <code>null</code> to indicate that the box can't
     * be split. */
    public Box getSmallestHead() {
        return null;
    }

    /** Tries to make the largest right part from a split. 
     * @return always <code>null</code> to indicate that the box can't
     * be split. */
    public Box getLargestTail() {
        return null;
    }

    /** Pretends to trim the box - it does nothing as the body of the
     * method is empty.
     * @param edge to be trimmed. The value is discarded. */
    public void trim(int edge) {

    }

}