|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component java.awt.Container java.awt.Window java.awt.Frame javax.swing.JFrame processing.app.Editor
public class Editor
Main editor panel for the Processing Development Environment.
Field Summary |
---|
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 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(Base ibase,
java.lang.String path,
int[] location)
|
Method Summary | |
---|---|
int |
getCaretOffset()
Get the position (character offset) of the caret. |
int |
getLineCount()
Get the number of lines in the currently displayed buffer. |
int |
getLineStartOffset(int line)
Get character offset for the start of a given line of text. |
int |
getLineStopOffset(int line)
Get character offset for end of a given line of text. |
java.lang.String |
getLineText(int line)
Get text for a specified line. |
java.awt.Dimension |
getMinimumSize()
Hack for #@#)$(* Mac OS X 10.2. |
int |
getScrollPosition()
|
java.lang.String |
getSelectedText()
Called to update the text but not switch to a different set of code (which would affect the undo manager). |
int |
getSelectionStart()
Get the beginning point of the current selection. |
int |
getSelectionStop()
Get the end point of the current selection. |
Sketch |
getSketch()
Gets the current sketch object. |
java.awt.Point |
getSketchLocation()
Get the last location of the sketch's run window. |
java.lang.String |
getText()
Get the contents of the current buffer. |
java.lang.String |
getText(int start,
int stop)
Get a range of text from the current buffer. |
JEditTextArea |
getTextArea()
Get the JEditTextArea object for use (not recommended). |
void |
handleCopy()
Implements Edit → Copy. |
void |
handleCut()
Implements Edit → Cut. |
void |
handleExport()
Called by Sketch → Export. |
void |
handleExportApplication()
Handler for Sketch → Export Application |
void |
handlePageSetup()
Handler for File → Page Setup. |
void |
handlePaste()
Implements Edit → Paste. |
void |
handlePrint()
Handler for File → Print. |
void |
handleRun(boolean present)
Implements Sketch → Run. |
boolean |
handleSave(boolean immediately)
Actually handle the save command. |
boolean |
handleSaveAs()
|
void |
handleSelectAll()
Implements Edit → Select All. |
void |
handleStop()
Implements Sketch → Stop, or pressing Stop on the toolbar. |
void |
insertText(java.lang.String what)
|
void |
internalCloseRunner()
Handle internal shutdown of the runner. |
void |
internalRunnerClosed()
Called by Runner to notify that the sketch has stopped running. |
boolean |
isSelectionActive()
True if some text is currently selected. |
static javax.swing.JMenuItem |
newJMenuItem(java.lang.String title,
int what)
A software engineer, somewhere, needs to have his abstraction taken away. |
static javax.swing.JMenuItem |
newJMenuItemAlt(java.lang.String title,
int what)
Same as newJMenuItem(), but adds the ALT (on Linux and Windows) or OPTION (on Mac OS X) key as a modifier. |
static javax.swing.JMenuItem |
newJMenuItemShift(java.lang.String title,
int what)
Like newJMenuItem() but adds shift as a modifier for the key command. |
void |
setLineText(int line,
java.lang.String what)
Replace the text on a specified line. |
void |
setSelectedText(java.lang.String what)
|
void |
setSelection(int start,
int stop)
|
void |
setSketchLocation(java.awt.Point p)
Set the location of the sketch run window. |
void |
setText(java.lang.String what)
Replace the entire contents of the front-most tab. |
void |
startCompoundEdit()
Use before a manipulating text to group editing operations together as a single undo. |
void |
statusEmpty()
Clear the status area. |
void |
statusError(java.lang.Exception e)
Show an exception in the editor status bar. |
void |
statusError(java.lang.String what)
Show an error int the status bar. |
void |
statusNotice(java.lang.String msg)
Show a notice message in the editor status bar. |
void |
stopCompoundEdit()
Use with startCompoundEdit() to group edit operations in a single undo. |
Methods inherited from class javax.swing.JFrame |
---|
getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getJMenuBar, getLayeredPane, getRootPane, isDefaultLookAndFeelDecorated, remove, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, update |
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, getInputContext, getListeners, getLocale, getMostRecentFocusOwner, getOwnedWindows, getOwner, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isShowing, pack, postEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, setAlwaysOnTop, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setLocationByPlatform, setLocationRelativeTo, 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, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, 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, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, 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, repaint, requestFocus, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, 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 |
Constructor Detail |
---|
public Editor(Base ibase, java.lang.String path, int[] location)
Method Detail |
---|
public java.awt.Dimension getMinimumSize()
getMinimumSize
in class java.awt.Container
public static javax.swing.JMenuItem newJMenuItem(java.lang.String title, int what)
public static javax.swing.JMenuItem newJMenuItemShift(java.lang.String title, int what)
public static javax.swing.JMenuItem newJMenuItemAlt(java.lang.String title, int what)
public Sketch getSketch()
public JEditTextArea getTextArea()
public java.lang.String getText()
public java.lang.String getText(int start, int stop)
public void setText(java.lang.String what)
public void insertText(java.lang.String what)
public java.lang.String getSelectedText()
public void setSelectedText(java.lang.String what)
public void setSelection(int start, int stop)
public int getCaretOffset()
public boolean isSelectionActive()
public int getSelectionStart()
public int getSelectionStop()
public java.lang.String getLineText(int line)
public void setLineText(int line, java.lang.String what)
public int getLineStartOffset(int line)
public int getLineStopOffset(int line)
public int getLineCount()
public void startCompoundEdit()
public void stopCompoundEdit()
public int getScrollPosition()
public void handleCut()
public void handleCopy()
public void handlePaste()
public void handleSelectAll()
public void handleRun(boolean present)
present
- Set true to run in full screen (present mode).public void setSketchLocation(java.awt.Point p)
public java.awt.Point getSketchLocation()
public void handleStop()
public void internalRunnerClosed()
public void internalCloseRunner()
public boolean handleSave(boolean immediately)
public boolean handleSaveAs()
public void handleExport()
public void handleExportApplication()
public void handlePageSetup()
public void handlePrint()
public void statusError(java.lang.String what)
statusError
in interface RunnerListener
public void statusError(java.lang.Exception e)
statusError
in interface RunnerListener
public void statusNotice(java.lang.String msg)
public void statusEmpty()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |