All Packages Class Hierarchy This Package Previous Next Index
Class distans.ThreeCrossPanels
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Container
|
+----java.awt.Panel
|
+----distans.ThreeCrossPanels
- public class ThreeCrossPanels
- extends Panel
- implements ShowPanelInterface
This class displays QuestionPages of type Cross. Because all subquestions can't be showned at the same screen
a card system is used for displaying four at a time. This class also take care of taking the information from the text fields
and putting it into the data structures. The name Three should be changed to X
-
ad
- A refernece to a student answer object, this is only used by the ReadAnswer Applet
-
cardNo
- The number of the current card beeing displayed, 0-
-
cp
- An array with the CrossPanels.
-
crossPanel1
- The first of the CrossPanels, the panels have individual references beacuse they were created by VisualCafe
-
crossPanel2
-
-
crossPanel3
-
-
crossPanel4
-
-
noOfPanels
- The number of CrossPanels on each card, even though the name of this class says two more than two could be possible.
-
pd
- A reference to the page currently beeing displayed, the PageData must be of type
CROSS
-
ThreeCrossPanels()
- Constructor, creates the four CrossPanels.
-
addNotify()
- Adds all the graphical components
-
getPreferredSize()
-
-
initRead()
- Sets the CrossPanels to not editabel, used when working with ReadAnswerApplet
-
putPage(PageData)
- Call this method to display the first card of a new page.
-
putPage(PageData, AnswerData)
-
-
saveCurrentCard()
- Saves the information of the current card in PageData
-
saveCurrentCardRead()
- Saves the grade given by the teatcher in the AnswerData object.
-
show()
- Not used just calls the super class (Panel)
-
showCurrentCard()
- Shows the current card by changing the text in the two AltPanels.
-
showNextCard()
- Saves the information of the old card in the data structures and displays the next card.
-
showPrevCard()
- Saves the information of the old card in the data structures and displays the previous card.
-
validateAndHide()
- Calls validateCard and hides the Panel
-
validateCard()
- Saves the current card by calling saveCurrentCard()
crossPanel1
CrossPanel crossPanel1
- The first of the CrossPanels, the panels have individual references beacuse they were created by VisualCafe
crossPanel2
CrossPanel crossPanel2
crossPanel3
CrossPanel crossPanel3
crossPanel4
CrossPanel crossPanel4
pd
private PageData pd
- A reference to the page currently beeing displayed, the PageData must be of type
CROSS
ad
private AnswerData ad
- A refernece to a student answer object, this is only used by the ReadAnswer Applet
cardNo
private int cardNo
- The number of the current card beeing displayed, 0-
cp
private CrossPanel cp[]
- An array with the CrossPanels.
noOfPanels
static final int noOfPanels
- The number of CrossPanels on each card, even though the name of this class says two more than two could be possible.
ThreeCrossPanels
public ThreeCrossPanels()
- Constructor, creates the four CrossPanels.
initRead
public void initRead()
- Sets the CrossPanels to not editabel, used when working with ReadAnswerApplet
show
public void show()
- Not used just calls the super class (Panel)
- Overrides:
- show in class Component
validateAndHide
public void validateAndHide()
- Calls validateCard and hides the Panel
- See Also:
- validateCard
putPage
public void putPage(PageData pd)
- Call this method to display the first card of a new page.
The old page current card is saved with a call to vaildateCard.
putPage
public void putPage(PageData pd,
AnswerData ad)
validateCard
public void validateCard()
- Saves the current card by calling saveCurrentCard()
showCurrentCard
private void showCurrentCard()
- Shows the current card by changing the text in the two AltPanels.
The text displayed depends if it should display text for editing/creating pages or the students answers.
showNextCard
public void showNextCard()
- Saves the information of the old card in the data structures and displays the next card.
saveCurrentCard
private boolean saveCurrentCard()
- Saves the information of the current card in PageData
- Returns:
- false if not all the text fields in the two AltPanels are filled, true otherwise
saveCurrentCardRead
private boolean saveCurrentCardRead()
- Saves the grade given by the teatcher in the AnswerData object.
showPrevCard
public void showPrevCard()
- Saves the information of the old card in the data structures and displays the previous card.
getPreferredSize
public Dimension getPreferredSize()
- Overrides:
- getPreferredSize in class Container
addNotify
public void addNotify()
- Adds all the graphical components
- Overrides:
- addNotify in class Panel
All Packages Class Hierarchy This Package Previous Next Index