constants.java

来自「Java the UML Way 书中所有源码」· Java 代码 · 共 43 行

JAVA
43
字号
/*
 * Constants.java    E.L.2001-08-23
 *
 * Constants to be used in the class RenovationChap15
 * and the supporting dialog classes.
 */

import java.awt.Dimension;
import java.text.NumberFormat;
import myLibrary.*;
interface Constants {
  String[] buttonCommand = {"Add Surface", "Add Paint",
      "Add Flooring", "Add Wallpaper", "Combine", "Exit"};
  String[] buttonDescription = {"Register New Surface",
    "Register a new type of Paint", "Register a new type of Flooring",
    "Register a new type of Wallpaper",
    "Combine a surface with a material", "Exit the program"};
  int combineIndex = 4;
  char[] buttonMnemonic = {'S', 'P', 'F', 'W', 'C', 'E'};
  String[] iconfile = {"NewSurface.gif", "NewPaint.gif",
    "NewFlooring.gif", "NewWallpaper.gif", "Combine.gif", "Exit.gif"};
  String iconDirectory = "icons" + java.io.File.separator;

  String menuName = "Help";
  char menuNameMnemonic = 'H';
  String[] menuItem = {"Help", "About this program..."};
  char[] menuMnemonic = {'H', 'A'};

  String[] columnNames =
    {"Surface", "Width", "Length", "Material", "No. of units", "Price per unit", "Total price"};

  int windowX = 200;  // The location of the primary window, ...
  int windowY = 300;  // ...., upper left corner
  int dialogX = 300; // The location of the dialogs, ...
  int dialogY = 400; // ...., upper left corner
  int textFieldLength = 15;  // in the dialogs
  int fieldLengthSum = 5; // in the sum field in the bottom of the primary field
  Dimension sizeSurfaceListWindow = new Dimension(600, 400);

  MyDecimalFormat outputFormat = new MyDecimalFormat(5,2); // see myLibrary
  NumberFormat currencyFormat = NumberFormat.getCurrencyInstance();
  MyNumberFormatInput numberFormat =  new MyNumberFormatInput(); // see myLibrary
}

⌨️ 快捷键说明

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