MacroTracker Toolkit
The MacroTracker Toolkit is a toolkit that adds onto the Java JFC GUI Toolkit. It helps fix some of the problems and limitations with the Java toolkit. This toolkit is available for download for use in other applications. To obtain the source code, see the Source page.
A description of each of the classes is below:
| org.mozdev.MacroTracker.toolkit | |
|---|---|
| GridBagPanel | A panel that integrates itself with the GridBagLayout. It simplifies the layout by allowing you to specify which cell it goes in and which cells overlap. |
| MBoldLabel | A JLabel that is highlighted on the screen (basically meaning that the font is set to Bold by default). |
| MComboBox | A special class that is basically a JList and JComboBox merged into one. It supports multiple items being displayed as well as adding items at runtime. Not sure why this isn't included in the current Java JFC toolkit. |
| MHyperlinkLabel | A JLabel that is always underlined and blue. If you include the MacroTracker frmMiniBrowser class, you can take a URL into the constructor and it will automatically load it into the minibrowser when the label is clicked. |
| MMenuBuilder | Lets you build a menubar with as little code as possible. |
| MMenuItem | This is designed for Menu items that you wish to have an image for. Instead of playing around with ImageIcons as you would with the current JMenuItem, you just take in a image URI as the second parameter in the constructor and it does all the work for you! |
| MPropertiesTable | A table full of properties. This simulates the Visual Basic 6 properties bar. The contents of this class are already contained in a JScrollPane appropriate for optimal viewing. |
| MRadioButton | Basically a JRadioButton with the ability to takein iMacroEvents and execute them using a function. This is useful in the sense that you could make a field of a class change when the Apply button is hit. It may sound strange, but it was amazingly useful. |
| MScrollPane | A JScrollPane that (in simple terms) makes all the items inside of it in a FlowLayout. This is useful if you want create a complex layout and you want to use a JScrollPane for multiple GUI components. |
| MTextArea | Adds a right-click menu to a JTextArea that gives the user options that are common to most Windows text box right-click menus. Also adds an undo(), redo(), canUndo(), and canRedo() function for undo/redo support. |
| MTextField | Basically the same as MTextArea except it uses a JTextField instead of a JTextArea to add the extra features too. |
| MTitlePanel | A JPanel that is displayed like a Visual Studio .NET GroupBox control. The String taken in through the constructor is the frame's title. |
| MToolbarButton | Similar to MMenuItem except it is for a toolbar button! Takes in a large image and a small image through the constructor, and you can use the constants to swap between large and small images for the button. The swap between Text, Images, and Images and Text don't currently work ;(. |
| MToolbar | A toolbar for MToolbarButtons that provides features for changing the button mode for all the MToolbarButtons on the toolbar. Not designed to be used with JButton's. A right-click menu to change these viewing options is also available to the user. |
| org.mozdev.MacroTracker.toolkit.DataStructures | |
| NotifiableList | A standard List that calls an event whenever a list item is modified/added/removed. The type of list used is taken into the constructor. You use the public EventManager variable to add events to be fired. |
| SuperSet | A TreeSet with a get function. The function returns the object at an index number. Unlike what you think, getting an item is constant performance, but adding/removing items are much slower. |
| org.mozdev.MacroTracker.toolkit.event | |
| EventManager | Basic event manager for events. Takes in an event into the Java 1.5 bracket features (ex. EventManager) and takes in the function to run into the constructor. If you wish to pass any parameters to this function, you pass them through an Array of objects as the parameter for the run() function, which you use to fire your event. |
| iEvent | A event that is designed to be ran when the user hits the Apply button, but can be used for anything you would like to track. |
| iListChangeEvent | The event that is ran when a NotifiableList has an item added/removed/modified. |
| iPropertyChangeEvent | The event that is ran when a property is changed in a MPropertyTable. |
| org.mozdev.MacroTracker.toolkit.exceptions | |
| NoSuchPropertyException | An exception thrown when you try to modify a property that doesn't exist in a MPropertyTable. |
| org.mozdev.MacroTracker.toolkit.registry | |
| MRegistry | Basically a simluation of the Windows system registry. It takes in a file to story registry entries in, and whenever you add or modify a entry, the entries are resaved to the file taken in through the constructor. If that file taken in did exist, the settings are automatically loaded into the class. If the file does not exist, the file is created and you can start adding settings. |
| org.mozdev.MacroTracker.toolkit.ui | |
| frmMiniBrowser | A primitive browser window to display a website in. Takes in a website through the constructor and loads it using the standard Java HTML rendering engine (yeah it sucks, I know). You can use this with MHyperlinkLabel to display a website whenever a label is clicked. |
Download
MacroTracker toolkit files come with a JAR file with the classes and JavaDoc information. These files are in the ZIP format. Once you have the JAR file in your classpath, you can use the classes from the packages noted above.
Note that in order to keep the size of the toolkit files small, no debugging information comes with these toolkit files. You shouldn't need such information, but if you do you can compile your own from source.
Download MacroTracker Toolkit 1.0
Questions or comments? Email R.J. Keller.
If you have questions or comments about MacroTracker, please send a message to the MacroTracker mailing list.
Copyright © 2003-2004. All rights reserved.