public class MMInteger extends MInteger implements MMNumberIF, MMObjectIF
m_attributes
INFINITY, NaN, NEGATIVE_INFINITY, POSITIVE_INFINITY
UNEDITED_NODE_NAME
DIRECTION_VECTOR, EDITABLE, EDITED, FINITE_NUMBER_SET_ENTRY, INDEXED_ENTRY, INTERVAL, INTERVAL_LOW_BOUND_TYPE, INTERVAL_LOW_BOUND_VALUE, INTERVAL_UP_BOUND_TYPE, INTERVAL_UP_BOUND_VALUE, MATRIX_ENTRY, NUMBER, NUMBERMATRIX, OPERATION, OPERATION_ARRAY, ORIGIN_VECTOR, RELATION, SET_ENTRY, STRING, STRING_MATRIX
Constructor and Description |
---|
MMInteger() |
MMInteger(double value) |
MMInteger(int value) |
MMInteger(MInteger number) |
MMInteger(org.w3c.dom.Node content)
Constructs a new instance with the given MathML/XML content.
|
Modifier and Type | Method and Description |
---|---|
void |
addHandler(MMHandler aHandler)
Associates the specified handler with this object.
|
void |
addSpecialCaseListener(SpecialCaseListener listener)
The
listener will be informed if this handler produces a special case. |
void |
addUpdater(MMUpdater anUpdater)
Associates an updater with this object: Whenever the state of this
object changes
InteractivityIF.invokeUpdaters() may be called to inform
other objects of the change. |
MNumber |
copy()
Returns a copy of this number (i.e. a new number with the same type and value).
|
void |
dependsOn(MMObjectIF[] objects,
DependencyIF dependency)
Returns a new
DependencyUpdater
that has objects as free objects and this object as dependent
object. |
void |
dependsOn(MMObjectIF obj,
DependencyIF dependency)
Returns a new
DependencyUpdater
that has obj as free object and this object as dependent
object. |
boolean |
doAction(MMEvent event)
Tries to handle the given event for this object.
|
void |
draw()
Draws this object in every display for which a transformer exists.
|
void |
fireSpecialCaseEvent(SpecialCaseEvent e)
Informs all registered special case listeners, that the given event has occurred.
|
MMHandler |
getActiveHandler()
Returns the handler that consumed the last
MMEvent . |
javax.swing.JComponent |
getAsContainerContent()
Returns a new container display of this object.
|
javax.swing.JComponent |
getAsContainerContent(int transformType)
Returns a new container display of this object for the specified transform type.
|
int |
getDefaultTransformType()
Returns the default transform type of this object.
|
int |
getDefaultTransformTypeAsContainer()
Returns the default transform type of this object if it is rendered in
a
MMPanel . |
int |
getDefaultTransformTypeInCanvas() |
DisplayProperties |
getDisplayProperties()
Returns the display properties for this class.
|
java.util.HashMap |
getDisplayTransformerMap()
Returns the map display ->
transformer . |
int |
getHandlerCount()
Returns the number of handlers associated with this object.
|
java.util.List |
getHandlers()
Returns a list of all previously added handlers.
|
java.lang.Class |
getNumberClass()
Returns the underlying number class of this exercise object.
|
int |
getTransformType(javax.swing.JComponent display)
Returns the transform type of this object.
|
int |
getUpdaterCount()
Returns the number of updaters associated with this object.
|
void |
invokeUpdaters()
This method calls
MMUpdater.update()
in all MMUpdater s
associated with this object. |
boolean |
isEditable()
Returns true if all container displays of this object should be editable.
|
boolean |
isSelectable()
Returns true, if this object is selectable in a
MMCanvas . |
boolean |
isSelected()
Returns true, if this object has been selected in a
MMCanvas . |
boolean |
isVisible()
Returns true, if this object can be seen on the
MMCanvas . |
void |
propertyChange(java.beans.PropertyChangeEvent evt) |
void |
removeAllHandlers()
Removes all handlers associated with this object.
|
void |
removeAllUpdaters()
Removes all updaters associated with this object.
|
void |
removeHandler(MMHandler aHandler)
Removes the specified handler associated with this object.
|
void |
removeSpecialCaseListener(SpecialCaseListener listener)
Removes
listener that was added by MMObjectIF.addSpecialCaseListener(SpecialCaseListener) . |
void |
removeUpdater(MMUpdater anUpdater)
Removes the specified updater from the list of updaters associated with this object.
|
void |
render()
Renders this object in every display for which a transformer exists.
|
void |
resetActiveHandler()
sets the active
Handler
to null . |
void |
setDisplayProperties(DisplayProperties newProperties)
Sets the display properties for this class.
|
void |
setEditable(boolean isEditable)
Sets whether all container displays of this object should be editable.
|
void |
setVisible(boolean aFlag)
Sets whether this object can be seen on the
MMCanvas . |
add, create, div, equals, getDomainString, getDouble, getIntValue, getMathMLNode, getMathMLNode, getMMClass, greaterOrEqualThan, greaterThan, isNaN, isRational, isZero, lessOrEqualThan, lessThan, mult, mult, negate, power, set, setDouble, setInteger, setNegInfinity, setPosInfinity, sub, toString
abs, conjugate, isInfinity, isNegInfinity, isPosInfinity, max, min, setInfinity
absed, add, arccos, arcosh, arcot, arcoth, arcsin, arctan, arctan2, arsinh, artanh, conjugated, cos, cosh, coth, divide, equals, exp, floor, getAttribute, getLabel, getNewNumberArray, getSign, hashCode, inverse, inverted, isEdited, isHidden, isInteger, isReal, log, max, min, multiply, negated, nthRoot, power, power, powered, setAttribute, setEdited, setHidden, setLabel, setMathMLNode, setNaN, setNotInfinity, sin, sinh, square, square, squareRoot, squareRoot, subtract, tan, tanh, toContentMathML, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
abs, absed, add, arccos, arcosh, arcot, arcoth, arcsin, arctan, arctan2, arsinh, artanh, conjugate, conjugated, cos, cosh, coth, create, div, equals, equals, exp, floor, getDomainString, getDouble, getMMClass, getSign, greaterOrEqualThan, greaterThan, hashCode, inverse, inverted, isInfinity, isInteger, isNaN, isRational, isReal, isZero, lessOrEqualThan, lessThan, log, mult, mult, negate, negated, nthRoot, power, power, powered, set, setDouble, setInfinity, setNaN, sin, sinh, square, squareRoot, sub, tan, tanh, toContentMathML, toString, toString
getLabel, isEdited, isHidden, setEdited, setHidden, setLabel
getMathMLNode, getMathMLNode, setMathMLNode
getLabel, setLabel
public MMInteger()
public MMInteger(int value)
public MMInteger(double value)
public MMInteger(MInteger number)
public MMInteger(org.w3c.dom.Node content)
content
- a MathML/XML nodepublic MNumber copy()
MNumberIF
public void propertyChange(java.beans.PropertyChangeEvent evt)
propertyChange
in interface java.beans.PropertyChangeListener
public DisplayProperties getDisplayProperties()
MMObjectIF
Drawable
s will
use this properties for rendering.getDisplayProperties
in interface MMObjectIF
MMObjectIF.setDisplayProperties(net.mumie.mathletfactory.display.DisplayProperties)
public void setDisplayProperties(DisplayProperties newProperties)
MMObjectIF
Drawable
s will
use this properties for rendering.setDisplayProperties
in interface MMObjectIF
MMObjectIF.getDisplayProperties()
public int getDefaultTransformType()
VisualizeIF
GeneralTransformer
.getDefaultTransformType
in interface VisualizeIF
public int getDefaultTransformTypeInCanvas()
public java.util.HashMap getDisplayTransformerMap()
VisualizeIF
transformer
.getDisplayTransformerMap
in interface VisualizeIF
public int getTransformType(javax.swing.JComponent display)
VisualizeIF
GeneralTransformer
.getTransformType
in interface VisualizeIF
public void draw()
VisualizeIF
draw
in interface VisualizeIF
public void render()
VisualizeIF
render
in interface VisualizeIF
public javax.swing.JComponent getAsContainerContent()
VisualizeIF
getAsContainerContent
in interface VisualizeIF
public javax.swing.JComponent getAsContainerContent(int transformType)
VisualizeIF
getAsContainerContent
in interface VisualizeIF
public int getDefaultTransformTypeAsContainer()
VisualizeIF
MMPanel
. It is
one of the constants listed in
GeneralTransformer
.getDefaultTransformTypeAsContainer
in interface VisualizeIF
public boolean doAction(MMEvent event)
InteractivityIF
true
is returned, otherwise
false
.doAction
in interface InteractivityIF
public void addHandler(MMHandler aHandler)
InteractivityIF
addHandler
in interface InteractivityIF
public MMHandler getActiveHandler()
InteractivityIF
MMEvent
.getActiveHandler
in interface InteractivityIF
public void resetActiveHandler()
InteractivityIF
Handler
to null
.resetActiveHandler
in interface InteractivityIF
public void addUpdater(MMUpdater anUpdater)
InteractivityIF
InteractivityIF.invokeUpdaters()
may be called to inform
other objects of the change.addUpdater
in interface InteractivityIF
public void invokeUpdaters()
InteractivityIF
MMUpdater.update()
in all MMUpdater
s
associated with this object.invokeUpdaters
in interface InteractivityIF
public int getHandlerCount()
InteractivityIF
getHandlerCount
in interface InteractivityIF
public int getUpdaterCount()
InteractivityIF
getUpdaterCount
in interface InteractivityIF
public boolean isSelectable()
InteractivityIF
MMCanvas
.isSelectable
in interface InteractivityIF
public boolean isSelected()
InteractivityIF
MMCanvas
.isSelected
in interface InteractivityIF
public void dependsOn(MMObjectIF obj, DependencyIF dependency)
InteractivityIF
DependencyUpdater
that has obj
as free object and this object as dependent
object.dependsOn
in interface InteractivityIF
public void dependsOn(MMObjectIF[] objects, DependencyIF dependency)
InteractivityIF
DependencyUpdater
that has objects
as free objects and this object as dependent
object.dependsOn
in interface InteractivityIF
public java.lang.Class getNumberClass()
ExerciseObjectIF
getNumberClass
in interface NumberTypeDependentIF
getNumberClass
in interface ExerciseObjectIF
getNumberClass
in class MNumber
public boolean isEditable()
MMObjectIF
isEditable
in interface MMObjectIF
MMObjectIF.setEditable(boolean)
public void setEditable(boolean isEditable)
MMObjectIF
setEditable
in interface MMObjectIF
MMObjectIF.isEditable()
public void addSpecialCaseListener(SpecialCaseListener listener)
listener
will be informed if this handler produces a special case.addSpecialCaseListener
in interface MMObjectIF
public void removeSpecialCaseListener(SpecialCaseListener listener)
MMObjectIF
listener
that was added by MMObjectIF.addSpecialCaseListener(SpecialCaseListener)
.removeSpecialCaseListener
in interface MMObjectIF
public void fireSpecialCaseEvent(SpecialCaseEvent e)
fireSpecialCaseEvent
in interface MMObjectIF
public void removeAllHandlers()
InteractivityIF
removeAllHandlers
in interface InteractivityIF
public void removeAllUpdaters()
InteractivityIF
removeAllUpdaters
in interface InteractivityIF
public void removeHandler(MMHandler aHandler)
InteractivityIF
removeHandler
in interface InteractivityIF
public void removeUpdater(MMUpdater anUpdater)
InteractivityIF
removeUpdater
in interface InteractivityIF
public boolean isVisible()
VisualizeIF
MMCanvas
.isVisible
in interface VisualizeIF
public void setVisible(boolean aFlag)
VisualizeIF
MMCanvas
.setVisible
in interface VisualizeIF
public java.util.List getHandlers()
InteractivityIF
getHandlers
in interface InteractivityIF
Further documentation and examples can be found under www.mathletfactory.de.