fr.ove.openmath.jome.ctrlview.bidim
Class SymbolDisplay

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byfr.ove.openmath.jome.ctrlview.bidim.Display
              extended byfr.ove.openmath.jome.ctrlview.bidim.BidimDisplay
                  extended byfr.ove.openmath.jome.ctrlview.bidim.SymbolDisplay
All Implemented Interfaces:
Colorizable, Displayable, java.util.EventListener, Iconifiable, java.awt.image.ImageObserver, Localisable, java.awt.MenuContainer, ModelListener, ModelListenerController, Selectable, java.io.Serializable, Sizable
Direct Known Subclasses:
IconDisplay

public class SymbolDisplay
extends BidimDisplay

The display of a symbol.

Version:
2.0 09/07/1999
Author:
© 1999 DIRAT Laurent
See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
 
Fields inherited from class fr.ove.openmath.jome.ctrlview.bidim.Display
dragNDrop, isSelected
 
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
SymbolDisplay(GraphicContext graphicContext)
          The constructor.
SymbolDisplay(GraphicContext graphicContext, Displayable symbol)
          The constructor.
 
Method Summary
 Displayable getSymbol()
          Returns the symbol which is in the dispay.
 void paint(java.awt.Graphics g)
          Paints the display.
 void scaleDisplay()
          Scales the display.
 void setAttributes(int ascent, int descent, int shiftX, int shiftY)
          Sets all the attributes.
 void setGraphicContext(GraphicContext graphicContext)
          Sets the graphic context of the instance.
 void setSymbol(Displayable symbol)
          Sets a new symbol to the display.
 
Methods inherited from class fr.ove.openmath.jome.ctrlview.bidim.BidimDisplay
consumeModelEvent
 
Methods inherited from class fr.ove.openmath.jome.ctrlview.bidim.Display
add, addControlListener, addSelectionEventListener, adjustRank, buildDisplay, buildDisplay, computeAncestorsAttributes, computeChildrenAttributes, computeInsertionPosition, decLevel, deselect, dontDrawBounds, doRemoveFromListListeners, drawBounds, fireControlEvent, fireSelectionEvent, getAscent, getBackgroundColor, getComputeAttributes, getDescent, getDisplayAllocator, getForegroundColor, getGraphicContext, getHeight, getIconName, getLevel, getListener, getRank, getSelectionColor, getShiftX, getShiftY, getUpdateLevel, getWidth, getX, getY, gotSelectedElements, iconify, incLevel, isDisplay, isIcon, isIconifiable, isSelected, isSymbolOperatorDisplay, moveSelectedDisplays, remove, removeAll, removeAllControlListener, removeAllDisplays, removeControlListener, removeFromListListeners, removeSelectionEventListener, select, setAscent, setBackgroundColor, setChildrenBackground, setComputeAttributes, setDescent, setDisplayAllocator, setDoRemoveFromListListeners, setFont, setForegroundColor, setHeight, setIconName, setIsIconifiable, setIsSymbolOperatorDisplay, setLevel, setMouseListener, setNotSelected, setRank, setSelected, setSelectionColor, setShiftX, setShiftY, setTheFont, setUpdateLevel, setWidth, setX, setY, substitute, ToString, uniconify, uniconifyAll, updateAncestorsLevel, updateChildrenLevel, weDrawBounds, whoAmI
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addNotify, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, removeContainerListener, removeNotify, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, update, 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, getAccessibleContext, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, 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 fr.ove.openmath.jome.ctrlview.bidim.Localisable
getLocation, setLocation, setLocation
 
Methods inherited from interface fr.ove.openmath.jome.ctrlview.bidim.Sizable
getPreferredSize, getSize, setSize, setSize
 

Constructor Detail

SymbolDisplay

public SymbolDisplay(GraphicContext graphicContext,
                     Displayable symbol)
The constructor.

Parameters:
graphicContext - the graphic context of the display.
symbol - The displayable symbol of the display.

SymbolDisplay

public SymbolDisplay(GraphicContext graphicContext)
The constructor.
Instanciate a new display, with no displayable symbol associated. The symbol has to be set by hand.

Parameters:
graphicContext - the graphic context of the display.
Method Detail

setSymbol

public void setSymbol(Displayable symbol)
Sets a new symbol to the display.

Parameters:
symbol - the symbol to set.

getSymbol

public Displayable getSymbol()
Returns the symbol which is in the dispay.


paint

public void paint(java.awt.Graphics g)
Paints the display.

Specified by:
paint in interface Displayable
Overrides:
paint in class BidimDisplay
Parameters:
g - where we paint the display.

scaleDisplay

public void scaleDisplay()
Scales the display.

Overrides:
scaleDisplay in class Display

setAttributes

public void setAttributes(int ascent,
                          int descent,
                          int shiftX,
                          int shiftY)
Sets all the attributes.

Specified by:
setAttributes in interface Displayable
Overrides:
setAttributes in class Display
Parameters:
ascent - the new ascent value.
descent - the new descent value.
shiftX - the new horizontal shift value.
shiftY - the new vertical shift value.

setGraphicContext

public void setGraphicContext(GraphicContext graphicContext)
Sets the graphic context of the instance.

Specified by:
setGraphicContext in interface Displayable
Overrides:
setGraphicContext in class Display
Parameters:
graphicContext - the graphic context.


Copyright © 1999-2007 Universit?© de Nice Sophia-Antipolis, I3S, Ove SARL, DFKI and Universit?§t des Saarlandes. All Rights Reserved.