fpathnamefield.java

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

JAVA
108
字号
/*====================================================================*\FPathnameField.javaPathname field 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 gui.GuiUtilities;import java.io.File;import textfield.PathnameField;//----------------------------------------------------------------------// PATHNAME FIELD CLASSclass FPathnameField    extends PathnameField{//////////////////////////////////////////////////////////////////////////  Constants////////////////////////////////////////////////////////////////////////    private static final    int NUM_COLUMNS = 40;//////////////////////////////////////////////////////////////////////////  Constructors////////////////////////////////////////////////////////////////////////    public FPathnameField( )    {        super( NUM_COLUMNS );        init( );    }    //------------------------------------------------------------------    public FPathnameField( String pathname )    {        super( pathname, NUM_COLUMNS );        init( );    }    //------------------------------------------------------------------    public FPathnameField( File file )    {        super( file, NUM_COLUMNS );        init( );    }    //------------------------------------------------------------------//////////////////////////////////////////////////////////////////////////  Instance methods : overriding methods////////////////////////////////////////////////////////////////////////    public void setFile( File file )    {        setFile( file, AppConfig.getInstance( ).isShowUnixPathnames( ) );    }    //------------------------------------------------------------------//////////////////////////////////////////////////////////////////////////  Instance methods////////////////////////////////////////////////////////////////////////    private void init( )    {        AppFont.TEXT_FIELD.setFont( this );        GuiUtilities.setHorizontalMargins( this, AppConstants.TEXT_FIELD_MARGIN );    }    //------------------------------------------------------------------}//----------------------------------------------------------------------

⌨️ 快捷键说明

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