ij2x.plugin.frame
Class Editor

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by java.awt.Window
              extended by java.awt.Frame
                  extended by javax.swing.JFrame
                      extended by ij.plugin.frame.PlugInFrame
                          extended by ij2x.plugin.frame.Editor
All Implemented Interfaces:
MacroConstants, PlugIn, KeyCode, java.awt.datatransfer.ClipboardOwner, java.awt.event.FocusListener, java.awt.event.KeyListener, java.awt.event.MouseListener, java.awt.event.MouseWheelListener, java.awt.event.WindowListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible, javax.swing.event.DocumentListener, javax.swing.RootPaneContainer, javax.swing.WindowConstants

public class Editor
extends PlugInFrame
implements java.awt.event.MouseListener, java.awt.event.MouseWheelListener, java.awt.event.KeyListener, javax.swing.event.DocumentListener, java.awt.datatransfer.ClipboardOwner, MacroConstants, KeyCode

This is a simple TextArea based editor for editing and compiling plugins.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JFrame
javax.swing.JFrame.AccessibleJFrame
 
Nested classes/interfaces inherited from class java.awt.Frame
java.awt.Frame.AccessibleAWTFrame
 
Nested classes/interfaces inherited from class java.awt.Window
java.awt.Window.AccessibleAWTWindow
 
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
static java.lang.String abortmacroAction
           
static java.lang.String actionSuffix
          Suffix applied to the key used in resource file lookups for an action.
static java.lang.String compileandrunAction
           
static java.lang.String copyAction
           
static java.lang.String cutAction
           
static java.lang.String deleteAction
           
static java.lang.String evaluatelineAction
           
static java.lang.String exitAction
           
static java.lang.String findAction
           
static java.lang.String findnextAction
           
static java.lang.String gotolineAction
           
static java.lang.String imageSuffix
          Suffix applied to the key used in resource file lookups for an image.
static java.lang.String installmacrosAction
           
static java.lang.String labelSuffix
          Suffix applied to the key used in resource file lookups for a label.
static java.lang.String largerAction
           
static int MAX_MACROS
           
static int MAX_SIZE
           
static java.lang.String monospacedAction
           
static java.lang.String newAction
           
static java.lang.String openAction
           
static java.lang.String pasteAction
           
static java.lang.String printAction
           
static java.lang.String runmacroAction
           
static java.lang.String saveAction
           
static java.lang.String saveAsAction
           
static java.lang.String savesettingsAction
           
static java.lang.String smalerAction
           
static java.lang.String tipSuffix
          Suffix applied to the key used in resource file lookups for tooltip text.
protected  javax.swing.undo.UndoManager undo
          UndoManager that we add edits to.
protected  javax.swing.event.UndoableEditListener undoHandler
          Listener for the edits on the current document.
static java.lang.String undoSuffix
          Suffix applied to the key used in resource file lookups for an button enabled.
static int XINC
           
static int YINC
           
 
Fields inherited from class ij.plugin.frame.PlugInFrame
container
 
Fields inherited from class javax.swing.JFrame
accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled
 
Fields inherited from class java.awt.Frame
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface ij.macro.MacroConstants
ABS, ACOS, ARRAY, ARRAY_FUNC, ARRAY_FUNCTION, arrayFunctionIDs, arrayFunctions, ASIN, ATAN, ATAN2, AUTO_UPDATE, BEEP, BIT_DEPTH, CALCULATOR, CALIBRATE, CALL, CHANGE_VALUES, CHAR_CODE_AT, CLOSE, COS, D2S, DEBUG, DIALOG, DIV_EQUAL, DO, DO_COMMAND, DO_WAND, DRAW_LINE, DRAW_OVAL, DRAW_RECT, DRAW_STRING, DUMP, ELSE, ENDS_WITH, EOF, EQ, EVAL, EXEC, EXIT, EXP, EXT, FALSE, FILE, FILL, FILL_OVAL, FILL_RECT, FIT, FLOOD_FILL, FLOOR, FOR, FROM_CHAR_CODE, FUNCTION, functionIDs, functions, GET_ARGUMENT, GET_BOOLEAN, GET_BOUNDING_RECT, GET_BOUNDS, GET_COORDINATES, GET_COUNT, GET_CURSOR_LOC, GET_DATE_AND_TIME, GET_DIMENSIONS, GET_DIRECTORY, GET_DISPLAYED_AREA, GET_FILE_LIST, GET_FONT_LIST, GET_HEIGHT, GET_HISTOGRAM, GET_ID, GET_IMAGE_INFO, GET_INFO, GET_LINE, GET_LIST, GET_LOCATION_AND_SIZE, GET_LUT, GET_METADATA, GET_MIN_AND_MAX, GET_NUMBER, GET_PIXEL, GET_PIXEL_SIZE, GET_PROFILE, GET_RAW_STATISTICS, GET_RESULT, GET_RESULT_LABEL, GET_SLICE_NUMBER, GET_STATISTICS, GET_STRING, GET_STRING_WIDTH, GET_THRESHOLD, GET_TIME, GET_TITLE, GET_VALUE, GET_VERSION, GET_VOXEL_SIZE, GET_WIDTH, GET_ZOOM, GT, GTE, IF, IJ_CALL, INDEX_OF, INVERT, IS, IS_ACTIVE, IS_KEY_DOWN, IS_NAN, IS_OPEN, keywordIDs, keywords, LAST_INDEX_OF, LENGTH_OF, LINE_TO, LIST, LOG, LOGICAL_AND, LOGICAL_OR, LT, LTE, MACRO, MAKE_ELLIPSE, MAKE_LINE, MAKE_OVAL, MAKE_POINT, MAKE_POLYGON, MAKE_RECTANGLE, MAKE_SELECTION, MAKE_TEXT, MATCHES, MAX_OF, MIN_OF, MINUS_EQUAL, MINUS_MINUS, MOVE_TO, MUL_EQUAL, NaN, NEQ, NEW_ARRAY, NEW_IMAGE, NEW_MENU, NIMAGES, NOP, NRESULTS, NSLICES, NUMBER, NUMERIC_FUNCTION, numericFunctionIDs, numericFunctions, OPEN, OVERLAY, PARSE_FLOAT, PARSE_INT, PI, PLOT, PLUS_EQUAL, PLUS_PLUS, POW, PREDEFINED_FUNCTION, PRINT, PUT_PIXEL, RANDOM, RENAME, REPLACE, REQUIRES, RESET, RESET_MIN_MAX, RESET_THRESHOLD, RESTORE_PREVIOUS_TOOL, RESTORE_SETTINGS, RETURN, ROI_MANAGER, ROUND, RUN, RUN_MACRO, SAVE, SAVE_AS, SAVE_SETTINGS, SCREEN_HEIGHT, SCREEN_WIDTH, SELECT, SELECT_IMAGE, SELECTION_CONTAINS, SELECTION_NAME, SELECTION_TYPE, SET_AUTO_THRESHOLD, SET_BACKGROUND, SET_BATCH_MODE, SET_COLOR, SET_FONT, SET_FOREGROUND, SET_JUSTIFICATION, SET_KEY_DOWN, SET_LINE_WIDTH, SET_LOCATION, SET_LUT, SET_METADATA, SET_MIN_MAX, SET_OPTION, SET_PASTE_MODE, SET_PIXEL, SET_RESULT, SET_RGB_WEIGHTS, SET_SELECTION_LOC, SET_SELECTION_NAME, SET_SLICE, SET_THRESHOLD, SET_TOOL, SET_VOXEL_SIZE, SET_Z_COORDINATE, SETUP_UNDO, SHIFT_LEFT, SHIFT_RIGHT, SHOW_MESSAGE, SHOW_MESSAGE_WITH_CANCEL, SHOW_PROGRESS, SHOW_STATUS, SHOW_TEXT, SIN, SNAPSHOT, SPLIT, SQRT, STACK, STARTS_WITH, STRING, STRING_CONSTANT, STRING_FUNCTION, stringFunctionIDs, stringFunctions, SUBSTRING, TAN, TO_BINARY, TO_HEX, TO_LOWER_CASE, TO_STRING, TO_UPPER_CASE, TOK_MASK, TOK_SHIFT, TOOL_ID, TRUE, UPDATE_DISPLAY, UPDATE_RESULTS, USER_FUNCTION, VAR, WAIT, WAIT_FOR_USER, WHILE, WORD, WRITE
 
Fields inherited from interface ij2x.plugin.frame.KeyCode
shortcutKeyi, shortcutKeys
 
Fields inherited from interface javax.swing.WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
Editor()
           
 
Method Summary
 void changedUpdate(javax.swing.event.DocumentEvent e)
           
 void checkBox_itemStateChanged(java.awt.event.ItemEvent e)
           
 void close()
          Overrides close() in PlugInFrame.
 void create(java.lang.String name, java.lang.String text)
           
protected  java.beans.PropertyChangeListener createActionChangeListener(javax.swing.AbstractButton b)
           
protected  javax.swing.JCheckBoxMenuItem createCheckBoxMenuItem(java.lang.String cmd)
          This is the hook through which all menu items are created.
protected  javax.swing.text.JTextComponent createEditor()
          Create an editor to represent the given document.
 void createMacro(java.lang.String name, java.lang.String text)
           
protected  javax.swing.JMenu createMenu(java.lang.String key)
          Create a menu for the app.
protected  javax.swing.JMenuBar createMenubar()
          Create the menubar for the app.
protected  javax.swing.JMenuItem createMenuItem(java.lang.String cmd)
          This is the hook through which all menu items are created.
protected  javax.swing.JMenuItem createMenuItem(java.lang.String cmd, int shortcut, boolean shift)
          This is the hook through which all menu items are created.
protected  javax.swing.JPanel createStatusBar(javax.swing.JLabel label)
          Create a status bar
protected  java.awt.Component createTool(java.lang.String key, boolean isbutton)
          Hook through which every toolbar item is created.
protected  java.awt.Component createToolbarButton(java.lang.String key, boolean isbutton)
          Create a button to go inside of the toolbar.
 void display(java.lang.String title, java.lang.String text)
           
protected  javax.swing.Action getAction(java.lang.String cmd)
           
 javax.swing.Action[] getActions()
          Fetch the list of actions supported by this editor.
protected  javax.swing.text.JTextComponent getEditor()
          Fetch the editor contained in this panel
 java.awt.Insets getInset(int top, int left)
          Override Container getInsets() to make room for some text above the image.
protected  javax.swing.JMenuBar getMenubar()
           
protected  javax.swing.JMenuItem getMenuItem(java.lang.String cmd)
          Fetch the menu item that was created for the given command.
protected  java.net.URL getResource(java.lang.String key)
           
protected  java.lang.String getResourceString(java.lang.String nm)
           
 java.lang.String getText()
           
protected  java.awt.Container getToolbar()
           
 void insertUpdate(javax.swing.event.DocumentEvent e)
           
 void keyPressed(java.awt.event.KeyEvent e)
           
 void keyReleased(java.awt.event.KeyEvent e)
           
 void keyTyped(java.awt.event.KeyEvent e)
           
 void lostOwnership(java.awt.datatransfer.Clipboard clip, java.awt.datatransfer.Transferable cont)
           
 void mouseClicked(java.awt.event.MouseEvent e)
           
 void mouseEntered(java.awt.event.MouseEvent e)
           
 void mouseExited(java.awt.event.MouseEvent e)
           
 void mousePressed(java.awt.event.MouseEvent e)
           
 void mouseReleased(java.awt.event.MouseEvent e)
           
 void mouseWheelMoved(java.awt.event.MouseWheelEvent e)
           
 void open(java.lang.String dir, java.lang.String name)
           
 void paint(java.awt.Graphics g)
           
 void positionWindow()
           
 void removeUpdate(javax.swing.event.DocumentEvent e)
           
