org.omegahat.Environment.GUI
Class EvaluatorOutput

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.JPanel
                          |
                          +--org.omegahat.Environment.GUI.EvaluatorJPanel
                                |
                                +--org.omegahat.Environment.GUI.EvaluatorOutput
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.image.ImageObserver, java.awt.MenuContainer, ObjectDisplayFilter, java.io.Serializable, TaskDisplayFilter

public class EvaluatorOutput
extends EvaluatorJPanel
implements TaskDisplayFilter

See Also:
Serialized Form

Inner classes inherited from class javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
 
Inner classes inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Inner classes inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Inner classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent
 
Field Summary
protected  javax.swing.JEditorPane display
           
protected  javax.swing.text.SimpleAttributeSet taskStringAttributes
           
protected  javax.swing.text.SimpleAttributeSet taskValueAttributes
           
 
Fields inherited from class org.omegahat.Environment.GUI.EvaluatorJPanel
evaluator
 
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.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
EvaluatorOutput(Evaluator eval)
           
 
Method Summary
 boolean createDisplayAttributes()
           
 boolean display(java.lang.Object el)
          Display the given object, assuming it is the top-level object being displayed.
 boolean display(java.lang.Object el, long num)
          Display the specified object in a suitable manner assuming that the object is nested within the top-level object being displayed at level level.
 boolean display(Task obj)
          A textual representation of the task (expression, result, etc) to the output area.
 boolean make()
           
 java.lang.String toString(java.lang.Object o)
          Convert the given object to a String.
 java.io.Writer toWriter(java.lang.Object obj)
          Not sure what I intended for this - write the object to the output stream using the toString() method, or convert the object to the writer and register it.
 java.io.Writer writer()
          Obtain the output stream to which the data can be written.
 
Methods inherited from class org.omegahat.Environment.GUI.EvaluatorJPanel
evaluator, evaluator
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUIClassID, paramString, 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, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusCycleRoot, isFocusTraversable, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processFocusEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setLayout, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, imageUpdate, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

display

protected javax.swing.JEditorPane display

taskStringAttributes

protected javax.swing.text.SimpleAttributeSet taskStringAttributes

taskValueAttributes

protected javax.swing.text.SimpleAttributeSet taskValueAttributes
Constructor Detail

EvaluatorOutput

public EvaluatorOutput(Evaluator eval)
Method Detail

make

public boolean make()

display

public boolean display(Task obj)
A textual representation of the task (expression, result, etc) to the output area.
Specified by:
display in interface TaskDisplayFilter

display

public boolean display(java.lang.Object el,
                       long num)
Description copied from interface: ObjectDisplayFilter
Display the specified object in a suitable manner assuming that the object is nested within the top-level object being displayed at level level.
Specified by:
display in interface ObjectDisplayFilter

display

public boolean display(java.lang.Object el)
Description copied from interface: ObjectDisplayFilter
Display the given object, assuming it is the top-level object being displayed.
Specified by:
display in interface ObjectDisplayFilter
Following copied from interface: org.omegahat.Environment.IO.ObjectDisplayFilter
See Also:
ObjectDisplayFilter.display(java.lang.Object, long)

writer

public java.io.Writer writer()
Description copied from interface: ObjectDisplayFilter
Obtain the output stream to which the data can be written.
Specified by:
writer in interface ObjectDisplayFilter

toWriter

public java.io.Writer toWriter(java.lang.Object obj)
Description copied from interface: ObjectDisplayFilter
Not sure what I intended for this - write the object to the output stream using the toString() method, or convert the object to the writer and register it.
Specified by:
toWriter in interface ObjectDisplayFilter

toString

public java.lang.String toString(java.lang.Object o)
Description copied from interface: ObjectDisplayFilter
Convert the given object to a String. This is used by other objects when they take over the output of their contents and want to use the services of this filters formatting but change the overall layout of the components, not their content display. For example, we can display the contents of a table by converting each cell to a string and then managing the specification of the table. Alternatively, to embed an object within an HTML link to allow users to re-evaluate the associated expression, or bring up a plot or editor window, we would obtain the representation of the element using this method and then insert it into the link as part of the output stream.
Specified by:
toString in interface ObjectDisplayFilter

createDisplayAttributes

public boolean createDisplayAttributes()