|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
java.awt.Window
java.awt.Frame
javax.swing.JFrame
ij.plugin.frame.PlugInFrame
ij2x.plugin.frame.MonoEditor
public class MonoEditor
This is a simple TextArea based editor for editing and compiling plugins.
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.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 | |
---|---|
MonoEditor()
|
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 |
---|
public static final int MAX_SIZE
public static final int MAX_MACROS
public static final int XINC
public static final int YINC
public static final java.lang.String undoSuffix
public static final java.lang.String imageSuffix
public static final java.lang.String labelSuffix
public static final java.lang.String actionSuffix
public static final java.lang.String tipSuffix
public static final java.lang.String cutAction
public static final java.lang.String copyAction
public static final java.lang.String exitAction
public static final java.lang.String pasteAction
public static final java.lang.String deleteAction
public static final java.lang.String openAction
public static final java.lang.String newAction
public static final java.lang.String saveAction
public static final java.lang.String saveAsAction
public static final java.lang.String findAction
public static final java.lang.String findnextAction
public static final java.lang.String gotolineAction
public static final java.lang.String compileandrunAction
public static final java.lang.String printAction
public static final java.lang.String savesettingsAction
public static final java.lang.String monospacedAction
public static final java.lang.String smalerAction
public static final java.lang.String largerAction
public static final java.lang.String runmacroAction
public static final java.lang.String evaluatelineAction
public static final java.lang.String abortmacroAction
public static final java.lang.String installmacrosAction
protected javax.swing.event.UndoableEditListener undoHandler
protected javax.swing.undo.UndoManager undo
Constructor Detail |
---|
public MonoEditor()
Method Detail |
---|
public void run(java.lang.String arg)
PlugIn
run
in interface PlugIn
run
in class PlugInFrame
public java.awt.Insets getInset(int top, int left)
protected javax.swing.text.JTextComponent createEditor()
protected javax.swing.text.JTextComponent getEditor()
public javax.swing.Action[] getActions()
protected javax.swing.Action getAction(java.lang.String cmd)
protected java.lang.String getResourceString(java.lang.String nm)
protected javax.swing.JPanel createStatusBar(javax.swing.JLabel label)
protected java.awt.Container getToolbar()
protected javax.swing.JMenuBar getMenubar()
protected javax.swing.JMenuItem getMenuItem(java.lang.String cmd)
cmd
- Name of the action.protected java.net.URL getResource(java.lang.String key)
protected java.lang.String[] tokenize(java.lang.String input)
protected void resetUndoManager()
protected java.awt.Component createTool(java.lang.String key, boolean isbutton)
protected java.awt.Component createToolbarButton(java.lang.String key, boolean isbutton)
key
- The key in the resource file to serve as the basis
of lookups.protected javax.swing.JMenuBar createMenubar()
protected javax.swing.JMenu createMenu(java.lang.String key)
protected javax.swing.JMenuItem createMenuItem(java.lang.String cmd)
getMenuItem(java.lang.String)
protected javax.swing.JCheckBoxMenuItem createCheckBoxMenuItem(java.lang.String cmd)
getMenuItem(java.lang.String)
protected javax.swing.JMenuItem createMenuItem(java.lang.String cmd, int shortcut, boolean shift)
getMenuItem(java.lang.String)
protected java.beans.PropertyChangeListener createActionChangeListener(javax.swing.AbstractButton b)
public void positionWindow()
public void create(java.lang.String name, java.lang.String text)
public void createMacro(java.lang.String name, java.lang.String text)
public void open(java.lang.String dir, java.lang.String name)
public java.lang.String getText()
public void display(java.lang.String title, java.lang.String text)
public void updateClassName(java.lang.String oldName, java.lang.String newName)
public void setFont(java.awt.Font font)
setFont
in class java.awt.Container
public static void setDefaultDirectory(java.lang.String defaultDirectory)
public void checkBox_itemStateChanged(java.awt.event.ItemEvent e)
public void setIsMacroWindow(boolean mw)
public void lostOwnership(java.awt.datatransfer.Clipboard clip, java.awt.datatransfer.Transferable cont)
lostOwnership
in interface java.awt.datatransfer.ClipboardOwner
public void insertUpdate(javax.swing.event.DocumentEvent e)
insertUpdate
in interface javax.swing.event.DocumentListener
public void removeUpdate(javax.swing.event.DocumentEvent e)
removeUpdate
in interface javax.swing.event.DocumentListener
public void changedUpdate(javax.swing.event.DocumentEvent e)
changedUpdate
in interface javax.swing.event.DocumentListener
public void close()
close
in class PlugInFrame
public void windowActivated(java.awt.event.WindowEvent e)
windowActivated
in interface java.awt.event.WindowListener
windowActivated
in class PlugInFrame
public void windowClosing(java.awt.event.WindowEvent e)
windowClosing
in interface java.awt.event.WindowListener
windowClosing
in class PlugInFrame
public void mousePressed(java.awt.event.MouseEvent e)
mousePressed
in interface java.awt.event.MouseListener
public void mouseExited(java.awt.event.MouseEvent e)
mouseExited
in interface java.awt.event.MouseListener
public void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased
in interface java.awt.event.MouseListener
public void mouseClicked(java.awt.event.MouseEvent e)
mouseClicked
in interface java.awt.event.MouseListener
public void mouseEntered(java.awt.event.MouseEvent e)
mouseEntered
in interface java.awt.event.MouseListener
public void mouseWheelMoved(java.awt.event.MouseWheelEvent e)
mouseWheelMoved
in interface java.awt.event.MouseWheelListener
public void keyPressed(java.awt.event.KeyEvent e)
keyPressed
in interface java.awt.event.KeyListener
public void keyReleased(java.awt.event.KeyEvent e)
keyReleased
in interface java.awt.event.KeyListener
public void keyTyped(java.awt.event.KeyEvent e)
keyTyped
in interface java.awt.event.KeyListener
public void update(java.awt.Graphics g)
update
in class javax.swing.JFrame
public void paint(java.awt.Graphics g)
paint
in class java.awt.Window
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |