|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.event.MouseMotionAdapter
se.liu.ida.critiquer.gui.ActivityDraggedAdapter
final class ActivityDraggedAdapter
Move the activities in the time line by dragging them. If you start the drag close to either end of the activity (where close is defined as the 15% of the activity rectangle closest to the ends), the duration is changed instead. If you start your drag operation close to the beginning of the activity, it will change the start time. If you begin the drag operation close to the end, it will change the end time. Drag anywhere else and both start and end are affected equally. There is currently some jerkiness, probably due to constraints that fire when activities are moved.
The jerkiness comes from the fact that activities fire update events when both the start time parameter as well as the end time parameter are updated. We want to treat that as an atomic update however, so that the task graphical representation in the timeline view is only updated once both parameters have their new values.
Constructor Summary | |
---|---|
ActivityDraggedAdapter(TimeView view,
JFreeChart chart)
|
Method Summary | |
---|---|
void |
mouseDragged(MouseEvent e)
Change start and/or the end time of an activity as part of the drag operation |
void |
mouseMoved(MouseEvent e)
Change the cursor so the user knows what a drag operation will do in the current context |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
ActivityDraggedAdapter(TimeView view, JFreeChart chart)
Method Detail |
---|
public void mouseMoved(MouseEvent e)
mouseMoved
in interface MouseMotionListener
mouseMoved
in class MouseMotionAdapter
MouseMotionAdapter.mouseMoved(java.awt.event.MouseEvent)
public void mouseDragged(MouseEvent e)
mouseDragged
in interface MouseMotionListener
mouseDragged
in class MouseMotionAdapter
MouseMotionAdapter.mouseDragged(java.awt.event.MouseEvent)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |