net.sf.arise.gui
Class BaseWorkarea

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.JPanel
                          |
                          +--net.sf.arise.gui.BaseWorkarea
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, Workarea
Direct Known Subclasses:
EngineServiceWorkarea

public abstract class BaseWorkarea
extends javax.swing.JPanel
implements Workarea

See Also:
Serialized Form

Field Summary
protected  net.sf.arise.gui.BaseWorkarea.EmitLastAction emitLastAction
           
protected  net.sf.arise.gui.BaseWorkarea.InspectLastAction inspectLastAction
           
protected  org.apache.commons.logging.Log log
           
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Container
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
protected BaseWorkarea(java.lang.String name, java.lang.String language, boolean remote)
           
protected BaseWorkarea(Workarea parent, java.lang.String name, java.lang.String language, boolean remote)
           
 
Method Summary
 void addListener(WorkareaListener listener)
           
protected  java.lang.String allText()
           
 void clearErrors()
          Clear error panel
 void clearInput()
          Clear expressions
 void clearValues()
          Clear values panel
 void close()
           
 void eval()
          Eval buffer
protected  void eval(java.lang.String text)
           
protected abstract  void evalInternal(java.lang.String text)
           
 void evalMarked()
          Eval marked text
protected  void fireEmit(java.lang.Object object)
           
protected  void fireEvalDone(Result result)
           
protected  void fireEvalFailed(java.lang.String throwableString)
           
protected  void fireEvalFailed(java.lang.Throwable t)
           
protected  void fireEvalStarting(java.lang.Object object)
           
protected  void fireInspect(InspectorNode node)
           
 java.awt.Component getComponent()
          The Swing component which is the workarea
 java.io.File getFile()
          The file being edited
 java.lang.String getLanguage()
          The language
 java.lang.String getName()
          The workarea name
 Workarea getWorkareaParent()
           
 boolean hasRead()
           
 boolean hasWritten()
           
 void insertInputFrom(java.io.Reader reader)
           
 void insertInputFrom(java.io.Reader reader, boolean moveCaret)
           
 boolean isRemote()
           
protected  java.lang.String marked()
           
 void readInputFrom(java.lang.Object source, java.io.Reader reader)
           
 void readInputFrom(java.lang.Object source, java.io.Reader reader, boolean keepCaret)
           
 void removeListener(WorkareaListener listener)
           
 void setCustomFont(java.awt.Font font)
          Change font
 void setFile(java.io.File file)
          The file being edited
(package private)  void setKeyBindings(javax.swing.Action eval, javax.swing.Action evalMarked, javax.swing.Action inspectMarked)
           
protected  void setPath(Classpath path)
           
 void setVisible(boolean visible)
           
abstract  Workarea spawn(java.lang.String name)
           
 void waitForEval(long millis)
           
 void writeInputTo(java.lang.String name, java.io.Writer writer)
           
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, 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, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, 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 net.sf.arise.gui.Workarea
bind, getClasspath, getIt, getOops, inspectLatest, reset, reset, unbind
 

Field Detail

log

protected final org.apache.commons.logging.Log log

inspectLastAction

protected final net.sf.arise.gui.BaseWorkarea.InspectLastAction inspectLastAction

emitLastAction

protected final net.sf.arise.gui.BaseWorkarea.EmitLastAction emitLastAction
Constructor Detail

BaseWorkarea

protected BaseWorkarea(java.lang.String name,
                       java.lang.String language,
                       boolean remote)

BaseWorkarea

protected BaseWorkarea(Workarea parent,
                       java.lang.String name,
                       java.lang.String language,
                       boolean remote)
Method Detail

setPath

protected void setPath(Classpath path)

setCustomFont

public void setCustomFont(java.awt.Font font)
Description copied from interface: Workarea
Change font

Specified by:
setCustomFont in interface Workarea

fireEmit

protected void fireEmit(java.lang.Object object)

fireInspect

protected void fireInspect(InspectorNode node)

fireEvalStarting

protected void fireEvalStarting(java.lang.Object object)

fireEvalDone

protected void fireEvalDone(Result result)

fireEvalFailed

protected void fireEvalFailed(java.lang.String throwableString)

fireEvalFailed

protected void fireEvalFailed(java.lang.Throwable t)

getWorkareaParent

public Workarea getWorkareaParent()
Specified by:
getWorkareaParent in interface Workarea

addListener

public void addListener(WorkareaListener listener)
Specified by:
addListener in interface Workarea

removeListener

public void removeListener(WorkareaListener listener)
Specified by:
removeListener in interface Workarea

clearInput

public void clearInput()
Description copied from interface: Workarea
Clear expressions

Specified by:
clearInput in interface Workarea

clearErrors

public void clearErrors()
Description copied from interface: Workarea
Clear error panel

Specified by:
clearErrors in interface Workarea

clearValues

public void clearValues()
Description copied from interface: Workarea
Clear values panel

Specified by:
clearValues in interface Workarea

eval

protected void eval(java.lang.String text)

allText

protected java.lang.String allText()

marked

protected java.lang.String marked()

evalMarked

public void evalMarked()
Description copied from interface: Workarea
Eval marked text

Specified by:
evalMarked in interface Workarea

eval

public void eval()
Description copied from interface: Workarea
Eval buffer

Specified by:
eval in interface Workarea

readInputFrom

public void readInputFrom(java.lang.Object source,
                          java.io.Reader reader)
                   throws java.io.IOException
Specified by:
readInputFrom in interface Workarea
java.io.IOException

readInputFrom

public void readInputFrom(java.lang.Object source,
                          java.io.Reader reader,
                          boolean keepCaret)
                   throws java.io.IOException
Specified by:
readInputFrom in interface Workarea
java.io.IOException

insertInputFrom

public void insertInputFrom(java.io.Reader reader)
                     throws java.io.IOException
Specified by:
insertInputFrom in interface Workarea
java.io.IOException

insertInputFrom

public void insertInputFrom(java.io.Reader reader,
                            boolean moveCaret)
                     throws java.io.IOException
Specified by:
insertInputFrom in interface Workarea
java.io.IOException

writeInputTo

public void writeInputTo(java.lang.String name,
                         java.io.Writer writer)
                  throws java.io.IOException
Specified by:
writeInputTo in interface Workarea
java.io.IOException

setFile

public void setFile(java.io.File file)
Description copied from interface: Workarea
The file being edited

Specified by:
setFile in interface Workarea

getFile

public java.io.File getFile()
Description copied from interface: Workarea
The file being edited

Specified by:
getFile in interface Workarea

hasWritten

public boolean hasWritten()
Specified by:
hasWritten in interface Workarea

hasRead

public boolean hasRead()
Specified by:
hasRead in interface Workarea

getComponent

public java.awt.Component getComponent()
Description copied from interface: Workarea
The Swing component which is the workarea

Specified by:
getComponent in interface Workarea

getName

public java.lang.String getName()
Description copied from interface: Workarea
The workarea name

Specified by:
getName in interface Workarea
Overrides:
getName in class java.awt.Component

getLanguage

public java.lang.String getLanguage()
Description copied from interface: Workarea
The language

Specified by:
getLanguage in interface Workarea

setVisible

public void setVisible(boolean visible)
Overrides:
setVisible in class javax.swing.JComponent

setKeyBindings

void setKeyBindings(javax.swing.Action eval,
                    javax.swing.Action evalMarked,
                    javax.swing.Action inspectMarked)

waitForEval

public void waitForEval(long millis)
                 throws java.lang.InterruptedException
Specified by:
waitForEval in interface Workarea
java.lang.InterruptedException

close

public void close()
Specified by:
close in interface Workarea

spawn

public abstract Workarea spawn(java.lang.String name)
                        throws java.lang.Exception
Specified by:
spawn in interface Workarea
java.lang.Exception

isRemote

public boolean isRemote()
Specified by:
isRemote in interface Workarea

evalInternal

protected abstract void evalInternal(java.lang.String text)


All code and documentation is

Copyright (c) : 2000-2003 Kjetil Valstadsve & Maja S. Bratseth