|
What this is
Other links
The source code/* * 18:55:56 20/01/00 * * HyperTyperPlugin.java - extends the FastTyper capabilities of Jext * Copyright (C) 2000 Romain Guy, Matt Albrecht * powerteam@chez.com * www.chez.com/powerteam * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ import org.jext.*; import org.jext.event.*; import org.jext.options.*; import java.util.Vector; /** * The Plugin HyperTyper class handles the "when" adjustments of state - * i.e. it handles the registering of event listening. */ public class HyperTyperPlugin implements Plugin, JextListener { protected static final String PROP_NAME = "hyper_typer"; protected static final String PROP_TITLE = PROP_NAME + ".title"; protected static final String PROP_KEYBIND = PROP_NAME + ".keybinding"; protected static final String PROP_MENU = PROP_NAME + ".menu"; private transient boolean htWindowNotStarted = true; public static HyperTyperObjectManager htOMan; private static boolean autoExpand = false; public static boolean isAutoExpandOn() { return autoExpand; } /** * Default constructor. */ public HyperTyperPlugin() { // do nothing } /** * Called when the plugin is to initialize itself. */ public void start() { this.htOMan = new HyperTyperObjectManager(); autoExpand = "on".equals(Jext.getProperty("hyper_typer.autoExpand")); // add controls Jext.addAction( this.htOMan.getHotkey() ); Jext.addAction( this.htOMan.getWindowGUI() ); //Jext.addAction( ); //Jext.addAction( ); // Starting up the KeyBinding for the HyperTyperAction is in // the Option pane, since it is in charge of changing it // if the user modifies the options. } /** * Called when the plugin is to shutdown. */ public void stop() { // Shutdown the dynamic data correctly // and close the window this.htOMan.stop(); this.htOMan = null; } public void createOptionPanes( OptionsDialog parent ) { // make sure to create pane on demand, not on creation parent.addOptionPane( this.htOMan.getOptionPane() ); } /** * Add a submenu * menus.addElement(GUIUtilities.loadMenu("menu_name"); * Add an item * items.addElement(GUIUtilities.loadMenuItem("action_name"); * |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2024 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.