|
|||||||||
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
fr.emn.spiraclock.JSpiral
fr.emn.spiraclock.JSpiraclock
public class JSpiraclock
Spiraclock
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
javax.swing.JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
java.awt.Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary | |
---|---|
(package private) ATime |
baseday
|
(package private) float |
coef
|
(package private) javax.swing.JCheckBoxMenuItem |
dateCheck
|
(package private) java.lang.String |
dateText
|
(package private) int |
daybeginat
|
(package private) int |
dayendat
|
(package private) CustomToolTip |
descrToolTip
|
(package private) javax.swing.JCheckBoxMenuItem |
digitalCheck
|
(package private) static java.awt.Color |
disconnectedHandsColor
|
(package private) java.lang.String |
eventText
|
(package private) boolean |
followHour
|
(package private) static double |
HANDS_POS
|
(package private) static double |
HANDS_VIRTUALLENGTH
|
(package private) static double |
HANDS_WIDTH
|
(package private) static double |
HOUR_HAND_LENGTH
|
(package private) java.awt.Polygon |
hourHand
|
(package private) double |
hourModeInterval
|
(package private) java.awt.geom.GeneralPath |
hourPath
|
(package private) boolean |
hourSpiralMode
|
(package private) java.lang.String |
hourText
|
(package private) long |
jumpEnd
|
(package private) boolean |
jumping
|
(package private) int |
lastDayOfYear
|
(package private) ATime |
lastReload
|
(package private) static int |
MAX_SECTORS
|
(package private) static double |
MINUTE_HAND_LENGTH
|
(package private) java.awt.Polygon |
minuteHand
|
(package private) double |
minuteModeInterval
|
(package private) java.awt.geom.GeneralPath |
minutePath
|
(package private) static java.awt.Cursor |
MOVEHAND_CURSOR
|
(package private) boolean |
moveHour
|
(package private) boolean |
moveMinute
|
(package private) static java.awt.Color |
movingDiscHandColor
|
(package private) static java.awt.Color |
movingHandColor
|
(package private) static java.lang.String |
NO_TIP
|
(package private) static ATime |
now
|
(package private) int |
pastVisibility
|
(package private) double |
polyx
|
(package private) double |
polyy
|
(package private) javax.swing.JPopupMenu |
popup
|
(package private) int |
reloadPeriod
|
(package private) Appointment |
selectedAppointment
|
(package private) java.awt.Polygon |
selectedSector
|
(package private) boolean |
showDate
|
(package private) boolean |
showDigitalHour
|
(package private) boolean |
showEventSubject
|
(package private) boolean |
showNight
|
(package private) boolean |
showSelected
|
(package private) long |
spiralAngle
|
(package private) int |
tang
|
(package private) long |
tcur
|
(package private) static java.awt.Font |
textFont
|
(package private) javax.swing.Timer |
timer
|
(package private) int |
timeSpiralScale
|
(package private) int |
timeSpiralTrans
|
(package private) double |
tjump
|
(package private) boolean |
toBlack
|
(package private) static java.awt.Cursor |
TOOLTIP_CURSOR
|
(package private) Appointment |
tooltipAppointment
|
(package private) java.awt.Point |
tooltipLoc
|
(package private) static java.awt.Color |
userBackgroundColor
|
Fields inherited from class fr.emn.spiraclock.JSpiral |
---|
BORDER, changed, changingInterval, changingSize, cmax, cmid, cmin, csize, darking, DEFAULT_CURSOR, detail, enableSizeAdjustment, g2, interacting, INTERVAL_CURSOR, interval0, p, p0, prev_p, r, r0, RESIZE_CURSOR, s0x, s0y, size0, spiral, UPBORDER |
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 | |
---|---|
JSpiraclock()
|
|
JSpiraclock(Schedule schedule)
|
Method Summary | |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent e)
|
void |
addNotify()
Adds a feature to the Notify attribute of the JSpiraclock object |
protected void |
changeInterval(double size0,
double interval0,
double r0,
double r)
|
protected void |
changeSize(double size0,
double interval0,
double r0,
double r)
|
void |
componentResized(java.awt.event.ComponentEvent e)
Description of the Method |
protected double |
correctScale(double scale)
|
javax.swing.JToolTip |
createToolTip()
Description of the Method |
void |
focusGained(java.awt.event.FocusEvent e)
Description of the Method |
void |
focusLost(java.awt.event.FocusEvent e)
Description of the Method |
void |
followCurrentTime(boolean follow)
|
protected Appointment |
getAppointmentUnder(java.awt.Point p)
|
java.awt.Point |
getBestSideLocation(java.awt.Component c,
java.awt.Point def)
Returns the best location for a top-level component that wants to display itself inside or just next the spiraclock window. def = a default location inside component. |
java.util.Hashtable |
getProperties()
Gets the properties attribute of the JSpiraclock object |
protected static int |
getRelativeDay(long relativeTime)
|
Schedule |
getSchedule()
|
protected java.awt.Polygon |
getSector(Appointment a)
Retreive the shape of an appointment |
ATime |
getTime()
|
java.awt.Point |
getToolTipLocation(java.awt.event.MouseEvent e)
Gets the toolTipLocation attribute of the JSpiraclock object |
java.lang.String |
getToolTipText()
Gets the toolTipText attribute of the JSpiraclock object |
protected static int |
getTotalMinutes(long relativeTime)
|
protected void |
initHandShapes()
Hand shapes are initialized as double arrays, because Polygons have integer coordinates. |
void |
installPopupCommands(javax.swing.JPopupMenu popup)
Adds spiraclock commands to the popup menu |
void |
itemStateChanged(java.awt.event.ItemEvent e)
Checkboxes |
void |
jumpTo(long time,
boolean toBlack)
|
void |
mouseClicked(java.awt.event.MouseEvent e)
Description of the Method |
void |
mouseDragged(java.awt.event.MouseEvent e)
Description of the Method |
void |
mouseEntered(java.awt.event.MouseEvent e)
Description of the Method |
void |
mouseExited(java.awt.event.MouseEvent e)
Description of the Method |
void |
mouseMoved(java.awt.event.MouseEvent e)
Update tooltip text |
void |
mousePressed(java.awt.event.MouseEvent e)
Description of the Method |
void |
mouseReleased(java.awt.event.MouseEvent e)
Description of the Method |
int |
paint(java.awt.Graphics2D g,
int detail,
java.awt.Color darking,
float coef)
|
protected void |
paintHour(java.awt.Graphics2D g,
boolean accurate)
|
protected void |
paintMinute(java.awt.Graphics2D g,
boolean accurate)
|
protected void |
paintSecond(java.awt.Graphics2D g)
|
protected void |
paintSelected(java.awt.Graphics2D g)
|
protected void |
paintString(java.awt.Graphics2D g)
|
(package private) int |
parseHour(java.lang.String s)
|
void |
rebuildPopupMenu()
|
protected void |
select(Appointment app)
|
(package private) void |
set(int dayOfYear,
int h,
int m,
int s)
|
void |
setHourSpiralMode(boolean hourmode)
Sets the hourSpiralMode attribute of the JSpiraclock object |
void |
setProperties(java.util.Hashtable props)
Sets the properties attribute of the JSpiraclock object |
protected void |
setRelativeTime(long ss)
|
protected void |
setSector(int index,
int start,
int end,
double pos,
double size,
java.awt.Color color,
boolean fadeOnEnd)
|
void |
setShowDate(boolean b)
Sets the showDate attribute of the JSpiraclock object |
void |
setShowDigital(boolean b)
Sets the showDigital attribute of the JSpiraclock object |
protected void |
setTimeToNow()
|
(package private) void |
setToolTipAppointment(Appointment app,
java.awt.event.MouseEvent e)
|
void |
stateChanged(javax.swing.event.ChangeEvent e)
Description of the Method |
protected void |
timerAction()
Called by timer |
protected long |
toAngle(long relativeTime)
Converts baseday-relative seconds to absolute angle |
void |
toggleSpiralMode()
|
protected long |
toRelativeTime(ATime time)
|
protected long |
toRelativeTime(long angle)
Converts absolute angle to baseday-relative seconds |
void |
update()
Description of the Method |
protected void |
updateAngles()
Update hand & spiral angles |
protected void |
updateAppointments()
A refaire mieux que ca |
protected float |
updateDarkCoef(int h,
int m)
|
protected void |
updateHands()
Update hand shapes |
protected void |
updateSelectedSector()
|
Methods inherited from class fr.emn.spiraclock.JSpiral |
---|
adjustSizeToComponent, adjustWindowToSize, componentHidden, componentMoved, componentShown, dist, getSpiral, paint, postUpdateDetailLevel, preUpdateDetailLevel |
Methods inherited from class javax.swing.JComponent |
---|
addAncestorListener, addVetoableChangeListener, computeVisibleRect, contains, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getAccessibleContext, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUI |
Methods inherited from class java.awt.Container |
---|
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree |
Methods inherited from class java.awt.Component |
---|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
boolean showDigitalHour
boolean showEventSubject
boolean showDate
static java.awt.Color userBackgroundColor
int reloadPeriod
boolean showNight
int daybeginat
int dayendat
static final double HOUR_HAND_LENGTH
static final double MINUTE_HAND_LENGTH
static final double HANDS_WIDTH
static final double HANDS_VIRTUALLENGTH
static final double HANDS_POS
static final int MAX_SECTORS
static final java.awt.Cursor MOVEHAND_CURSOR
static final java.awt.Cursor TOOLTIP_CURSOR
static final java.awt.Color disconnectedHandsColor
static final java.awt.Color movingDiscHandColor
static final java.awt.Color movingHandColor
static final java.awt.Font textFont
static final java.lang.String NO_TIP
ATime baseday
final javax.swing.Timer timer
static ATime now
boolean followHour
long spiralAngle
ATime lastReload
float coef
boolean hourSpiralMode
double minuteModeInterval
double hourModeInterval
final java.awt.Polygon hourHand
final java.awt.Polygon minuteHand
final java.awt.geom.GeneralPath hourPath
final java.awt.geom.GeneralPath minutePath
int lastDayOfYear
double polyx
double polyy
boolean moveMinute
boolean moveHour
int tang
long tcur
boolean jumping
long jumpEnd
double tjump
boolean toBlack
java.lang.String hourText
java.lang.String dateText
java.lang.String eventText
Appointment tooltipAppointment
Appointment selectedAppointment
java.awt.Polygon selectedSector
boolean showSelected
java.awt.Point tooltipLoc
javax.swing.JPopupMenu popup
CustomToolTip descrToolTip
int timeSpiralScale
int timeSpiralTrans
int pastVisibility
javax.swing.JCheckBoxMenuItem digitalCheck
javax.swing.JCheckBoxMenuItem dateCheck
Constructor Detail |
---|
public JSpiraclock()
public JSpiraclock(Schedule schedule)
schedule
- Description of the ParameterMethod Detail |
---|
public void installPopupCommands(javax.swing.JPopupMenu popup)
popup
- Description of the Parameterpublic Schedule getSchedule()
public void setShowDate(boolean b)
b
- The new showDate valuepublic void setShowDigital(boolean b)
b
- The new showDigital valuepublic void addNotify()
addNotify
in class javax.swing.JComponent
public void rebuildPopupMenu()
public ATime getTime()
public void followCurrentTime(boolean follow)
follow
- Description of the Parameterpublic void jumpTo(long time, boolean toBlack)
time
- Description of the Parameterpublic void toggleSpiralMode()
public void setHourSpiralMode(boolean hourmode)
hourmode
- The new hourSpiralMode valueprotected double correctScale(double scale)
protected void setTimeToNow()
protected void setRelativeTime(long ss)
ss
- The new relativeTime valueprotected float updateDarkCoef(int h, int m)
protected long toRelativeTime(ATime time)
time
- Description of the Parameter
protected long toRelativeTime(long angle)
angle
- Description of the Parameter
protected long toAngle(long relativeTime)
relativeTime
- Description of the Parameter
protected static int getRelativeDay(long relativeTime)
protected static int getTotalMinutes(long relativeTime)
void set(int dayOfYear, int h, int m, int s)
public int paint(java.awt.Graphics2D g, int detail, java.awt.Color darking, float coef)
paint
in class JSpiral
g
- Description of the Parameterdetail
- Description of the Parameterdarking
- Description of the Parametercoef
- Description of the Parameter
protected void paintString(java.awt.Graphics2D g)
protected void paintHour(java.awt.Graphics2D g, boolean accurate)
protected void paintMinute(java.awt.Graphics2D g, boolean accurate)
protected void paintSecond(java.awt.Graphics2D g)
protected void paintSelected(java.awt.Graphics2D g)
protected void updateSelectedSector()
protected void initHandShapes()
protected void updateHands()
public void update()
protected void updateAngles()
protected void updateAppointments()
protected void setSector(int index, int start, int end, double pos, double size, java.awt.Color color, boolean fadeOnEnd)
protected java.awt.Polygon getSector(Appointment a)
a
- Description of the Parameter
protected void changeInterval(double size0, double interval0, double r0, double r)
changeInterval
in class JSpiral
protected void changeSize(double size0, double interval0, double r0, double r)
changeSize
in class JSpiral
public void focusGained(java.awt.event.FocusEvent e)
focusGained
in interface java.awt.event.FocusListener
e
- Description of the Parameterpublic void focusLost(java.awt.event.FocusEvent e)
focusLost
in interface java.awt.event.FocusListener
e
- Description of the Parameterprotected void timerAction()
public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed
in interface java.awt.event.ActionListener
e
- Description of the Parameterint parseHour(java.lang.String s)
public void mousePressed(java.awt.event.MouseEvent e)
mousePressed
in interface java.awt.event.MouseListener
mousePressed
in class JSpiral
e
- Description of the Parameterprotected void select(Appointment app)
protected Appointment getAppointmentUnder(java.awt.Point p)
public void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased
in interface java.awt.event.MouseListener
mouseReleased
in class JSpiral
e
- Description of the Parameterpublic java.awt.Point getBestSideLocation(java.awt.Component c, java.awt.Point def)
public void mouseDragged(java.awt.event.MouseEvent e)
mouseDragged
in interface java.awt.event.MouseMotionListener
mouseDragged
in class JSpiral
e
- Description of the Parameterpublic void mouseMoved(java.awt.event.MouseEvent e)
mouseMoved
in interface java.awt.event.MouseMotionListener
mouseMoved
in class JSpiral
e
- Description of the Parametervoid setToolTipAppointment(Appointment app, java.awt.event.MouseEvent e)
public java.lang.String getToolTipText()
getToolTipText
in class javax.swing.JComponent
public java.awt.Point getToolTipLocation(java.awt.event.MouseEvent e)
getToolTipLocation
in class javax.swing.JComponent
e
- Description of the Parameter
public javax.swing.JToolTip createToolTip()
createToolTip
in class javax.swing.JComponent
public void mouseClicked(java.awt.event.MouseEvent e)
mouseClicked
in interface java.awt.event.MouseListener
mouseClicked
in class JSpiral
e
- Description of the Parameterpublic void mouseExited(java.awt.event.MouseEvent e)
mouseExited
in interface java.awt.event.MouseListener
mouseExited
in class JSpiral
e
- Description of the Parameterpublic void mouseEntered(java.awt.event.MouseEvent e)
mouseEntered
in interface java.awt.event.MouseListener
mouseEntered
in class JSpiral
e
- Description of the Parameterpublic void componentResized(java.awt.event.ComponentEvent e)
componentResized
in interface java.awt.event.ComponentListener
componentResized
in class JSpiral
e
- Description of the Parameterpublic void itemStateChanged(java.awt.event.ItemEvent e)
itemStateChanged
in interface java.awt.event.ItemListener
e
- Description of the Parameterpublic void stateChanged(javax.swing.event.ChangeEvent e)
stateChanged
in interface javax.swing.event.ChangeListener
e
- Description of the Parameterpublic java.util.Hashtable getProperties()
public void setProperties(java.util.Hashtable props)
props
- The new properties value
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |