Inheritance diagram for edu.cmu.hcii.calo.view.schedule.BlockScheduleView:
Public Member Functions | |
BlockScheduleView () | |
Constructs a BlockScheduleView. | |
void | doNotAnimateNextUpdate () |
Tells the pane not to perform animations the next time update() is called. | |
void | setBounds (int x, int y, int width, int height) |
| |
void | setBounds (Rectangle r) |
| |
void | zoomIn () |
Zooms the view in one unit. | |
void | zoomOut () |
Zooms the view out one unit. | |
Protected Member Functions | |
boolean | doAnimations () |
| |
void | doUpdate () |
| |
void | paintComponent (Graphics graphics) |
| |
void | prepareAnimations () |
Should be implemented to record the positions of all the components in the view so they can be animated to their new positions later. | |
void | safeUpdateAnimation (Animation a) |
Should be implemented to process an updated animation, just like AnimationListener.animationDidUpdate(Animation). | |
Private Member Functions | |
Rectangle | getScheduleItemBounds (ScheduleItemView view) |
Gets the desired bounds of the given schedule item view based on the current time. | |
Static Private Member Functions | |
static boolean | scheduleItemIsVisible (ScheduleItem item) |
Returns true if the schedule item is within the range in which it should be visible on the schedule, false otherwise. | |
Private Attributes | |
float | currentZoom = BlockScheduleView.DEFAULT_ZOOM_PPH |
The current zoom level in pixels per hour. | |
Map< ScheduleItem, ScheduleItemView > | views |
The mapping between the schedule items and the views that show them. | |
Map< ScheduleItemView, Rectangle > | bounds = new HashMap<ScheduleItemView, Rectangle>() |
The mapping between the schedule item views and their bounds rectangles. | |
boolean | skipAnimations |
Whether or not we should skip animations on the next update. | |
Static Private Attributes | |
static final long | serialVersionUID = -4970443534285020287L |
Prevent serialization collisions. | |
static final float | DEFAULT_ZOOM_PPH = 35.0f |
The default zoom level, expressed in pixels per hour. | |
static final float | ZOOM_INCREMENT = 1.5f |
The zoom increment multiplier. |
edu.cmu.hcii.calo.view.schedule.BlockScheduleView.BlockScheduleView | ( | ) |
Constructs a BlockScheduleView.
static boolean edu.cmu.hcii.calo.view.schedule.BlockScheduleView.scheduleItemIsVisible | ( | ScheduleItem | item | ) | [static, private] |
Returns true
if the schedule item is within the range in which it should be visible on the schedule, false
otherwise.
item | the item to check |
true
if the item should be visible, false
otherwise boolean edu.cmu.hcii.calo.view.schedule.BlockScheduleView.doAnimations | ( | ) | [protected, virtual] |
void edu.cmu.hcii.calo.view.schedule.BlockScheduleView.doNotAnimateNextUpdate | ( | ) |
Tells the pane not to perform animations the next time update() is called.
void edu.cmu.hcii.calo.view.schedule.BlockScheduleView.doUpdate | ( | ) | [protected, virtual] |
Rectangle edu.cmu.hcii.calo.view.schedule.BlockScheduleView.getScheduleItemBounds | ( | ScheduleItemView | view | ) | [private] |
Gets the desired bounds of the given schedule item view based on the current time.
view | the view to ask about bounds for |
void edu.cmu.hcii.calo.view.schedule.BlockScheduleView.paintComponent | ( | Graphics | graphics | ) | [protected] |
Reimplemented from edu.cmu.hcii.calo.view.TranslucentView.
void edu.cmu.hcii.calo.view.schedule.BlockScheduleView.prepareAnimations | ( | ) | [protected, virtual] |
Should be implemented to record the positions of all the components in the view so they can be animated to their new positions later.
prepareAnimations() is called from update() before doUpdate() is invoked, so the component positions are unchanged from what they were before the update.
Implements edu.cmu.hcii.calo.view.AnimatedPane.
void edu.cmu.hcii.calo.view.schedule.BlockScheduleView.safeUpdateAnimation | ( | Animation | a | ) | [protected, virtual] |
Should be implemented to process an updated animation, just like AnimationListener.animationDidUpdate(Animation).
This method exists because AnimatedPane performs some automatic setup and teardown in animationDidUpdate(Animation), and calls safeUpdateAnimation(Animation) in between.
a | the animation that is updating |
Implements edu.cmu.hcii.calo.view.AnimatedPane.
void edu.cmu.hcii.calo.view.schedule.BlockScheduleView.setBounds | ( | int | x, | |
int | y, | |||
int | width, | |||
int | height | |||
) |
void edu.cmu.hcii.calo.view.schedule.BlockScheduleView.setBounds | ( | Rectangle | r | ) |
void edu.cmu.hcii.calo.view.schedule.BlockScheduleView.zoomIn | ( | ) |
Zooms the view in one unit.
void edu.cmu.hcii.calo.view.schedule.BlockScheduleView.zoomOut | ( | ) |
Zooms the view out one unit.
final long edu.cmu.hcii.calo.view.schedule.BlockScheduleView.serialVersionUID = -4970443534285020287L [static, private] |
final float edu.cmu.hcii.calo.view.schedule.BlockScheduleView.DEFAULT_ZOOM_PPH = 35.0f [static, private] |
The default zoom level, expressed in pixels per hour.
final float edu.cmu.hcii.calo.view.schedule.BlockScheduleView.ZOOM_INCREMENT = 1.5f [static, private] |
The zoom increment multiplier.
When the user zooms in, multiply the PPH by this amount. When the user zooms out, divide by this amount.
float edu.cmu.hcii.calo.view.schedule.BlockScheduleView.currentZoom = BlockScheduleView.DEFAULT_ZOOM_PPH [private] |
The current zoom level in pixels per hour.
Map<ScheduleItem, ScheduleItemView> edu.cmu.hcii.calo.view.schedule.BlockScheduleView.views [private] |
Initial value:
new HashMap<ScheduleItem, ScheduleItemView>()
Map<ScheduleItemView, Rectangle> edu.cmu.hcii.calo.view.schedule.BlockScheduleView.bounds = new HashMap<ScheduleItemView, Rectangle>() [private] |
The mapping between the schedule item views and their bounds rectangles.
boolean edu.cmu.hcii.calo.view.schedule.BlockScheduleView.skipAnimations [private] |
Whether or not we should skip animations on the next update.