funcplotter.java

来自「FuncPlotter is a combined Java applicati」· Java 代码 · 共 104 行

JAVA
104
字号
/*====================================================================*\FuncPlotter.javaFunction plotter application and applet : main class.------------------------------------------------------------------------This file is part of FuncPlotter, a combined Java application and appletfor plotting explicit functions in one variable.Copyright 2005-2007 Andy Morgan-Richards.FuncPlotter is free software: you can redistribute it and/or modify itunder the terms of the GNU General Public License as published by theFree Software Foundation, either version 3 of the License, or (at youroption) any later version.This program is distributed in the hope that it will be useful, butWITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNUGeneral Public License for more details.You should have received a copy of the GNU General Public License alongwith this program.  If not, see <http://www.gnu.org/licenses/>.\*====================================================================*/// IMPORTSimport javax.swing.JApplet;//----------------------------------------------------------------------// FUNCTION PLOTTER APPLICATION AND APPLET : MAIN CLASSpublic class FuncPlotter    extends JApplet{//////////////////////////////////////////////////////////////////////////  Constants////////////////////////////////////////////////////////////////////////    private static final    String  TITLE_PREFIX        = "Title: ";    private static final    String  AUTHOR_PREFIX       = "Author: ";    private static final    String  AUTHOR_NAME         = "Andy Morgan-Richards";    private static final    String  APPLET_DESCRIPTION  = "Plots explicit functions in one variable.";//////////////////////////////////////////////////////////////////////////  Class methods////////////////////////////////////////////////////////////////////////    public static void main( String[] args )    {        App.getInstance( ).init( (args.length == 0) ? null : args );    }    //------------------------------------------------------------------//////////////////////////////////////////////////////////////////////////  Instance methods : overriding methods////////////////////////////////////////////////////////////////////////    public void init( )    {        App.getInstance( this ).init( null );    }    //------------------------------------------------------------------    public String getAppletInfo( )    {        return ( TITLE_PREFIX + App.getInstance( ).getTitleString( ) + "\n" +                 AUTHOR_PREFIX + AUTHOR_NAME + "\n" + APPLET_DESCRIPTION );    }    //------------------------------------------------------------------//////////////////////////////////////////////////////////////////////////  Instance methods////////////////////////////////////////////////////////////////////////    public int getPreferredWidth( )    {        return getPreferredSize( ).width;    }    //------------------------------------------------------------------    public int getPreferredHeight( )    {        return getPreferredSize( ).height;    }    //------------------------------------------------------------------}//----------------------------------------------------------------------

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?