/* The contents of this file are subject to the AMP Open Community License Version 1.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License on the AMP web site (http://www.tibet.iteso.mx/Guatemala/). Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific terms governing rights and limitations under the License. The Initial Developer of this software is Andres Montano Pellegrini. Portions created by Andres Montano Pellegrini are Copyright 2001 Andres Montano Pellegrini. All Rights Reserved. Contributor(s): ______________________________________. */ package org.thdl.tib.scanner; import java.awt.BorderLayout; import java.awt.Button; import java.awt.Choice; import java.awt.Dialog; import java.awt.Dimension; import java.awt.FlowLayout; import java.awt.Frame; import java.awt.GraphicsEnvironment; import java.awt.GridLayout; import java.awt.Label; import java.awt.Panel; import java.awt.Toolkit; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.ItemEvent; import java.awt.event.ItemListener; class PocketPreferenceWindow extends Dialog implements ActionListener, ItemListener { private Frame owner; private Choice chFontNames, fontSizes, paneRows, parsePaneCols; private Button ok, cancel; private boolean gotStuff, landscape; PocketPreferenceWindow(Frame owner, boolean landscape) { super(owner, "Preferences", true); String s; this.setFont(WindowScannerFilter.getTHDLFont()); this.owner = owner; this.landscape = landscape; Dimension d = Toolkit.getDefaultToolkit().getScreenSize(); this.setSize(d); this.gotStuff = false; GraphicsEnvironment genv = GraphicsEnvironment.getLocalGraphicsEnvironment(); String[] fontNames = genv.getAvailableFontFamilyNames(); Panel p1, p2; p1 = new Panel(new BorderLayout()); p1.add(new Label("Font: "), BorderLayout.WEST); chFontNames = new Choice(); int i; chFontNames.add(""); for (i=0; i