View Javadoc
1 /* 2 * MythSim 3 * 4 * Copyright (C) 2002-2004 Jason Vroustouris <jasonv@jasonv.com> 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation; either version 2 of the License, or 9 * (at your option) any later version. 10 * 11 * This program is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 * GNU General Public License for more details. 15 * 16 * You should have received a copy of the GNU General Public License 17 * along with this program; if not, write to the Free Software 18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 */ 20 21 package org.mythsim.swing.plugin; 22 import org.mythsim.swing.*; 23 import javax.swing.*; 24 import javax.swing.*; 25 import javax.swing.text.*; 26 import java.io.*; 27 import java.net.*; 28 import java.awt.*; 29 import java.util.regex.*; 30 31 /*** 32 * Shows the locations of all the windows on the screen (Debugging tool). 33 * @author Jason Vroustouris 34 */ 35 public class LocationFrame extends MythPlugInFrame { 36 MythPlugInFrame plugin[] = null; 37 public LocationFrame(MythSimSwing a, JFrame owner) { 38 super("Location Frame", // title 39 true, // resizable 40 true, // closable 41 true, // maximizable 42 true, // iconifiable 43 100, // set size x 44 100, // set size y 45 0, // set location x 46 300, // set location y 47 a, 48 owner); // MythSim object 49 //getContentPane().add(); 50 } 51 public void setup() { 52 } 53 public void setup(MythPlugInFrame a[]) { 54 plugin = a; 55 } 56 public void step() { 57 getContentPane().removeAll(); 58 getContentPane().setLayout(new GridLayout(plugin.length+1,5)); 59 getContentPane().add(new JLabel("Plugin")); 60 getContentPane().add(new JLabel("Width")); 61 getContentPane().add(new JLabel("Height")); 62 getContentPane().add(new JLabel("X")); 63 getContentPane().add(new JLabel("Y")); 64 for (int i=0; i<plugin.length; i++) { 65 getContentPane().add(new JLabel(" " + plugin[i].getTitle())); 66 getContentPane().add(new JLabel(" " + plugin[i].getWidth())); 67 getContentPane().add(new JLabel(" " + plugin[i].getHeight())); 68 getContentPane().add(new JLabel(" " + plugin[i].getX())); 69 getContentPane().add(new JLabel(" " + plugin[i].getY())); 70 } 71 getContentPane().repaint(); 72 setVisible(true); 73 } 74 75 76 }

This page was automatically generated by Maven