org.gnu.gnome

Class CanvasItem

Known Direct Subclasses:
CanvasGroup, CanvasLine, CanvasPixbuf, CanvasRichText, CanvasShape, CanvasText, CanvasWidget, IconTextItem

public class CanvasItem
extends GtkObject

The GnomeCanvasItem is the base class of all items that a GnomeCanvas displays.

Constructor Summary

CanvasItem(CanvasGroup group, int type)

Method Summary

void
affineAbsolute(double[] affine)
Apply an absolute affine transformation to the item.
void
affineRelative(double[] affine)
Apply a relative affine transformation to the item.
Canvas
getCanvas()
Returns the parent canvas for this item.
protected static Handle
getCanvas(Handle cptr)
CanvasGroup
getParent()
Return the parent canvas group for this item.
protected static Handle
getParent(Handle cptr)
static Type
getType()
Retrieve the runtime type used by the GLib library.
double
getX1()
X1 coordinate fo the bounding box for this item (in canvas coordinates).
protected static double
getX1(Handle cptr)
double
getX2()
X2 coordinate fo the bounding box for this item (in canvas coordinates).
protected static double
getX2(Handle cptr)
double
getY1()
Y1 coordinate fo the bounding box for this item (in canvas coordinates).
protected static double
getY1(Handle cptr)
double
getY2()
Y2 coordinate fo the bounding box for this item (in canvas coordinates).
protected static double
getY2(Handle cptr)
protected static void
gnome_canvas_item_affine_absolute(Handle item, double[] affine)
protected static void
gnome_canvas_item_affine_relative(Handle item, double[] affine)
protected static int
gnome_canvas_item_get_type()
protected static int
gnome_canvas_item_grab(Handle item, int event_mask, Handle cursor, int etime)
protected static void
gnome_canvas_item_grab_focus(Handle item)
protected static void
gnome_canvas_item_hide(Handle item)
protected static void
gnome_canvas_item_lower(Handle item, int positions)
protected static void
gnome_canvas_item_lower_to_bottom(Handle item)
protected static void
gnome_canvas_item_move(Handle item, double dx, double dy)
protected static Handle
gnome_canvas_item_new(Handle group, int type)
protected static void
gnome_canvas_item_raise(Handle item, int position)
protected static void
gnome_canvas_item_raise_to_top(Handle item)
protected static void
gnome_canvas_item_reparent(Handle item, Handle new_group)
protected static void
gnome_canvas_item_request_update(Handle item)
protected static void
gnome_canvas_item_show(Handle item)
protected static void
gnome_canvas_item_ungrab(Handle item, int etime)
void
hide()
Hide the item (make it invisible).
void
lower(int positions)
Lower the item in the z-order of its parent group by the specified number of positions.
void
lowerToBotton()
Lower the item to the bottom of its parent group's z-order.
void
move(double x, double y)
Move the item by the specified amount.
void
raise(int positions)
Raise the item in the z-order of its parent group by the specified number of positions.
void
raiseToTop()
Raise the item to the top of its parent group's z-order.
void
show()
Show the item (make it visible).

Constructor Details

CanvasItem

protected CanvasItem(CanvasGroup group,
                     int type)

Method Details

affineAbsolute

public void affineAbsolute(double[] affine)
Apply an absolute affine transformation to the item.

Parameters:
affine - the affine to apply.


affineRelative

public void affineRelative(double[] affine)
Apply a relative affine transformation to the item.

Parameters:
affine - The affine to apply.


getCanvas

public Canvas getCanvas()
Returns the parent canvas for this item.

Returns:
The parent canvas.


getCanvas

protected static final Handle getCanvas(Handle cptr)


getParent

public CanvasGroup getParent()
Return the parent canvas group for this item.

Returns:
The parent cavas group.


getParent

protected static final Handle getParent(Handle cptr)


getType

public static Type getType()
Retrieve the runtime type used by the GLib library.


getX1

public double getX1()
X1 coordinate fo the bounding box for this item (in canvas coordinates).

Returns:
The X1 coordinate.


getX1

protected static final double getX1(Handle cptr)


getX2

public double getX2()
X2 coordinate fo the bounding box for this item (in canvas coordinates).

Returns:
The X2 coordinate.


getX2

protected static final double getX2(Handle cptr)


getY1

public double getY1()
Y1 coordinate fo the bounding box for this item (in canvas coordinates).

Returns:
The Y1 coordinate.


getY1

protected static final double getY1(Handle cptr)


getY2

public double getY2()
Y2 coordinate fo the bounding box for this item (in canvas coordinates).

Returns:
The Y2 coordinate.


getY2

protected static final double getY2(Handle cptr)


gnome_canvas_item_affine_absolute

protected static final void gnome_canvas_item_affine_absolute(Handle item,
                                                              double[] affine)


gnome_canvas_item_affine_relative

protected static final void gnome_canvas_item_affine_relative(Handle item,
                                                              double[] affine)


gnome_canvas_item_get_type

protected static final int gnome_canvas_item_get_type()


gnome_canvas_item_grab

protected static final int gnome_canvas_item_grab(Handle item,
                                                  int event_mask,
                                                  Handle cursor,
                                                  int etime)


gnome_canvas_item_grab_focus

protected static final void gnome_canvas_item_grab_focus(Handle item)


gnome_canvas_item_hide

protected static final void gnome_canvas_item_hide(Handle item)


gnome_canvas_item_lower

protected static final void gnome_canvas_item_lower(Handle item,
                                                    int positions)


gnome_canvas_item_lower_to_bottom

protected static final void gnome_canvas_item_lower_to_bottom(Handle item)


gnome_canvas_item_move

protected static final void gnome_canvas_item_move(Handle item,
                                                   double dx,
                                                   double dy)


gnome_canvas_item_new

protected static final Handle gnome_canvas_item_new(Handle group,
                                                    int type)


gnome_canvas_item_raise

protected static final void gnome_canvas_item_raise(Handle item,
                                                    int position)


gnome_canvas_item_raise_to_top

protected static final void gnome_canvas_item_raise_to_top(Handle item)


gnome_canvas_item_reparent

protected static final void gnome_canvas_item_reparent(Handle item,
                                                       Handle new_group)


gnome_canvas_item_request_update

protected static final void gnome_canvas_item_request_update(Handle item)


gnome_canvas_item_show

protected static final void gnome_canvas_item_show(Handle item)


gnome_canvas_item_ungrab

protected static final void gnome_canvas_item_ungrab(Handle item,
                                                     int etime)


hide

public void hide()
Hide the item (make it invisible). If the item is already invisible, it has no effect.


lower

public void lower(int positions)
Lower the item in the z-order of its parent group by the specified number of positions.

Parameters:
positions - The number of positions to lower the item.


lowerToBotton

public void lowerToBotton()
Lower the item to the bottom of its parent group's z-order.


move

public void move(double x,
                 double y)
Move the item by the specified amount.

Parameters:
x - The amount to move the item horizontally.
y - The amount to move the item vertically.


raise

public void raise(int positions)
Raise the item in the z-order of its parent group by the specified number of positions.

Parameters:
positions - The number of positions to raise the item.


raiseToTop

public void raiseToTop()
Raise the item to the top of its parent group's z-order.


show

public void show()
Show the item (make it visible). If the item is already shown, it has no effect.