|
||||||||||
| 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
edu.neu.ccs.gui.PaintActionCapsule
A JComponent that contains
a sequence of action listeners performed every time
this component is painted.
| Nested Class Summary |
| Nested classes inherited from class javax.swing.JComponent |
JComponent.AccessibleJComponent |
| Nested classes inherited from class java.awt.Container |
Container.AccessibleAWTContainer |
| Nested classes inherited from class java.awt.Component |
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary | |
protected ActionSequence |
actions
Sequence of action listeners to perform when painted. |
| 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.Container |
|
| 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 | |
PaintActionCapsule()
Constructs a component with no action listeners to perform. |
|
PaintActionCapsule(ActionListener a)
Constructs a component that performs the given action listener each time it is painted. |
|
PaintActionCapsule(ActionListener[] a)
Constructs a component that performs the given action listeners each time it is painted. |
|
PaintActionCapsule(ActionListener[] a,
Color c)
Constructs a component with the given foreground color that performs the given action listeners each time it is painted. |
|
PaintActionCapsule(ActionListener[] a,
Color c,
Dimension d)
Constructs a component with the given foreground color and preferred size that performs the given action listeners each time it is painted. |
|
PaintActionCapsule(ActionListener[] a,
Color c,
int width,
int height)
Constructs a component with the given foreground color and preferred dimensions that performs the given action listeners each time it is painted. |
|
PaintActionCapsule(ActionListener[] a,
Dimension d)
Constructs a component with the given preferred size that performs the given action listeners each time it is painted. |
|
PaintActionCapsule(ActionListener[] a,
int width,
int height)
Constructs a component with the given preferred size that performs the given action listeners each time it is painted. |
|
PaintActionCapsule(ActionListener a,
Color c)
Constructs a component with the given foreground color that performs the given action listener each time it is painted. |
|
PaintActionCapsule(ActionListener a,
Color c,
Dimension d)
Constructs a component with the given foreground color and preferred size that performs the given action listener each time it is painted. |
|
PaintActionCapsule(ActionListener a,
Color c,
int width,
int height)
Constructs a component with the given foreground color and preferred dimensions that performs the given action listener each time it is painted. |
|
PaintActionCapsule(ActionListener a,
Dimension d)
Constructs a component with the given preferred size that performs the given action listener each time it is painted. |
|
PaintActionCapsule(ActionListener a,
int width,
int height)
Constructs a component with the given preferred dimensions that performs the given action listener each time it is painted. |
|
| Method Summary | |
void |
addAction(ActionListener a)
Adds the given action listener to the end of the sequence of action listeners performed when this component is painted. |
void |
addActions(ActionListener[] a)
Adds the action listeners in the given array, in order, to the end of the sequence of action listeners performed when this component is painted. |
ActionSequence |
getActionSequence()
Returns the sequence of action listeners performed when this component is painted. |
protected void |
paintComponent(Graphics g)
Performs the stored sequence of action listeners. |
boolean |
removeAction(ActionListener a)
Removes the first occurrence of the given action listener in the sequence of action listeners performed when this component is painted, and returns true,
or returns false if the sequence
does not contain the action listener. |
void |
setAction(ActionListener a)
Sets the action performed when this component is painted to the given action listener. |
void |
setActions(ActionListener[] a)
Sets the action listeners performed when this component is painted to the action listeners in the given array, in order. |
void |
setActionSequence(ActionSequence sequence)
Sets the sequence of action listeners performed when this component is painted to the given sequence of action listeners. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected ActionSequence actions
| Constructor Detail |
public PaintActionCapsule()
public PaintActionCapsule(ActionListener a)
a - action listener to performPaintActionCapsule(ActionListener, Color),
PaintActionCapsule(ActionListener, Dimension),
PaintActionCapsule(ActionListener, int, int),
PaintActionCapsule(ActionListener, Color, Dimension),
PaintActionCapsule(ActionListener, Color, int, int)
public PaintActionCapsule(ActionListener a,
Color c)
a - action listener to performc - foreground color for componentPaintActionCapsule(ActionListener),
PaintActionCapsule(ActionListener, Dimension),
PaintActionCapsule(ActionListener, int, int),
PaintActionCapsule(ActionListener, Color, Dimension),
PaintActionCapsule(ActionListener, Color, int, int)
public PaintActionCapsule(ActionListener a,
Dimension d)
a - action listener to performd - preferred size for componentPaintActionCapsule(ActionListener),
PaintActionCapsule(ActionListener, Color),
PaintActionCapsule(ActionListener, int, int),
PaintActionCapsule(ActionListener, Color, Dimension),
PaintActionCapsule(ActionListener, Color, int, int)
public PaintActionCapsule(ActionListener a,
int width,
int height)
a - action listener to performwidth - preferred width for componentheight - preferred height for componentPaintActionCapsule(ActionListener),
PaintActionCapsule(ActionListener, Color),
PaintActionCapsule(ActionListener, Dimension),
PaintActionCapsule(ActionListener, Color, Dimension),
PaintActionCapsule(ActionListener, Color, int, int)
public PaintActionCapsule(ActionListener a,
Color c,
Dimension d)
a - action listener to performc - foreground color for componentd - preferred size for componentPaintActionCapsule(ActionListener),
PaintActionCapsule(ActionListener, Color),
PaintActionCapsule(ActionListener, Dimension),
PaintActionCapsule(ActionListener, int, int),
PaintActionCapsule(ActionListener, Color, int, int)
public PaintActionCapsule(ActionListener a,
Color c,
int width,
int height)
a - action listener to performc - foreground color for componentwidth - preferred width for componentheight - preferred height for componentPaintActionCapsule(ActionListener),
PaintActionCapsule(ActionListener, Color),
PaintActionCapsule(ActionListener, Dimension),
PaintActionCapsule(ActionListener, int, int),
PaintActionCapsule(ActionListener, Color, Dimension)public PaintActionCapsule(ActionListener[] a)
a - array of action listeners to performPaintActionCapsule(ActionListener[], Color),
PaintActionCapsule(ActionListener[], Dimension),
PaintActionCapsule(ActionListener[], int, int),
PaintActionCapsule(ActionListener[], Color, Dimension),
PaintActionCapsule(ActionListener[], Color, int, int)
public PaintActionCapsule(ActionListener[] a,
Color c)
a - array of action listeners to performc - foreground color for componentPaintActionCapsule(ActionListener[]),
PaintActionCapsule(ActionListener[], Dimension),
PaintActionCapsule(ActionListener[], int, int),
PaintActionCapsule(ActionListener[], Color, Dimension),
PaintActionCapsule(ActionListener[], Color, int, int)
public PaintActionCapsule(ActionListener[] a,
Dimension d)
a - array of action listeners to performd - preferred size for componentPaintActionCapsule(ActionListener[]),
PaintActionCapsule(ActionListener[], Color),
PaintActionCapsule(ActionListener[], int, int),
PaintActionCapsule(ActionListener[], Color, Dimension),
PaintActionCapsule(ActionListener[], Color, int, int)
public PaintActionCapsule(ActionListener[] a,
int width,
int height)
a - array of action listeners to performwidth - preferred width for componentheight - preferred height for componentPaintActionCapsule(ActionListener[]),
PaintActionCapsule(ActionListener[], Color),
PaintActionCapsule(ActionListener[], Dimension),
PaintActionCapsule(ActionListener[], Color, Dimension),
PaintActionCapsule(ActionListener[], Color, int, int)
public PaintActionCapsule(ActionListener[] a,
Color c,
Dimension d)
a - array of action listeners to performc - foreground color for componentd - preferred size for componentPaintActionCapsule(ActionListener[]),
PaintActionCapsule(ActionListener[], Color),
PaintActionCapsule(ActionListener[], Dimension),
PaintActionCapsule(ActionListener[], int, int),
PaintActionCapsule(ActionListener[], Color, int, int)
public PaintActionCapsule(ActionListener[] a,
Color c,
int width,
int height)
a - array of action listeners to performc - foreground color for componentwidth - preferred width for componentheight - preferred height for componentPaintActionCapsule(ActionListener[]),
PaintActionCapsule(ActionListener[], Color),
PaintActionCapsule(ActionListener[], Dimension),
PaintActionCapsule(ActionListener[], int, int),
PaintActionCapsule(ActionListener[], Color, Dimension)| Method Detail |
public ActionSequence getActionSequence()
setActionSequence(ActionSequence)public void setActionSequence(ActionSequence sequence)
null,
the sequence of action listeners
performed when this component is painted
is set to a new empty sequence.
sequence - sequence of action listeners to performgetActionSequence()public void addAction(ActionListener a)
null,
the sequence of action listeners is not changed.
a - action listener to add to the sequence of action listenersaddActions(ActionListener[]),
setAction(ActionListener),
setActions(ActionListener[])public void addActions(ActionListener[] a)
null,
the sequence of action listeners is not changed.
addAction(ActionListener),
setAction(ActionListener),
setActions(ActionListener[])public boolean removeAction(ActionListener a)
true,
or returns false if the sequence
does not contain the action listener.
If the given action listener is not in the sequence,
the sequence is not changed.
a - action listener to no longer perform
public void setAction(ActionListener a)
null,
the sequence of action listeners
performed when this component is painted
is set to a new empty sequence.
a - action listener to performsetActions(ActionListener[]),
addAction(ActionListener),
addActions(ActionListener[])public void setActions(ActionListener[] a)
null,
the sequence of action listeners
performed when this component is painted
is set to a new empty sequence.
a - array of action listeners to performsetAction(ActionListener),
addAction(ActionListener),
addActions(ActionListener[])protected final void paintComponent(Graphics g)
g - graphics context on which to paint
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||