Package ket.math.purpose.function

Source Code of ket.math.purpose.function.FunctionBorder

/*
* Copyright (C) 2011  Alasdair C. Hamilton
*
* 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 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 Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program.  If not, see <http://www.gnu.org/licenses/>
*/

package ket.math.purpose.function;

import java.awt.*;
import java.util.*;

import ket.display.*;
import ket.display.box.BorderedBox;
import ket.display.box.Box;
import ket.display.box.BoxTools;
import ket.display.box.BoxWord;
import ket.math.Argument;
import ket.math.Function;
import ket.math.FunctionForm;
import ket.math.purpose.SymbolicState;
import ket.math.purpose.function.*;
import ket.math.purpose.symbolicFunctions.*;

/**
* This class is responsible for displaying functions as HTML, LaTeX or box instances.
*/
public class FunctionBorder extends FunctionForm {

  public FunctionBorder() {
    super(Function.BORDERED_BOX); //?
  }

  @Override
  public Box toBox(Argument argument, Vector<Box> boxArgs, long settings, ColourScheme colourScheme) {
    if (boxArgs.size()!=1) {
      return super.toBox(argument, boxArgs, settings, colourScheme);
    }
    return new BorderedBox(argument, boxArgs.firstElement(), settings, false, colourScheme);
  }
}
TOP

Related Classes of ket.math.purpose.function.FunctionBorder

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.