public class ExpressionDisplay extends java.lang.Object implements IExpressionSessionChangeListener
Constructor and Description |
---|
ExpressionDisplay(java.lang.String tableID,
IStage stage,
IContainer container,
CalculatorCollectionManager calculatorCollectionManager)
Instantiates a new expression display.
|
Modifier and Type | Method and Description |
---|---|
void |
allExpressionsRemoved()
All expressions removed.
|
void |
expressionAddedFromCalculator(Expression e)
Expression added from calculator.
|
void |
expressionAddedFromNetwork(Expression e)
Expression added from network.
|
void |
expressionRemoved(Expression expression)
Expression removed.
|
void |
fetchAndUpdateScores()
Fetch and update scores.
|
java.util.Collection<IContainer> |
getAllItems()
Gets the all items.
|
java.util.Map<java.lang.String,ExpressionVisibleProperties> |
getCurrentIDToExpressionVisibleMap()
Gets the current id to expression visible map.
|
java.lang.Double |
getCurrentTarget()
Gets the current target.
|
IContainer |
getExpressionContainerForExpression(Expression ex)
Gets the expression container for expression.
|
java.lang.String |
getLabelText()
Gets the label text.
|
void |
setExpressionSession(ExpressionSession session)
Sets the expression session.
|
void |
setExpressionVisibilityCorrect(boolean showCorrect)
Sets the expression visibility correct.
|
void |
setExpressionVisibilityIncorrect(boolean showIncorrect)
Sets the expression visibility incorrect.
|
void |
setOthersExpressionVisibilityCorrect(boolean showCorrect)
Sets the others expression visibility correct.
|
void |
setOthersExpressionVisibilityIncorrect(boolean showIncorrect)
Sets the others expression visibility incorrect.
|
void |
setScoresDisplayVisibility(boolean shouldBeVisible)
Sets the scores display visibility.
|
void |
targetChanged(java.lang.Double newValue)
Target changed.
|
void |
updateExpressionsVisualProperties(java.util.Map<java.lang.String,ExpressionVisibleProperties> visualProperties)
Update expressions visual properties.
|
void |
updateScores(int correct,
int incorrect)
Update scores.
|
public ExpressionDisplay(java.lang.String tableID, IStage stage, IContainer container, CalculatorCollectionManager calculatorCollectionManager) throws ContentTypeNotBoundException
tableID
- the table idstage
- the stagecontainer
- the containercalculatorCollectionManager
- the calculator collection managerContentTypeNotBoundException
- the content type not bound exceptionpublic void allExpressionsRemoved()
IExpressionSessionChangeListener
allExpressionsRemoved
in interface IExpressionSessionChangeListener
public void expressionAddedFromCalculator(Expression e)
IExpressionSessionChangeListener
expressionAddedFromCalculator
in interface IExpressionSessionChangeListener
e
- the epublic void expressionAddedFromNetwork(Expression e)
IExpressionSessionChangeListener
expressionAddedFromNetwork
in interface IExpressionSessionChangeListener
e
- the epublic void expressionRemoved(Expression expression)
IExpressionSessionChangeListener
expressionRemoved
in interface IExpressionSessionChangeListener
expression
- the expressionpublic void fetchAndUpdateScores()
public java.util.Collection<IContainer> getAllItems()
public java.util.Map<java.lang.String,ExpressionVisibleProperties> getCurrentIDToExpressionVisibleMap()
public java.lang.Double getCurrentTarget()
public IContainer getExpressionContainerForExpression(Expression ex)
ex
- the expublic java.lang.String getLabelText()
public void setExpressionSession(ExpressionSession session)
session
- the new expression sessionpublic void setExpressionVisibilityCorrect(boolean showCorrect)
showCorrect
- the new expression visibility correctpublic void setExpressionVisibilityIncorrect(boolean showIncorrect)
showIncorrect
- the new expression visibility incorrectpublic void setOthersExpressionVisibilityCorrect(boolean showCorrect)
showCorrect
- the new others expression visibility correctpublic void setOthersExpressionVisibilityIncorrect(boolean showIncorrect)
showIncorrect
- the new others expression visibility incorrectpublic void setScoresDisplayVisibility(boolean shouldBeVisible) throws ContentTypeNotBoundException
shouldBeVisible
- the new scores display visibilityContentTypeNotBoundException
- the content type not bound exceptionpublic void targetChanged(java.lang.Double newValue)
IExpressionSessionChangeListener
targetChanged
in interface IExpressionSessionChangeListener
newValue
- the new valuepublic void updateExpressionsVisualProperties(java.util.Map<java.lang.String,ExpressionVisibleProperties> visualProperties)
visualProperties
- the visual propertiespublic void updateScores(int correct, int incorrect)
correct
- the correctincorrect
- the incorrect