sub_arctic.output
Class single_isolation_drawable
java.lang.Object
|
+--java.awt.Graphics
|
+--sub_arctic.output.drawable
|
+--sub_arctic.output.drawable_wrapper
|
+--sub_arctic.output.single_isolation_drawable
- public class single_isolation_drawable
- extends drawable_wrapper
Subclass of drawable_wrapper that is used for isolated_drawing of a single
interactor. This assumes the first interactor that draws itself is
the one we want isolated (i.e., we called draw_self() directly on that
interactor passing this drawable). We baically use a false return value
from start_interactor_draw() to shortcut all drawing of children.
- See Also:
Graphics
Field Summary |
protected int |
_tree_depth
Distance from the isolated object. |
Method Summary |
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 |
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.drawable_wrapper |
arrowhead_bound,
clearRect,
clipRect,
copy,
copy,
copyArea,
dispose,
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,
finalize,
getClipBounds,
getColor,
getFont,
getFontMetrics,
getFontMetrics,
graphics,
mark_interactor_draw,
setClip,
setColor,
setFont,
setPaintMode,
setXORMode,
tileImage,
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 |
_tree_depth
protected int _tree_depth
- Distance from the isolated object. This should have only
values -1, 0 and 1 representing, waiting to draw, at the object, and at
one of the children.
single_isolation_drawable
public single_isolation_drawable(drawable rappee)
- Full constructor
- Parameters:
drawable
- rappee the drawable we create a wrapper around.
single_isolation_drawable
public single_isolation_drawable(java.awt.Graphics rappee)
- Constructor working from a Graphics. We will basically create a
plain drawable wrapping the given Graphics object, then use that
as the drawable we wrap.
- Parameters:
Graphics
- rappee the object we are wrapper around.
create
public java.awt.Graphics create()
- Override create() to create the properly typed wrapper around a copy of
the object we wrap.
Note: subclasses will typically need to do this also.
- Returns:
- Graphics a new single_isolation_drawable object copied from this
one.
- Overrides:
- create in class drawable_wrapper
create
public 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.
Note: subclasses will typically need to do this also.
- Parameters:
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 drawable- Returns:
- Graphics a new single_isolation_drawable object derived from this
one.
- Overrides:
- create in class drawable_wrapper
start_interactor_draw
public boolean start_interactor_draw(interactor of_interactor)
- Method to be called to mark the beginning of output for a particular
interactor. This is normally called (only) in draw_self(). The return
value indicates whether the interactor (and its children) should be
drawn (i.e., if false is returned, the drawing should be skipped and
draw_self() should simply return).
In this subclass we use this to determine whether we draw or not.
If we are drawing the isolated object, we return true and let it draw.
If we are drawing one of the children, we return false and have it
shortcut its drawing.
- Parameters:
interactor
- of_interactor the interactor we are starting to drawboolean
- whether the drawing of the interactor (and its children)
should be performed.- Overrides:
- start_interactor_draw in class drawable_wrapper
- See Also:
drawable_wrapper.mark_interactor_draw(sub_arctic.lib.interactor, java.lang.Object)
,
end_interactor_draw(sub_arctic.lib.interactor)
end_interactor_draw
public void end_interactor_draw(interactor of_interactor)
- Method to be called to mark the end of output for a particular interactor.
This is normally called (only) in draw_self().
Here we use this to keep track of when we return from drawing children.
- Parameters:
interactor
- of_interactor the interactor we are starting to draw- Overrides:
- end_interactor_draw in class drawable_wrapper
- See Also:
drawable_wrapper.mark_interactor_draw(sub_arctic.lib.interactor, java.lang.Object)
,
start_interactor_draw(sub_arctic.lib.interactor)
toString
public java.lang.String toString()
- Convert to a human readable string.
- Overrides:
- toString in class drawable_wrapper