org.concord.pedagogica.ui
Class CustomQuestion
java.lang.Object
|
+--org.concord.pedagogica.ui.CustomQuestion
- All Implemented Interfaces:
- java.awt.event.ActionListener, javax.swing.event.CaretListener, java.util.EventListener, QuestionForm
- Direct Known Subclasses:
- CustomChoiceQuestion, CustomEssayFill, CustomTableQuestion
- public class CustomQuestion
- extends java.lang.Object
- implements QuestionForm, java.awt.event.ActionListener, javax.swing.event.CaretListener
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
platform
public static final java.lang.String platform
fontSize
public static final int fontSize
DEFAULT_FONT
public static final java.awt.Font DEFAULT_FONT
questionTable
protected static java.util.Hashtable questionTable
questionCount
protected static int questionCount
questionPrefix
protected java.lang.String questionPrefix
modified
protected boolean modified
questionText
protected javax.swing.text.JTextComponent questionText
listeners
protected java.util.Vector listeners
questionFont
protected java.awt.Font questionFont
answerFont
protected java.awt.Font answerFont
questionStates
protected java.util.Hashtable questionStates
background
protected java.awt.Color background
text
protected java.lang.String text
answers
protected java.lang.String[] answers
activityAlias
protected java.lang.String activityAlias
CustomQuestion
public CustomQuestion()
getQuestionState
public QuestionState getQuestionState()
- Specified by:
getQuestionState
in interface QuestionForm
getQuestionState
public QuestionState getQuestionState(java.lang.Object key)
setQuestionState
public void setQuestionState(QuestionState state)
- Specified by:
setQuestionState
in interface QuestionForm
saveQuestion
public void saveQuestion(java.lang.Object key)
- Specified by:
saveQuestion
in interface QuestionForm
saveQuestion
public void saveQuestion(java.lang.Object key,
QuestionState state)
restoreQuestion
public void restoreQuestion(java.lang.Object key)
- Specified by:
restoreQuestion
in interface QuestionForm
setQuestionTextVisible
public void setQuestionTextVisible(boolean value)
isQuestionTextVisible
public boolean isQuestionTextVisible()
getQuestionFont
public java.awt.Font getQuestionFont()
setQuestionFont
public void setQuestionFont(java.awt.Font font)
getAnswerFont
public java.awt.Font getAnswerFont()
setAnswerFont
public void setAnswerFont(java.awt.Font font)
setQuestion
public void setQuestion(javax.swing.text.JTextComponent questionComponent)
getQuestion
public javax.swing.text.JTextComponent getQuestion()
setText
public void setText(java.lang.String question)
setText
protected void setText(java.lang.String question,
java.lang.String id)
getText
public java.lang.String getText()
getQuestionID
public java.lang.String getQuestionID()
- Specified by:
getQuestionID
in interface QuestionForm
getQuestionID
protected java.lang.String getQuestionID(java.lang.String text)
setQuestionID
public void setQuestionID(java.lang.String id)
- Specified by:
setQuestionID
in interface QuestionForm
setQuestionID
protected void setQuestionID(java.lang.String text,
java.lang.String id)
generateQuestionID
protected java.lang.String generateQuestionID()
getActivityAlias
public java.lang.String getActivityAlias()
- Specified by:
getActivityAlias
in interface QuestionForm
setActivityAlias
public void setActivityAlias(java.lang.String alias)
- Specified by:
setActivityAlias
in interface QuestionForm
getQuestionPrefix
public java.lang.String getQuestionPrefix()
- Specified by:
getQuestionPrefix
in interface QuestionForm
setQuestionPrefix
public void setQuestionPrefix(java.lang.String prefix)
- Specified by:
setQuestionPrefix
in interface QuestionForm
setBackground
public void setBackground(java.awt.Color color)
setAnswers
public void setAnswers(java.lang.String[] answers)
getAnswers
public java.lang.String[] getAnswers()
- Specified by:
getAnswers
in interface QuestionForm
getAnswerLength
public int getAnswerLength()
- Specified by:
getAnswerLength
in interface QuestionForm
getAnswer
public java.lang.String getAnswer(int index)
- Specified by:
getAnswer
in interface QuestionForm
getQuestionText
public java.lang.String getQuestionText()
- Specified by:
getQuestionText
in interface QuestionForm
isModified
public boolean isModified()
- Specified by:
isModified
in interface QuestionForm
setModified
public void setModified(boolean value)
caretUpdate
public void caretUpdate(javax.swing.event.CaretEvent event)
- Specified by:
caretUpdate
in interface javax.swing.event.CaretListener
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent event)
- Specified by:
actionPerformed
in interface java.awt.event.ActionListener
generateQuestionEvent
public void generateQuestionEvent()
addQuestionListener
public void addQuestionListener(QuestionListener listener)
removeQuestionListener
public void removeQuestionListener(QuestionListener listener)