|
||||||||||
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
ij.plugin.frame.Editor
public class Editor
This is a simple TextArea based editor for editing and compiling plugins.
Nested Class Summary | |
---|---|
class |
Editor.JEditor
|
class |
Editor.JSyntaxStyleTree
|
Nested classes/interfaces inherited from class java.awt.Component |
---|
java.awt.Component.BaselineResizeBehavior |
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 |
editAction
|
static java.lang.String |
evaluatelineAction
|
static java.lang.String |
exitAction
|
static java.lang.String |
findAction
|
static java.lang.String |
findnextAction
|
static Editor |
focusedComponent
|
static java.lang.String |
gotobeginlineAction
|
static java.lang.String |
gotoendlineAction
|
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 |
JavaScriptIncludes
ImportPackage statements added in front of scripts. |
static java.lang.String |
JS_NOT_FOUND
|
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 |
MACROS_MENU_ITEMS
|
static int |
MAX_MACROS
|
static int |
MAX_SIZE
|
static int |
MENU_BAR
|
static int |
MONOSPACED
|
static java.lang.String |
monospacedAction
|
static java.lang.String |
newAction
|
static java.lang.String |
nonSelectAction
|
static java.lang.String |
openAction
|
static java.lang.String |
pasteAction
|
static java.lang.String |
printAction
|
int |
row
|
static java.lang.String |
runappAction
|
static java.lang.String |
runmacroAction
|
static java.lang.String |
saveAction
|
static java.lang.String |
saveAsAction
|
static java.lang.String |
savesettingsAction
|
static java.lang.String |
selectAllAction
|
static java.lang.String |
smalerAction
|
static java.lang.String |
tipSuffix
Suffix applied to the key used in resource file lookups for tooltip text. |
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 javax.swing.JFrame |
---|
EXIT_ON_CLOSE |
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 | |
---|---|
Editor()
|
Method Summary | |
---|---|
static void |
addMode(Mode mode)
Do not call this method. |
void |
addOpenRecentDefaultItem(javax.swing.JMenu recentMenu,
int count)
|
void |
addOpenRecentItem(java.lang.String path)
Adds a file path to the beginning of the File/Open Recent submenu. |
void |
caretUpdate(javax.swing.event.CaretEvent e)
Override caret listener method |
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)
|
void |
createMacro(java.lang.String name,
java.lang.String text)
|
static void |
display(java.lang.String title,
java.lang.String text,
java.lang.String fileName)
|
boolean |
fileChanged()
|
void |
findCaretPos()
|
int |
getDocLength()
|
java.awt.Insets |
getInsets()
Override Container getInsets() to make room for some text above the image. |
static Editor |
getInstance()
|
static java.lang.String |
getJSPrefix(java.lang.String arg)
|
static Mode |
getMode(java.lang.String name)
Returns the edit mode with the specified name. |
static Mode[] |
getModes()
Returns an array of installed edit modes. |
static java.util.Properties |
getProperties()
Returns the properties object which contains all known jEdit properties. |
static java.lang.String |
getProperty(java.lang.String name)
Fetches a property, returning null if it's not defined. |
static java.lang.String |
getProperty(java.lang.String name,
java.lang.Object[] args)
Returns the property with the specified name. |
static java.lang.String |
getProperty(java.lang.String name,
java.lang.String def)
Fetches a property, returning the default value if it's not defined. |
java.lang.String |
getText()
|
void |
insertUpdate(javax.swing.event.DocumentEvent e)
|
void |
keyPressed(java.awt.event.KeyEvent e)
Override key listener methods |
void |
keyReleased(java.awt.event.KeyEvent e)
|
void |
keyTyped(java.awt.event.KeyEvent e)
|
static void |
loadMode(Mode mode)
|
void |
lostOwnership(java.awt.datatransfer.Clipboard clip,
java.awt.datatransfer.Transferable cont)
|
void |
mouseClicked(java.awt.event.MouseEvent e)
|
void |
mouseDragged(java.awt.event.MouseEvent e)
Override mouse motionlistener methods |
void |
mouseEntered(java.awt.event.MouseEvent e)
|
void |
mouseExited(java.awt.event.MouseEvent e)
|
void |
mouseMoved(java.awt.event.MouseEvent e)
|
void |
mousePressed(java.awt.event.MouseEvent e)
Override mouse listener methods |
void |
mouseReleased(java.awt.event.MouseEvent e)
|
void |
mouseWheelMoved(java.awt.event.MouseWheelEvent e)
Override mouse wheellistener method |
void |
open(java.lang.String dir,
java.lang.String fileName)
|
void |
paint(java.awt.Graphics g)
|
void |
positionWindow()
|
static void |
reloadModes()
Reloads all edit modes. |
void |
removeUpdate(javax.swing.event.DocumentEvent e)
|
void |
run()
|
void |
run(java.lang.String arg)
This method is called when the plugin is loaded. |
boolean |
saveChangesDialog()
|
static void |
savePreferences(java.util.Properties prefs)
Called once when ImageJ quits. |
static void |
setDefaultDirectory(java.lang.String defaultDirectory)
|
void |
setFont(java.awt.Font font)
|
void |
setIsMacroWindow(boolean mw)
|
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 |
windowClosed(java.awt.event.WindowEvent e)
|
void |
windowClosing(java.awt.event.WindowEvent e)
|
void |
windowDeactivated(java.awt.event.WindowEvent e)
|
void |
windowDeiconified(java.awt.event.WindowEvent e)
|
void |
windowIconified(java.awt.event.WindowEvent e)
|
void |
windowOpened(java.awt.event.WindowEvent e)
|
Methods inherited from class ij.plugin.frame.PlugInFrame |
---|
focusGained, focusLost |
Methods inherited from class javax.swing.JFrame |
---|
getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, 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, 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, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, transferFocusBackward, transferFocusDownCycle, validate |
Methods inherited from class java.awt.Component |
---|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, dispatchEvent, enable, enable, enableInputMethods, 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, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, 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 |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.awt.MenuContainer |
---|
getFont, postEvent |
Field Detail |
---|
public static java.lang.String JavaScriptIncludes
public static java.lang.String JS_NOT_FOUND
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 int MONOSPACED
public static final int MENU_BAR
public static final int MACROS_MENU_ITEMS
public int row
public static Editor focusedComponent
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 pasteAction
public static final java.lang.String deleteAction
public static final java.lang.String editAction
public static final java.lang.String selectAllAction
public static final java.lang.String nonSelectAction
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 gotobeginlineAction
public static final java.lang.String gotoendlineAction
public static final java.lang.String gotolineAction
public static final java.lang.String compileandrunAction
public static final java.lang.String runappAction
public static final java.lang.String printAction
public static final java.lang.String exitAction
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
Constructor Detail |
---|
public Editor()
Method Detail |
---|
public void run(java.lang.String arg)
PlugIn
run
in interface PlugIn
run
in class PlugInFrame
public void run()
public java.awt.Insets getInsets()
getInsets
in class java.awt.Container
public void addOpenRecentItem(java.lang.String path)
public void addOpenRecentDefaultItem(javax.swing.JMenu recentMenu, int count)
public void positionWindow()
public void create(java.lang.String name, java.lang.String text)
public void findCaretPos()
public void createMacro(java.lang.String name, java.lang.String text)
public void open(java.lang.String dir, java.lang.String fileName)
public java.lang.String getText()
public int getDocLength()
public static void display(java.lang.String title, java.lang.String text, java.lang.String fileName)
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 static java.lang.String getJSPrefix(java.lang.String arg)
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 boolean saveChangesDialog()
public boolean fileChanged()
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 windowOpened(java.awt.event.WindowEvent e)
windowOpened
in interface java.awt.event.WindowListener
windowOpened
in class PlugInFrame
public void windowClosed(java.awt.event.WindowEvent e)
windowClosed
in interface java.awt.event.WindowListener
windowClosed
in class PlugInFrame
public void windowIconified(java.awt.event.WindowEvent e)
windowIconified
in interface java.awt.event.WindowListener
windowIconified
in class PlugInFrame
public void windowDeiconified(java.awt.event.WindowEvent e)
windowDeiconified
in interface java.awt.event.WindowListener
windowDeiconified
in class PlugInFrame
public void windowDeactivated(java.awt.event.WindowEvent e)
windowDeactivated
in interface java.awt.event.WindowListener
windowDeactivated
in class PlugInFrame
public void mousePressed(java.awt.event.MouseEvent e)
mousePressed
in interface java.awt.event.MouseListener
public void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased
in interface java.awt.event.MouseListener
public void mouseEntered(java.awt.event.MouseEvent e)
mouseEntered
in interface java.awt.event.MouseListener
public void mouseExited(java.awt.event.MouseEvent e)
mouseExited
in interface java.awt.event.MouseListener
public void mouseClicked(java.awt.event.MouseEvent e)
mouseClicked
in interface java.awt.event.MouseListener
public void mouseDragged(java.awt.event.MouseEvent e)
mouseDragged
in interface java.awt.event.MouseMotionListener
public void mouseMoved(java.awt.event.MouseEvent e)
mouseMoved
in interface java.awt.event.MouseMotionListener
public void mouseWheelMoved(java.awt.event.MouseWheelEvent e)
mouseWheelMoved
in interface java.awt.event.MouseWheelListener
public static void savePreferences(java.util.Properties prefs)
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 caretUpdate(javax.swing.event.CaretEvent e)
caretUpdate
in interface javax.swing.event.CaretListener
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
public static final java.util.Properties getProperties()
public static final java.lang.String getProperty(java.lang.String name)
name
- The propertypublic static final java.lang.String getProperty(java.lang.String name, java.lang.String def)
name
- The propertydef
- The default valuepublic static final java.lang.String getProperty(java.lang.String name, java.lang.Object[] args)
The elements of the args
array are substituted
into the value of the property in place of strings of the
form {n}
, where n
is an index
in the array.
You can find out more about this feature by reading the
documentation for the format
method of the
java.text.MessageFormat
class.
name
- The propertyargs
- The positional parameterspublic static void reloadModes()
public static void addMode(Mode mode)
mode
- The edit modepublic static Mode getMode(java.lang.String name)
name
- The edit modepublic static Mode[] getModes()
public static void loadMode(Mode mode)
public static Editor getInstance()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |