fr.ove.openmath.jome.model
Class Icon

java.lang.Object
  extended byfr.ove.openmath.jome.model.Node
      extended byfr.ove.openmath.jome.model.FormulaTreeStructure
          extended byfr.ove.openmath.jome.model.Icon
All Implemented Interfaces:
java.lang.Cloneable, Comparable, ControlListener, java.util.EventListener, Iconifiable, Maskable, Modifiable, java.io.Serializable

public class Icon
extends FormulaTreeStructure

This is an fictive operator which replaces a real part (real in a syntactical mathematical meaning) of the formula by an icon.
Icon represents a node in the formula tree structure.
Its children are the iconified parts of the formula.

Version:
1.0 23/07/98
Author:
© 1998 DIRAT Laurent
See Also:
Serialized Form

Constructor Summary
Icon(FormulaTreeStructure toIconify)
          The Constructor.
Icon(java.lang.String iconName)
          The Constructor.
 
Method Summary
 void addIconified(FormulaTreeStructure fts)
           
 java.lang.String createLinear(java.lang.String linear)
          The Creation of the corresponding linear expression of the formula.
 java.lang.String evaluate()
          Evaluates the instance.
 FormulaTreeStructure getIconified(int rank)
          Returns the formula tree structure at the specified rank in the list of the fts to iconify.
 java.lang.String getIconName()
          Returns the name of the icon associated to the instance.
 int getNbIconified()
          Returns the number of iconified operators.
 int getRankOfIconified(int rank)
          Returns the rank in the formula tree structure of the iconified element at the specified rank in the list of iconified elments, before iconification.
 void iconify()
          Iconifies the instance.
 FormulaTreeStructure insert(FormulaTreeStructure current)
          Inserts the icon (node) in the formula tree structure.
 boolean isIcon()
           
 boolean isIconifiable()
          Returns true if the instance is iconifiable.
 boolean isOperator()
          To check is the instance is an operator.
 boolean isSubstitution()
          Returns true if the instance is a substitution.
 void setIconName(java.lang.String iconName)
          Associates an icon name to the instance.
 void setIsSubstitution(boolean isSubstitution)
          Sets if the instance represents a substitution or not.
 void uniconify()
          Uniconifies the instance.
 
Methods inherited from class fr.ove.openmath.jome.model.FormulaTreeStructure
addModelListener, consumeControlEvent, findLocation, fireModelEvent, getAreOperandsMovable, getAsOperandPriority, getAsOperatorPriority, getCrossRef, getListeners, getResourceIdentifier, getValue, goTo, isEqual, isGreater, isGreaterOrEqual, isLesser, isLesserOrEqual, isTemplate, isVisible, moveOperands, removeAllModelListener, removeModelListener, setAreOperandsMovable, setAsOperandPriority, setAsOperatorPriority, setCrossRef, setIsIconifiable, setIsTemplate, setIsVisble, setResourceIdentifier, setValue, uniconifyAll
 
Methods inherited from class fr.ove.openmath.jome.model.Node
addChild, addChild, clone, computeDepth, computeNbStrahler, duplicate, getChild, getChildren, getDepth, getFather, getNbChildren, getNbStrahler, getRank, hasChild, moveChildren, removeAll, removeChild, removeChild, setFather, setNbStrahler
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Icon

public Icon(FormulaTreeStructure toIconify)
The Constructor.

Parameters:
toIconify - the element (or part of the element, according to the case) to iconify in order to get the information for the icon name

Icon

public Icon(java.lang.String iconName)
The Constructor.

Parameters:
iconName - the name of the icon
Method Detail

insert

public FormulaTreeStructure insert(FormulaTreeStructure current)
Inserts the icon (node) in the formula tree structure.

Specified by:
insert in class FormulaTreeStructure
Parameters:
current - the position in the formula tree where the operator is to be insert.
Returns:
the new current position int hte formula tree.

isOperator

public boolean isOperator()
To check is the instance is an operator.

Specified by:
isOperator in class FormulaTreeStructure
Returns:
true if it is an operator. false otherwise.

createLinear

public java.lang.String createLinear(java.lang.String linear)
The Creation of the corresponding linear expression of the formula.

Specified by:
createLinear in class FormulaTreeStructure

setIsSubstitution

public void setIsSubstitution(boolean isSubstitution)
Sets if the instance represents a substitution or not.

Parameters:
isSubstitution - true if the instance is a substitution. false otherwise.

isSubstitution

public boolean isSubstitution()
Returns true if the instance is a substitution. false otherwise.


addIconified

public void addIconified(FormulaTreeStructure fts)

getNbIconified

public int getNbIconified()
Returns the number of iconified operators.

Returns:
the number of iconified operators.

getIconified

public FormulaTreeStructure getIconified(int rank)
Returns the formula tree structure at the specified rank in the list of the fts to iconify.

Parameters:
rank - a rank into the list of fts to iconify.
Returns:
the fts at the specified rank.

getRankOfIconified

public int getRankOfIconified(int rank)
Returns the rank in the formula tree structure of the iconified element at the specified rank in the list of iconified elments, before iconification.

Parameters:
rank - a rank into the list of fts to iconify.
Returns:
the rank in the FTS of the fts at the specified rank.

evaluate

public java.lang.String evaluate()
Evaluates the instance.

Specified by:
evaluate in class FormulaTreeStructure

isIcon

public boolean isIcon()
Specified by:
isIcon in interface Iconifiable
Overrides:
isIcon in class FormulaTreeStructure
Returns:
true if the instance is an icon. false otherwise.

setIconName

public void setIconName(java.lang.String iconName)
Associates an icon name to the instance.

Specified by:
setIconName in interface Iconifiable
Overrides:
setIconName in class FormulaTreeStructure
Parameters:
iconName - the name of the icon

getIconName

public java.lang.String getIconName()
Returns the name of the icon associated to the instance.

Specified by:
getIconName in interface Iconifiable
Overrides:
getIconName in class FormulaTreeStructure

isIconifiable

public boolean isIconifiable()
Returns true if the instance is iconifiable. false otherwise.

Specified by:
isIconifiable in interface Iconifiable
Overrides:
isIconifiable in class FormulaTreeStructure

iconify

public void iconify()
Iconifies the instance.

Specified by:
iconify in interface Iconifiable
Overrides:
iconify in class FormulaTreeStructure

uniconify

public void uniconify()
Uniconifies the instance.

Specified by:
uniconify in interface Iconifiable
Overrides:
uniconify in class FormulaTreeStructure


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