|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Graphics | +--sub_arctic.output.drawable | +--sub_arctic.output.drawable_wrapper | +--sub_arctic.output.conditional_drawable | +--sub_arctic.output.isolation_drawable
Subclass of conditional drawable that is used for drawing isolation. This keeps track of a set of interactors that are to be isolated, and basically shuts down all drawing calls (but not state changes such as color and clipping changes) that aren't part of drawing one of those interactors (but otherwise draws there as they would appear in a full drawing). This class wraps another drawing object rather than being a conventional drawable in and of itself. This allows isolation to be composed with other drawing effects.
Graphics
Field Summary | |
protected java.util.Stack |
_drawing_stack
Stack of interactors currently in the process of drawing |
protected java.util.Hashtable |
_isolated_set
A hash table holding the interactors we are limiting drawing to. |
Fields inherited from class sub_arctic.output.conditional_drawable |
_currently_drawing |
Fields inherited from class sub_arctic.output.drawable_wrapper |
_wrappee |
Fields inherited from class sub_arctic.output.drawable |
_ignore,
g |
Constructor Summary | |
isolation_drawable(drawable rappee)
Constructor assuming an empty isolation set. |
|
isolation_drawable(drawable rappee,
interactor solo)
Constructor for initializing the isolation set to one element. |
|
isolation_drawable(drawable rappee,
interactor[] init)
Constructor for initializing the isolation set from an array of interactors. |
|
isolation_drawable(drawable rappee,
java.util.Vector init)
Constructor for initializing the isolation set from an Vector of interactors. |
|
isolation_drawable(java.awt.Graphics rappee)
Constructor working from a Graphics. |
Method Summary | |
void |
add_to_isolated_set(interactor to_add)
Add the given interactor to the isolated set. |
void |
clear_isolated_set()
Clear the set of interactors we are isolating. |
java.awt.Graphics |
create()
Override create() to create the properly typed wrapper around a copy of the object we wrap. |
java.awt.Graphics |
create(int x,
int y,
int w,
int h)
Override create() to create the properly typed wrapper around a copy of the object we wrap. |
void |
end_interactor_draw(interactor of_interactor)
Method to be called to mark the end of output for a particular interactor. |
boolean |
in_isolated_set(interactor in_question)
Determine if the given interactor is in the isolated set. |
java.util.Enumeration |
isolated_set()
An Enumeration that will iterate over the elements of the set of interactors we are isolating. |
boolean |
mark_interactor_draw(interactor of_interactor,
java.lang.Object mark_obj)
Method to be called to mark a significant point during output for a particular interactor. |
void |
remove_from_isolated_set(interactor to_rm)
Remove the given interactor from the isolated set. |
boolean |
start_interactor_draw(interactor of_interactor)
Method to be called to mark the beginning of output for a particular interactor. |
java.lang.String |
toString()
Convert to a human readable string. |
Methods inherited from class sub_arctic.output.conditional_drawable |
clearRect,
copyArea,
currently_drawing,
draw_arrowhead,
draw3DRect,
drawArc,
drawBytes,
drawChars,
drawImage,
drawImage,
drawImage,
drawImage,
drawImage,
drawImage,
drawImage,
drawImage,
drawLine,
drawOval,
drawPolygon,
drawPolygon,
drawRect,
drawRoundRect,
drawString,
fill_arrowhead,
fill3DRect,
fillArc,
fillOval,
fillPolygon,
fillPolygon,
fillRect,
fillRoundRect,
set_currently_drawing,
tileImage |
Methods inherited from class sub_arctic.output.drawable_wrapper |
arrowhead_bound,
clipRect,
copy,
copy,
dispose,
finalize,
getClipBounds,
getColor,
getFont,
getFontMetrics,
getFontMetrics,
graphics,
setClip,
setColor,
setFont,
setPaintMode,
setXORMode,
translate,
wrappee |
Methods inherited from class sub_arctic.output.drawable |
arrowhead_bound,
clear_rect,
clip_rect,
copy_area,
draw_3D_rect,
draw_arc,
draw_arrowhead,
draw_bytes,
draw_chars,
draw_image,
draw_image,
draw_image,
draw_image,
draw_image,
draw_image,
draw_image,
draw_image,
draw_image,
draw_image,
draw_image,
draw_image,
draw_line,
draw_oval,
draw_polygon,
draw_polygon,
draw_polyline,
draw_rect,
draw_round_rect,
draw_string,
drawImage,
drawImage,
drawImage,
drawImage,
drawPolyline,
drawString,
fill_3D_rect,
fill_arc,
fill_arrowhead,
fill_oval,
fill_polygon,
fill_polygon,
fill_rect,
fill_round_rect,
get_clip_bounds,
get_clip,
get_color,
get_font_metrics,
get_font_metrics,
get_font,
getClip,
set_clip,
set_clip,
set_color,
set_font,
set_paint_mode,
set_XOR_mode,
setClip,
tile_image |
Methods inherited from class java.awt.Graphics |
getClipBounds,
getClipRect,
hitClip |
Methods inherited from class java.lang.Object |
clone,
equals,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Field Detail |
protected java.util.Hashtable _isolated_set
protected java.util.Stack _drawing_stack
Constructor Detail |
public isolation_drawable(drawable rappee)
drawable
- rappee the drawable we create a wrapper around.public isolation_drawable(drawable rappee, interactor solo)
drawable
- rappee the drawable we create a wrapper around.interactor
- solo the single isolated interactor.public isolation_drawable(drawable rappee, interactor[] init)
drawable
- rappee the drawable we create a wrapper around.interactor[]
- init the interactors to isolate.public isolation_drawable(drawable rappee, java.util.Vector init)
drawable
- rappee the drawable we create a wrapper around.Vector
- init the interactors to isolate. This vector must
contain only interactor objects, or an exception
will be thrown.public isolation_drawable(java.awt.Graphics rappee)
Graphics
- rappee the object we are wrapper around.Method Detail |
public java.util.Enumeration isolated_set()
public void clear_isolated_set()
public void add_to_isolated_set(interactor to_add)
interactor
- to_add the interactor being added to the set.public boolean in_isolated_set(interactor in_question)
interactor
- in_question the interactor being asked about.public void remove_from_isolated_set(interactor to_rm)
interactor
- to_rm the interactor being added to the set.public java.awt.Graphics create()
public java.awt.Graphics create(int x, int y, int w, int h)
int
- x x component of origin of new drawableint
- y y component of origin of new drawableint
- w width of new drawableint
- h height of new drawablepublic boolean start_interactor_draw(interactor of_interactor)
In this subclass we use this to determine when to turn drawing on and off. Basically we keep a stack of currently drawing interactors and when we are drawing one in the isolation set we turn drawing operations on and otherwise we turn them off.
interactor
- of_interactor the interactor we are starting to drawboolean
- whether the drawing of the interactor (and its children)
should be performed.mark_interactor_draw(sub_arctic.lib.interactor, java.lang.Object)
,
end_interactor_draw(sub_arctic.lib.interactor)
public boolean mark_interactor_draw(interactor of_interactor, java.lang.Object mark_obj)
interactor
- of_interactor the interactor we are currently drawingObject
- mark_obj an object giving additional information
about the markboolean
- whether the drawing of the interactor (and its children)
should be performed.start_interactor_draw(sub_arctic.lib.interactor)
,
end_interactor_draw(sub_arctic.lib.interactor)
public void end_interactor_draw(interactor of_interactor)
Here we use this to turn drawing on or off as we reenter or leave an isolated interactor.
interactor
- of_interactor the interactor we are starting to drawmark_interactor_draw(sub_arctic.lib.interactor, java.lang.Object)
,
start_interactor_draw(sub_arctic.lib.interactor)
public java.lang.String toString()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |