|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.borg.ui.calendar.Box
net.sf.borg.ui.calendar.ApptBox
class ApptBox
ApptBox is used to draw timed appointments on the time-grid part of the day and week UIs.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class net.sf.borg.ui.calendar.Box |
---|
Box.Draggable |
Field Summary |
---|
Fields inherited from class net.sf.borg.ui.calendar.Box |
---|
bounds, clip, isSelected |
Constructor Summary | |
---|---|
ApptBox(Date d,
Appointment ap,
Rectangle bounds,
Rectangle clip)
constructor. |
Method Summary | |
---|---|
void |
delete()
react to a delete request on the box. |
void |
draw(Graphics2D g2,
Component comp)
draw the box. |
Date |
getDate()
Gets the date. |
JPopupMenu |
getMenu()
get the box popup menu |
String |
getText()
get the box text |
String |
getToolTipText()
gets the tool tip text for this box |
static void |
layoutBoxes(List<ApptBox> boxlist,
int starthr,
int endhr)
Layout all boxes for a particular day by determining how many overlap and then setting the horizontal position and width to fit them all together in the day grid. |
void |
move(int realtime,
Date d)
move an appointment when the box is dragged |
void |
onClick()
react to a mouse click on the box |
void |
resize(boolean isTop,
int realtime)
react to a box resize - change the appt duration |
Methods inherited from class net.sf.borg.ui.calendar.Box |
---|
clicksToActivate, getBounds, setBounds, setSelected |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ApptBox(Date d, Appointment ap, Rectangle bounds, Rectangle clip)
d
- date that the box is in - not always the appt dateap
- the appointment represented by this boxbounds
- box boundsclip
- box clipMethod Detail |
---|
public static void layoutBoxes(List<ApptBox> boxlist, int starthr, int endhr)
boxlist
- the list of all ApptBox objects for a daystarthr
- first hour shown on the gridendhr
- last hour shown on the gridpublic void delete()
delete
in class Box
public void draw(Graphics2D g2, Component comp)
draw
in class Box
g2
- the graphics to draw incomp
- the component that the graphics is inpublic Date getDate()
public JPopupMenu getMenu()
Box
getMenu
in class Box
public String getText()
Box
getText
in class Box
public void move(int realtime, Date d) throws Exception
move
in interface Box.Draggable
realtime
- time of day in minutes to which the object has been
draggedd
- date that the object was dragged to
Exception
public void onClick()
onClick
in class Box
public void resize(boolean isTop, int realtime) throws Exception
isTop
- true if the top edge was draggedrealtime
- the time in minutes after midnight that the dragged edge was dragged to
Exception
- the exceptionpublic String getToolTipText()
Box
getToolTipText
in class Box
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |