|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
fr.ove.openmath.jome.ctrlview.bidim.Display
The display elements of the formula.
| 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 | |
protected boolean |
dragNDrop
Are we in drag'n drop mode ?? |
protected boolean |
isSelected
Indicates whether the symbol is selected or not. |
| 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 | |
Display(GraphicContext graphicContext)
The constructor. |
|
| Method Summary | |
void |
add(Display display)
Adds a child display to the instance. |
void |
addControlListener(ControlListener controlListener)
Registers another listener to be informed of changes of the display. |
void |
addSelectionEventListener(SelectionEventListener selectionEventListener)
Registers another listener to be informed of changes of the display. |
void |
adjustRank()
Adjusts the rank of its children. |
void |
buildDisplay()
Builds the display of the formula tree structure. |
Display |
buildDisplay(int indexFts)
Builds the display of the part of the formula tree structure at the specified index. |
void |
computeAncestorsAttributes()
Recurses into the tree of the display to inform the ancestors of the instance that they need to compute their attributes. |
void |
computeChildrenAttributes()
Recurses into the tree of the display to inform the children of the instance that they need to compute their attributes. |
int |
computeInsertionPosition(int mouseX)
Returns the insertion position for the moving of displays. |
void |
decLevel()
Decrements the level value. |
void |
deselect()
Deselects the display. |
void |
dontDrawBounds()
The bounds of the display don't have to be drawn. |
protected boolean |
doRemoveFromListListeners()
Returns true |
void |
drawBounds()
The bounds of the display have to be drawn. |
void |
fireControlEvent(ControlEvent controlEvent)
Fires a Control event to registered listeners. |
void |
fireSelectionEvent(SelectionEvent selectionEvent)
Fires a SelectionEvent event to registered listeners. |
int |
getAscent()
Returns the ascent. |
java.awt.Color |
getBackgroundColor()
Returns the color used by the graphic context. |
boolean |
getComputeAttributes()
Checks if we need to compute the display. |
int |
getDescent()
Returns the descent. |
DisplayAllocator |
getDisplayAllocator()
Returns the display allocator. |
java.awt.Color |
getForegroundColor()
Returns the color used by the graphic context. |
GraphicContext |
getGraphicContext()
Returns the graphic context of the display. |
int |
getHeight()
Returns the height of the display. |
java.lang.String |
getIconName()
Returns the name of the icon associated to the instance. |
int |
getLevel()
Returns the level of the display |
ControlListener |
getListener()
Returns the listener of the dispay. |
int |
getRank()
Returns the rank of the display. |
java.awt.Color |
getSelectionColor()
Returns the color used in the graphic context to hilight the selection. |
int |
getShiftX()
Returns the horizontal shift. |
int |
getShiftY()
Returns the vertical shift. |
boolean |
getUpdateLevel()
Checks if we need to update the level of the display. |
int |
getWidth()
Returns the width of the display. |
int |
getX()
Returns the x-location of the display. |
int |
getY()
Returns the y-location of the display. |
boolean |
gotSelectedElements()
Returns true if the display have components selected or is selected. |
void |
iconify()
Iconifies all the selected elements of the formula. |
void |
incLevel()
Increments the level value. |
boolean |
isDisplay(FormulaTreeStructure fts)
Returns true if the instance is a display of the specified
formula tree structure. |
boolean |
isIcon()
|
boolean |
isIconifiable()
Returns true if the instance is iconifiable.
|
boolean |
isSelected()
Checks if the display is selected or not. |
boolean |
isSymbolOperatorDisplay()
|
void |
moveSelectedDisplays(int mouseX)
Moves the selected displays to the mouse position. |
void |
remove(int index)
Removes from the instance the display at the specified index. |
void |
removeAll()
Removes all the displays of the instance. |
void |
removeAllControlListener()
Removes all the listeners. |
void |
removeAllDisplays()
Removes all the displays of the instance. |
void |
removeControlListener(ControlListener controlListener)
Removes a listener. |
protected void |
removeFromListListeners(boolean doRemoveFromListListeners)
Sets if during the manipulation of children of the instance, the children manipulated have to be removed from the list od listeners. |
void |
removeSelectionEventListener(SelectionEventListener selectionEventListener)
Removes a listener. |
void |
scaleDisplay()
Scales the display. |
void |
select()
Selects the display. |
void |
setAscent(int ascent)
Sets the ascent. |
void |
setAttributes(int ascent,
int descent,
int shiftX,
int shiftY)
Sets all the attributes. |
void |
setBackgroundColor(java.awt.Color backgroundColor)
Sets a new color to the context. |
void |
setChildrenBackground(java.awt.Color backgroundColor)
|
void |
setComputeAttributes(boolean computeAttributes)
Sets the attributes to be computed. |
void |
setDescent(int descent)
Sets the descent. |
void |
setDisplayAllocator(DisplayAllocator displayAllocator)
Sets the display allocator. |
protected void |
setDoRemoveFromListListeners(boolean doRemoveFromListListeners)
Sets if during the removal of the instance from the its father, we remove it from the list of listeners it is listening to. |
void |
setFont(java.awt.Font font)
Sets a new font to the context. |
void |
setForegroundColor(java.awt.Color foregroundColor)
Sets a new color to the context. |
void |
setGraphicContext(GraphicContext graphicContext)
Sets the graphic context to the display. |
void |
setHeight(int height)
Sets the height of the instance. |
void |
setIconName(java.lang.String iconName)
Associates an icon name to the instance. |
void |
setIsIconifiable(boolean isIconifiable)
Sets the istance as iconifiable. |
void |
setIsSymbolOperatorDisplay(boolean isSymbolOperatorDisplay)
Sets if the instance represents the display of the symbol of an operator. |
void |
setLevel(int level)
Sets the level of the display |
void |
setMouseListener(java.awt.event.MouseListener listener)
|
void |
setNotSelected()
Sets the display as not selected. |
void |
setRank(int rank)
Sets the rank of the display. |
void |
setSelected()
Sets the display as selected. |
void |
setSelectionColor(java.awt.Color selectionColor)
Sets a new selection color to the context. |
void |
setShiftX(int shiftX)
Sets the horizontal shift. |
void |
setShiftY(int shiftY)
Sets the vertical shift. |
protected void |
setTheFont(java.awt.Font font)
|
void |
setUpdateLevel(boolean updateLevel)
Sets the level to be updated. |
void |
setWidth(int width)
Sets the width of the instance. |
void |
setX(int x)
Sets the x-location of the instance. |
void |
setY(int y)
Sets the y-location of the instance. |
void |
substitute(java.lang.String name)
Substitutes the selection by the specified friendly name. |
void |
ToString()
For debugg only !!!! |
void |
uniconify()
Uniconifies all the selected icons which are in the formula. |
void |
uniconifyAll()
Uniconifies all the selected icons. |
void |
updateAncestorsLevel()
Recurses into the tree of the display to inform the ancestors of the instance that they need to update their level |
void |
updateChildrenLevel()
Recurses into the tree of the display to inform the children of the instance that they need to update their level |
boolean |
weDrawBounds()
Checks if the bound must be drawn or not. |
void |
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, paint, 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.Displayable |
paint |
| 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 |
| Methods inherited from interface fr.ove.openmath.jome.model.events.ModelListener |
consumeModelEvent |
| Field Detail |
protected boolean isSelected
protected boolean dragNDrop
| Constructor Detail |
public Display(GraphicContext graphicContext)
graphicContext - the graphic context of the display.| Method Detail |
public boolean isDisplay(FormulaTreeStructure fts)
true if the instance is a display of the specified
formula tree structure. false otherwise.
public void setIsSymbolOperatorDisplay(boolean isSymbolOperatorDisplay)
public boolean isSymbolOperatorDisplay()
true if the instance represents the display of the symbol
of an operator. false otherwise.public void drawBounds()
public void dontDrawBounds()
public boolean weDrawBounds()
true if we have to draw the bounds of the
display. false otherwise.public void setLevel(int level)
level - the level of the display.public int getLevel()
public void incLevel()
public void decLevel()
public void setUpdateLevel(boolean updateLevel)
updateLevel - true if the display level need to be
updated. false otherwise.public boolean getUpdateLevel()
true if needed. false otherwise.public void updateAncestorsLevel()
public void updateChildrenLevel()
public void setComputeAttributes(boolean computeAttributes)
computeAttributes - true if the display attributes need to be
computed. false otherwise.public boolean getComputeAttributes()
true if needed. false otherwise.public void computeAncestorsAttributes()
public void computeChildrenAttributes()
public void setRank(int rank)
rank - the rank.public int getRank()
public void adjustRank()
public void removeAllDisplays()
public void scaleDisplay()
public void moveSelectedDisplays(int mouseX)
mouseX - the mouse position.public int computeInsertionPosition(int mouseX)
mouseX - the mouse position.public void setDisplayAllocator(DisplayAllocator displayAllocator)
displayAllocator - the display allocatorpublic DisplayAllocator getDisplayAllocator()
null if none has been specified.public void buildDisplay()
public Display buildDisplay(int indexFts)
indexFts - the index of the fts which needs displays to be associated, in the list of "sub-fts"
of the corresponding fts of the instance (ouf !!!).indexFts must be less than the number of elements of the correponding fts, and
greater or equal than 0.
public void add(Display display)
display - the display to add.public void remove(int index)
index - the specified index.public void removeAll()
protected void setDoRemoveFromListListeners(boolean doRemoveFromListListeners)
doRemoveFromListListeners - true if we remove the instance from the list of listeners.
false otherwise.protected boolean doRemoveFromListListeners()
true if we remove the instance from the list of listeners.
false otherwise.
protected void removeFromListListeners(boolean doRemoveFromListListeners)
doRemoveFromListListeners - true if we remove the children manipulated from the list
of listeners. false otherwise.public void setFont(java.awt.Font font)
font - the new font.protected void setTheFont(java.awt.Font font)
public void substitute(java.lang.String name)
public void setAscent(int ascent)
setAscent in interface Displayableascent - the new ascent value.public int getAscent()
getAscent in interface Displayablepublic void setDescent(int descent)
setDescent in interface Displayabledescent - the new descent value.public int getDescent()
getDescent in interface Displayablepublic void setShiftX(int shiftX)
setShiftX in interface Displayablepublic int getShiftX()
getShiftX in interface Displayablepublic void setShiftY(int shiftY)
setShiftY in interface DisplayableshiftY - the new vertical shift value.public int getShiftY()
getShiftY in interface Displayable
public void setAttributes(int ascent,
int descent,
int shiftX,
int shiftY)
setAttributes in interface Displayableascent - the new ascent value.descent - the new descent value.shiftX - the new horizontal shift value.shiftY - the new vertical shift value.public void setGraphicContext(GraphicContext graphicContext)
setGraphicContext in interface DisplayablegraphicContext - the graphic context.public GraphicContext getGraphicContext()
getGraphicContext in interface Displayablepublic void setX(int x)
setX in interface Localisablex - the x-location of the instance.public int getX()
getX in interface Localisablepublic void setY(int y)
setY in interface Localisabley - the y-location of the instance.public int getY()
getY in interface Localisablepublic void setWidth(int width)
setWidth in interface Sizablewidth - the width of the instancepublic int getWidth()
getWidth in interface Sizablepublic void setHeight(int height)
setHeight in interface Sizableheight - the height of the instancepublic int getHeight()
getHeight in interface Sizablepublic void select()
select in interface Selectablepublic void deselect()
deselect in interface Selectablepublic void setSelected()
setSelected in interface Selectablepublic void setNotSelected()
setNotSelected in interface Selectablepublic boolean isSelected()
isSelected in interface Selectabletrue if the display is selected.
false otherwise.public boolean gotSelectedElements()
true if the display have components selected or is selected.false otherwise.
gotSelectedElements in interface Selectablepublic void setForegroundColor(java.awt.Color foregroundColor)
setForegroundColor in interface ColorizableforegroundColor - the new color.public java.awt.Color getForegroundColor()
getForegroundColor in interface Colorizablepublic void setBackgroundColor(java.awt.Color backgroundColor)
setBackgroundColor in interface ColorizablebackgroundColor - the new color.public void setChildrenBackground(java.awt.Color backgroundColor)
public java.awt.Color getBackgroundColor()
getBackgroundColor in interface Colorizablepublic void setSelectionColor(java.awt.Color selectionColor)
setSelectionColor in interface ColorizableselectionColor - the new color.public java.awt.Color getSelectionColor()
getSelectionColor in interface Colorizablepublic void setIconName(java.lang.String iconName)
setIconName in interface IconifiableiconName - the name of the iconpublic java.lang.String getIconName()
getIconName in interface Iconifiablepublic boolean isIcon()
isIcon in interface Iconifiabletrue if the instance is an icon. false otherwise.public void iconify()
iconify in interface Iconifiablepublic void uniconify()
uniconify in interface Iconifiablepublic void uniconifyAll()
uniconifyAll in interface Iconifiablepublic void setIsIconifiable(boolean isIconifiable)
setIsIconifiable in interface IconifiableisIconifiable - true if the instance is iconifiable.
false otherwise.public boolean isIconifiable()
true if the instance is iconifiable.
false otherwise.
isIconifiable in interface Iconifiablepublic void addControlListener(ControlListener controlListener)
addControlListener in interface ModelListenerControllercontrolListener - a listener to add.public void removeAllControlListener()
public void removeControlListener(ControlListener controlListener)
removeControlListener in interface ModelListenerControllercontrolListener - a listener to remove.public void fireControlEvent(ControlEvent controlEvent)
fireControlEvent in interface ModelListenerControllercontrolEvent - event encapsulating relevant information.public ControlListener getListener()
public void addSelectionEventListener(SelectionEventListener selectionEventListener)
selectionEventListener - a listener to add.public void removeSelectionEventListener(SelectionEventListener selectionEventListener)
selectionEventListener - listener to remove.public void fireSelectionEvent(SelectionEvent selectionEvent)
selectionEvent - event encapsulating relevant information.public void setMouseListener(java.awt.event.MouseListener listener)
public void ToString()
public void whoAmI()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||