|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
net.sf.borg.ui.calendar.ApptBoxPanel
abstract class ApptBoxPanel
ApptBoxPanel is the base class for Panels that act as containers for Box and DateZone objects. It manages the layout of Boxes and the various operations that can be done on them - such as dragging, resizing, clicking
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JPanel |
---|
JPanel.AccessibleJPanel |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary | |
---|---|
protected Collection<Box> |
boxes
the Boxes managed by this container |
protected double |
endmin
|
protected double |
startmin
|
Fields inherited from class javax.swing.JComponent |
---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
ApptBoxPanel()
Instantiates a new appt box panel. |
Method Summary | |
---|---|
protected void |
addApptBox(Date d,
Appointment ap,
Rectangle bounds,
Rectangle clip)
Adds an appointment to the container. |
void |
addDateZone(Date d,
Rectangle bounds)
Adds a date zone to this container |
Box |
addNoteBox(Date d,
CalendarEntity ap,
Rectangle bounds,
Rectangle clip)
Adds the note box to this container |
void |
clearBoxes()
Clear boxes and zones. |
void |
componentHidden(ComponentEvent arg0)
|
void |
componentMoved(ComponentEvent e)
|
void |
componentResized(ComponentEvent e)
|
void |
componentShown(ComponentEvent e)
|
void |
drawBoxes(Graphics2D g2)
Draw boxes. |
(package private) abstract Date |
getDateForCoord(double x,
double y)
Gets the date for a mouse coordinate |
String |
getTimeString(double y_fraction)
Gets the time string for a given y coordinate |
static boolean |
isStrike(CalendarEntity appt,
Date date)
Checks if entity should be shown as strike-through on a certain date. |
abstract void |
refresh()
Refresh. |
protected void |
removeDragNewBox()
Removes the drag new box. |
void |
removeResizeBox()
Removes the resize box. |
protected void |
setDragBounds(int ymin,
int ymax,
int xmin,
int xmax)
Sets the drag bounds to limit where items can be dragged. |
protected void |
setDragNewBox(double x,
double y,
double w,
double h)
Sets the bounds for the drag new box |
protected void |
setResizeBounds(int ymin,
int ymax)
Sets the resize bounds which limit where a resized object border can be dragged and where a drag new box can be started |
protected void |
setResizeBox(double x,
double y,
double w,
double h)
Sets the resize box bounds. |
Methods inherited from class javax.swing.JPanel |
---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected Collection<Box> boxes
protected double endmin
protected double startmin
Constructor Detail |
---|
public ApptBoxPanel()
Method Detail |
---|
public static boolean isStrike(CalendarEntity appt, Date date)
appt
- the entitydate
- the date
protected void addApptBox(Date d, Appointment ap, Rectangle bounds, Rectangle clip)
d
- the date of the box - not aleays the appt dateap
- the appointmentbounds
- the boundsclip
- the clippublic void addDateZone(Date d, Rectangle bounds)
d
- the datebounds
- the bounds of the zonepublic Box addNoteBox(Date d, CalendarEntity ap, Rectangle bounds, Rectangle clip)
d
- the dateap
- the calendar entitybounds
- the boundsclip
- the clip
public void clearBoxes()
public void drawBoxes(Graphics2D g2)
g2
- the Graphics to draw inabstract Date getDateForCoord(double x, double y)
x
- the x coordinatey
- the y coordinate
public String getTimeString(double y_fraction)
y_fraction
- the y_fraction
public abstract void refresh()
protected void removeDragNewBox()
public void removeResizeBox()
protected void setDragBounds(int ymin, int ymax, int xmin, int xmax)
ymin
- the y minimumymax
- the y maximumxmin
- the x minimumxmax
- the x maximumprotected void setDragNewBox(double x, double y, double w, double h)
x
- the x coordy
- the y coordw
- the widthh
- the heightprotected void setResizeBounds(int ymin, int ymax)
ymin
- the y minimumymax
- the y maximumprotected void setResizeBox(double x, double y, double w, double h)
x
- the x coordy
- the y coordw
- the widthh
- the heightpublic void componentHidden(ComponentEvent arg0)
componentHidden
in interface ComponentListener
public void componentMoved(ComponentEvent e)
componentMoved
in interface ComponentListener
public void componentResized(ComponentEvent e)
componentResized
in interface ComponentListener
public void componentShown(ComponentEvent e)
componentShown
in interface ComponentListener
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |