|
SilverStream Application Server 3.5 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Container | +--javax.swing.JComponent | +--javax.swing.JPanel | +--com.sssw.rt.atlas.AtPanel | +--com.sssw.rt.atlas.AtCanvas | +--com.sssw.rt.form.PvBaseCanvas | +--com.sssw.rt.form.PvInvisibleControlBase | +--com.sssw.rt.form.AgcTimer
The AgcTimer control (Timer) is an invisible control used to
trigger actions at specified intervals (in seconds). The Interval can be set at design time
using the Interval property, or at run time using the AgcTimer.setInterval(double)
method.
Note: The ancestor methods in this class, that is all methods inherited from the non-public PvInvisibleControlBase (including JComponent and Component) are not visible at run time, and are primarily for use by SilverStream. The useful methods are contained in the AgcTimer class itself.
Inner classes inherited from class javax.swing.JPanel |
JPanel.AccessibleJPanel |
Inner classes inherited from class javax.swing.JComponent |
JComponent.AccessibleJComponent |
Fields inherited from class com.sssw.rt.atlas.AtPanel |
BGIMAGE_DRAW_CENTERED,
BGIMAGE_DRAW_NORMAL,
BGIMAGE_DRAW_STRETCH,
BGIMAGE_DRAW_TILED |
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 |
Constructor Summary | |
AgcTimer()
|
Method Summary | |
void |
addAgiTimerListener(AgiTimerListener listener)
Add a listener to receive timer events. |
double |
getInterval()
Returns the interval between events in seconds. |
void |
removeAgiTimerListener(AgiTimerListener listener)
Remove a timer listener. |
void |
setInterval(double interval)
Set the interval for the timer events, and starts the timer if it is inactive. |
void |
startTimer()
Starts the Timer control. |
void |
stopTimer()
Stops the Timer control. |
Methods inherited from class com.sssw.rt.form.PvInvisibleControlBase |
setBounds,
setLocation,
setSize |
Methods inherited from class com.sssw.rt.form.PvBaseCanvas |
getBackgroundColor,
getFontIdentifier,
setBackgroundColor,
setFontIdentifier |
Methods inherited from class com.sssw.rt.atlas.AtPanel |
addImpl,
addNotify,
clientPaint,
clientPaint,
deliverMouseEvent,
deliverMouseMoveEvent,
doAtCommand,
drawTiledImage,
enableAtCommands,
getBackgroundImage,
getBackgroundImageMode,
getHelper,
getTransparent,
hide,
hideToolTip,
imageUpdate,
isFocusTraversable,
isOptimizedDrawingEnabled,
ownedImage,
paintBorder,
paintComponent,
paintImmediately,
paintImmediately,
paintNow,
preprocessKeyEvent,
processEvent,
reshape,
setBackgroundImage,
setBackgroundImageMode,
setTransparent,
show,
showToolTip |
Methods inherited from class javax.swing.JPanel |
getAccessibleContext,
getUIClassID,
paramString,
updateUI |
Methods inherited from class java.awt.Container |
add,
add,
add,
add,
add,
addContainerListener,
countComponents,
deliverEvent,
doLayout,
findComponentAt,
findComponentAt,
getComponent,
getComponentAt,
getComponentAt,
getComponentCount,
getComponents,
getLayout,
insets,
invalidate,
isAncestorOf,
layout,
list,
list,
locate,
minimumSize,
paintComponents,
preferredSize,
printComponents,
processContainerEvent,
remove,
remove,
removeAll,
removeContainerListener,
setCursor,
setLayout,
validate,
validateTree |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Methods implemented from interface com.sssw.rt.form.AgiControl |
getComponent,
getHelpInfo,
setHelpInfo |
Constructor Detail |
public AgcTimer()
Method Detail |
public void setInterval(double interval)
interval
- the interval between events in secondsThe following example illustrates how to set the interval to 3.2 seconds.
timer1.setInterval(3.2);
AgcTimer.stopTimer()
,
AgcTimer.startTimer()
,
AgcTimer.getInterval()
public double getInterval()
An Interval is the amount of time (in seconds) at which the timeIntervalExpired event fires.
The following example illustrates how to obtain the current Interval.
double interval; interval = timer1.getInterval();
AgcTimer.stopTimer()
,
AgcTimer.startTimer()
,
AgcTimer.setInterval(double)
public void startTimer()
The Timer control has an Interval specified. The Interval determines the number of seconds between timer events. The timer will start automatically when the application is started if the Start Automatically property is set to true at design time. If this property is false, then the timer must be started with the startTimer() method.
The stopTimer()
method will stop the timer at runtime.
The following example illustrates how to use the startTimer()
method.
timer1.startTimer();
AgcTimer.stopTimer()
,
AgcTimer.setInterval(double)
,
AgcTimer.getInterval()
public void stopTimer()
The Timer control has an Interval specified. The Interval determines the number of seconds between timer events. The Timer can be started automatically when the application is started by setting the Start Automatically property to true at design time. If this property is false, then the timer must be started by calling the startTimer() method.
The startTimer()
method is also used to restart the timer at runtime.
The following example illustrates how to use the stopTimer method.
timer1.stopTimer();
AgcTimer.startTimer()
,
AgcTimer.setInterval(double)
,
AgcTimer.getInterval()
public void addAgiTimerListener(AgiTimerListener listener)
listener
- the object to receive timer eventsAs an alternative to coding on the timeIntervalExpired method, an object receive timer events if the object implements the AgiTimerListener interface.
timer1.addAgiTimerListener(myTimerListener);
public void removeAgiTimerListener(AgiTimerListener listener)
listener
- the object to be removed
If the listener has not previously been added with
addAgiTimerListener()
, then this call is ignored.
timer1.removeAgiTimerListener(myTimerListener);
|
SilverStream Application Server 3.5 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |