|
Holger's Java API |
|||||||||
| 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
com.antelmann.calendar.JDayGrid
public class JDayGrid
| Nested Class Summary | |
|---|---|
static class |
JDayGrid.Orientation
|
| 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 int |
beginTime
time in millis from day start |
static CalendarEntryComponentFactory |
defaultFactory
uses JCalendarEntry objects |
protected int |
endTime
time in millis from day start |
protected Color |
gridColor
used to draw time interval lines |
protected int |
gridPixel
other size of the grid in pixels |
protected int |
intervalPixel
size of one time interval in pixels |
protected Color |
textColor
used to draw time interval text |
protected int |
timeInterval
time in millis, used for displaying an interval w/ a line |
protected int |
timeSnapInterval
time in millis, used for snapping |
| 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 | |
|---|---|
JDayGrid()
|
|
JDayGrid(Date date)
|
|
JDayGrid(Date date,
JDayGrid.Orientation orientation)
|
|
JDayGrid(Date date,
JDayGrid.Orientation orientation,
boolean printText)
|
|
JDayGrid(Date date,
JDayGrid.Orientation orientation,
boolean printText,
CalendarEntryComponentFactory factory)
|
|
JDayGrid(JDayGrid.Orientation orientation)
|
|
| Method Summary | |
|---|---|
int |
getBeginTime()
time in millisec from the begin of the day |
CalendarEntryComponentFactory |
getComponentFactory()
|
Component |
getComponentFor(CalendarEntry entry)
|
Date |
getDate()
|
int |
getEndTime()
time in millisec from the begin of the day |
int |
getGridPixel()
|
int |
getIntervalPixel()
the number of pixels representing a time interval |
boolean |
getPrintText()
|
Date |
getTimeFor(Point p)
returns the time that corresponds to the given point |
int |
getTimeInterval()
the time interval used for dwawing (in milliseconds) |
int |
getTimeSnapInterval()
|
protected void |
paintComponent(Graphics g)
|
Component |
placeEntry(CalendarEntry entry)
uses the configured CalendarEntryComponentFactory |
void |
removeAll()
does not only remove all components, but also the associations from a CalendarEntry to a component |
void |
setBeginTime(int beginTime)
time in millisec from the begin of the day |
void |
setComponentFactory(CalendarEntryComponentFactory factory)
used to create the component when calling placeEntry(CalendarEntry) |
void |
setDate(Date date)
also performs a call to removeAll |
void |
setEndTime(int endTime)
time in millisec from the begin of the day |
void |
setGridPixel(int pixel)
|
void |
setIntervalPixel(int pixels)
|
void |
setPrintText(boolean flag)
|
void |
setTimeInterval(int millis)
|
void |
setTimeSnapInterval(int snapInterval)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final CalendarEntryComponentFactory defaultFactory
JCalendarEntryprotected Color gridColor
protected Color textColor
protected int beginTime
protected int endTime
protected int timeInterval
protected int timeSnapInterval
protected int intervalPixel
protected int gridPixel
| Constructor Detail |
|---|
public JDayGrid()
public JDayGrid(Date date)
public JDayGrid(JDayGrid.Orientation orientation)
public JDayGrid(Date date,
JDayGrid.Orientation orientation)
public JDayGrid(Date date,
JDayGrid.Orientation orientation,
boolean printText)
public JDayGrid(Date date,
JDayGrid.Orientation orientation,
boolean printText,
CalendarEntryComponentFactory factory)
| Method Detail |
|---|
public void setComponentFactory(CalendarEntryComponentFactory factory)
placeEntry(CalendarEntry)
public CalendarEntryComponentFactory getComponentFactory()
public Component placeEntry(CalendarEntry entry)
setComponentFactory(CalendarEntryComponentFactory)public void removeAll()
removeAll in class Containerpublic Component getComponentFor(CalendarEntry entry)
public void setDate(Date date)
removeAll
public Date getDate()
public int getEndTime()
public void setEndTime(int endTime)
public int getBeginTime()
public void setBeginTime(int beginTime)
public boolean getPrintText()
public void setPrintText(boolean flag)
public void setTimeSnapInterval(int snapInterval)
public int getTimeSnapInterval()
public int getGridPixel()
public int getTimeInterval()
public void setTimeInterval(int millis)
public int getIntervalPixel()
public void setIntervalPixel(int pixels)
public void setGridPixel(int pixel)
public Date getTimeFor(Point p)
protected void paintComponent(Graphics g)
paintComponent in class JComponent
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||