protected  void resetUndoManager()
          Resets the undo manager.
 void run(java.lang.String arg)
          This method is called when the plugin is loaded.
static void setDefaultDirectory(java.lang.String defaultDirectory)
           
 void setFont(java.awt.Font font)
           
 void setIsMacroWindow(boolean mw)
           
protected  java.lang.String[] tokenize(java.lang.String input)
          Take the given string and chop it up into a series of strings on whitespace boundaries.
 void update(java.awt.Graphics g)
           
 void updateClassName(java.lang.String oldName, java.lang.String newName)
          Changes a plugins class name to reflect a new file name.
 void windowActivated(java.awt.event.WindowEvent e)
          Override windowActivated in PlugInFrame to prevent Mac menu bar from being installed.
 void windowClosing(java.awt.event.WindowEvent e)
           
 
Methods inherited from class ij.plugin.frame.PlugInFrame
focusGained, focusLost, windowClosed, windowDeactivated, windowDeiconified, windowIconified, windowOpened
 
Methods inherited from class javax.swing.JFrame
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler
 
Methods inherited from class java.awt.Frame
addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setResizable, setState, setTitle, setUndecorated
 
Methods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOwnedWindows, getOwner, getOwnerlessWindows, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isShowing, pack, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setVisible, show, toBack, toFront
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, setBackground, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.awt.MenuContainer
getFont, postEvent
 

Field Detail

MAX_SIZE

public static final int MAX_SIZE
See Also:
Constant Field Values

MAX_MACROS

public static final int MAX_MACROS
See Also:
Constant Field Values

XINC

public static final int XINC
See Also:
Constant Field Values

YINC

public static final int YINC
See Also:
Constant Field Values

undoSuffix

public static final java.lang.String undoSuffix
Suffix applied to the key used in resource file lookups for an button enabled.

See Also:
Constant Field Values

imageSuffix

public static final java.lang.String imageSuffix
Suffix applied to the key used in resource file lookups for an image.

See Also:
Constant Field Values

labelSuffix

public static final java.lang.String labelSuffix
Suffix applied to the key used in resource file lookups for a label.

See Also:
Constant Field Values

actionSuffix

public static final java.lang.String actionSuffix
Suffix applied to the key used in resource file lookups for an action.

See Also:
Constant Field Values

tipSuffix

public static final java.lang.String tipSuffix
Suffix applied to the key used in resource file lookups for tooltip text.

See Also:
Constant Field Values

cutAction

public static final java.lang.String cutAction
See Also:
Constant Field Values

copyAction

public static final java.lang.String copyAction
See Also:
Constant Field Values

exitAction

public static final java.lang.String exitAction
See Also:
Constant Field Values

pasteAction

public static final java.lang.String pasteAction
See Also:
Constant Field Values

deleteAction

public static final java.lang.String deleteAction
See Also:
Constant Field Values

openAction

public static final java.lang.String openAction
See Also:
Constant Field Values

newAction

public static final java.lang.String newAction
See Also:
Constant Field Values

saveAction

public static final java.lang.String saveAction
See Also:
Constant Field Values

saveAsAction

public static final java.lang.String saveAsAction
See Also:
Constant Field Values

findAction

public static final java.lang.String findAction
See Also:
Constant Field Values

findnextAction

public static final java.lang.String findnextAction
See Also:
Constant Field Values

gotolineAction

public static final java.lang.String gotolineAction
See Also:
Constant Field Values

compileandrunAction

public static final java.lang.String compileandrunAction
See Also:
Constant Field Values

printAction

public static final java.lang.String printAction
See Also:
Constant Field Values

savesettingsAction

public static final java.lang.String savesettingsAction
See Also:
Constant Field Values

monospacedAction

public static final java.lang.String monospacedAction
See Also:
Constant Field Values

smalerAction

public static final java.lang.String smalerAction
See Also:
Constant Field Values

largerAction

public static final java.lang.String largerAction
See Also:
Constant Field Values

runmacroAction

public static final java.lang.String runmacroAction
See Also:
Constant Field Values

evaluatelineAction

public static final java.lang.String evaluatelineAction
See Also:
Constant Field Values

abortmacroAction

public static final java.lang.String abortmacroAction
See Also:
Constant Field Values

installmacrosAction

public static final java.lang.String installmacrosAction
See Also:
Constant Field Values

undoHandler

protected javax.swing.event.UndoableEditListener undoHandler
Listener for the edits on the current document.


undo

protected javax.swing.undo.UndoManager undo
UndoManager that we add edits to.

Constructor Detail

Editor

public Editor()
Method Detail

run

public void run(java.lang.String arg)
Description copied from interface: PlugIn
This method is called when the plugin is loaded. 'arg', which may be blank, is the argument specified for this plugin in IJ_Props.txt.

Specified by:
run in interface PlugIn
Overrides:
run in class PlugInFrame

getInset

public java.awt.Insets getInset(int top,
                                int left)
Override Container getInsets() to make room for some text above the image.


createEditor

protected javax.swing.text.JTextComponent createEditor()
Create an editor to represent the given document.


getEditor

protected javax.swing.text.JTextComponent getEditor()
Fetch the editor contained in this panel


getActions

public javax.swing.Action[] getActions()
Fetch the list of actions supported by this editor. It is implemented to return the list of actions supported by the embedded JTextComponent augmented with the actions defined locally.


getAction

protected javax.swing.Action getAction(java.lang.String cmd)

getResourceString

protected java.lang.String getResourceString(java.lang.String nm)

createStatusBar

protected javax.swing.JPanel createStatusBar(javax.swing.JLabel label)
Create a status bar


getToolbar

protected java.awt.Container getToolbar()

getMenubar

protected javax.swing.JMenuBar getMenubar()

getMenuItem

protected javax.swing.JMenuItem getMenuItem(java.lang.String cmd)
Fetch the menu item that was created for the given command.

Parameters:
cmd - Name of the action.

getResource

protected java.net.URL getResource(java.lang.String key)

tokenize

protected java.lang.String[] tokenize(java.lang.String input)
Take the given string and chop it up into a series of strings on whitespace boundaries. This is useful for trying to get an array of strings out of the resource file.


resetUndoManager

protected void resetUndoManager()
Resets the undo manager.


createTool

protected java.awt.Component createTool(java.lang.String key,
                                        boolean isbutton)
Hook through which every toolbar item is created.


createToolbarButton

protected java.awt.Component createToolbarButton(java.lang.String key,
                                                 boolean isbutton)
Create a button to go inside of the toolbar. By default this will load an image resource. The image filename is relative to the classpath (including the '.' directory if its a part of the classpath), and may either be in a JAR file or a separate file.

Parameters:
key - The key in the resource file to serve as the basis of lookups.

createMenubar

protected javax.swing.JMenuBar createMenubar()
Create the menubar for the app. By default this pulls the definition of the menu from the associated resource file.


createMenu

protected javax.swing.JMenu createMenu(java.lang.String key)
Create a menu for the app. By default this pulls the definition of the menu from the associated resource file.


createMenuItem

protected javax.swing.JMenuItem createMenuItem(java.lang.String cmd)
This is the hook through which all menu items are created. It registers the result with the menuitem hashtable so that it can be fetched with getMenuItem().

See Also:
getMenuItem(java.lang.String)

createCheckBoxMenuItem

protected javax.swing.JCheckBoxMenuItem createCheckBoxMenuItem(java.lang.String cmd)
This is the hook through which all menu items are created. It registers the result with the menuitem hashtable so that it can be fetched with getMenuItem().

See Also:
getMenuItem(java.lang.String)

createMenuItem

protected javax.swing.JMenuItem createMenuItem(java.lang.String cmd,
                                               int shortcut,
                                               boolean shift)
This is the hook through which all menu items are created. It registers the result with the menuitem hashtable so that it can be fetched with getMenuItem().

See Also:
getMenuItem(java.lang.String)

createActionChangeListener

protected java.beans.PropertyChangeListener createActionChangeListener(javax.swing.AbstractButton b)

positionWindow

public void positionWindow()

create

public void create(java.lang.String name,
                   java.lang.String text)

createMacro

public void createMacro(java.lang.String name,
                        java.lang.String text)

open

public void open(java.lang.String dir,
                 java.lang.String name)

getText

public java.lang.String getText()

display

public void display(java.lang.String title,
                    java.lang.String text)

updateClassName

public void updateClassName(java.lang.String oldName,
                            java.lang.String newName)
Changes a plugins class name to reflect a new file name.


setFont

public void setFont(java.awt.Font font)
Overrides:
setFont in class java.awt.Container

setDefaultDirectory

public static void setDefaultDirectory(java.lang.String defaultDirectory)

checkBox_itemStateChanged

public void checkBox_itemStateChanged(java.awt.event.ItemEvent e)

setIsMacroWindow

public void setIsMacroWindow(boolean mw)

lostOwnership

public void lostOwnership(java.awt.datatransfer.Clipboard clip,
                          java.awt.datatransfer.Transferable cont)
Specified by:
lostOwnership in interface java.awt.datatransfer.ClipboardOwner

insertUpdate

public void insertUpdate(javax.swing.event.DocumentEvent e)
Specified by:
insertUpdate in interface javax.swing.event.DocumentListener

removeUpdate

public void removeUpdate(javax.swing.event.DocumentEvent e)
Specified by:
removeUpdate in interface javax.swing.event.DocumentListener

changedUpdate

public void changedUpdate(javax.swing.event.DocumentEvent e)
Specified by:
changedUpdate in interface javax.swing.event.DocumentListener

close

public void close()
Overrides close() in PlugInFrame.

Overrides:
close in class PlugInFrame

windowActivated

public void windowActivated(java.awt.event.WindowEvent e)
Override windowActivated in PlugInFrame to prevent Mac menu bar from being installed.

Specified by:
windowActivated in interface java.awt.event.WindowListener
Overrides:
windowActivated in class PlugInFrame

windowClosing

public void windowClosing(java.awt.event.WindowEvent e)
Specified by:
windowClosing in interface java.awt.event.WindowListener
Overrides:
windowClosing in class PlugInFrame

mousePressed

public void mousePressed(java.awt.event.MouseEvent e)
Specified by:
mousePressed in interface java.awt.event.MouseListener

mouseExited

public void mouseExited(java.awt.event.MouseEvent e)
Specified by:
mouseExited in interface java.awt.event.MouseListener

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent e)
Specified by:
mouseReleased in interface java.awt.event.MouseListener

mouseClicked

public void mouseClicked(java.awt.event.MouseEvent e)
Specified by:
mouseClicked in interface java.awt.event.MouseListener

mouseEntered

public void mouseEntered(java.awt.event.MouseEvent e)
Specified by:
mouseEntered in interface java.awt.event.MouseListener

mouseWheelMoved

public void mouseWheelMoved(java.awt.event.MouseWheelEvent e)
Specified by:
mouseWheelMoved in interface java.awt.event.MouseWheelListener

keyPressed

public void keyPressed(java.awt.event.KeyEvent e)
Specified by:
keyPressed in interface java.awt.event.KeyListener

keyReleased

public void keyReleased(java.awt.event.KeyEvent e)
Specified by:
keyReleased in interface java.awt.event.KeyListener

keyTyped

public void keyTyped(java.awt.event.KeyEvent e)
Specified by:
keyTyped in interface java.awt.event.KeyListener

update

public void update(java.awt.Graphics g)
Overrides:
update in class javax.swing.JFrame

paint

public void paint(java.awt.Graphics g)
Overrides:
paint in class java.awt.Window