gishur.gui2
Class LinkPainter
java.lang.Object
|
+--gishur.gui2.Painter
|
+--gishur.gui2.LinkPainter
- Direct Known Subclasses:
- ShadowPainter
- public abstract class LinkPainter
- extends Painter
| Fields inherited from class gishur.gui2.Painter |
LEVEL_0, LEVEL_1, LEVEL_2, LEVEL_3, LEVEL_ALL, LEVEL_BITS_USED, LEVEL_DEFAULT, LEVEL_FIRST, LEVEL_LAST, LOCATEABLE, VISIBLE |
|
Method Summary |
protected Painter |
base()
|
java.awt.Point |
calculateDockingPoint(int x,
int y)
Calculates a docking point, that means a point on the outline of the
Painter, that lies nearest to the given point.
|
boolean |
contains(int x,
int y)
Returns true, if the specified point hits this
or the linked Painter.
|
protected void |
drawBase(RenderContext context,
PropertyStatusReader prop,
byte level)
|
protected java.awt.Point |
getBaseRelativeAlignmentPoint(java.awt.Point p,
byte h_align,
byte v_align)
|
protected void |
recalculateBase(RenderContext context,
Parameters param)
|
void |
setLocation(int x,
int y)
Sets the location of this Painter and the linked
Painter. |
void |
setName(java.lang.String name)
Sets the name of the element. |
void |
setSubTypePrefix(java.lang.String prefix)
Sets the subtype prefix that this Painter should use for
reading properties. |
| Methods inherited from class gishur.gui2.Painter |
addBounds, addBounds, alignTo, alignTo, draw, getAlignmentPoint, getRelativeAlignmentPoint, height, isOnLevel, level, locateable, name, outline, recalculate, reshape, setBounds, setBounds, setLevel, setOutline, style, visible, width, x, y |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LinkPainter
public LinkPainter(Painter base)
base
protected Painter base()
setSubTypePrefix
public void setSubTypePrefix(java.lang.String prefix)
- Sets the subtype prefix that this
Painter should use for
reading properties.
- Overrides:
setSubTypePrefix in class Painter
- Parameters:
prefix - the new subtype prefix for reading properties
(must not be null)
setName
public void setName(java.lang.String name)
- Sets the name of the element.
- Overrides:
setName in class Painter
- Parameters:
name - the name of the element (must not be null)
recalculateBase
protected final void recalculateBase(RenderContext context,
Parameters param)
drawBase
protected final void drawBase(RenderContext context,
PropertyStatusReader prop,
byte level)
getBaseRelativeAlignmentPoint
protected final java.awt.Point getBaseRelativeAlignmentPoint(java.awt.Point p,
byte h_align,
byte v_align)
setLocation
public void setLocation(int x,
int y)
- Sets the location of
this Painter and the linked
Painter. The methods maintaines the relative distance between
the two Painters.
- Overrides:
setLocation in class Painter
- Parameters:
x,y - new position
calculateDockingPoint
public java.awt.Point calculateDockingPoint(int x,
int y)
- Calculates a docking point, that means a point on the outline of the
Painter, that lies nearest to the given point.
This implementation simply calls the calculateDockingPoint(int, int)
method of the linked Painter.
- Overrides:
calculateDockingPoint in class Painter
- Parameters:
x,y - point, where to come from for docking (outside the
Painter).- Returns:
- docking point
contains
public boolean contains(int x,
int y)
- Returns
true, if the specified point hits this
or the linked Painter.
This method should return false, if the painter is not
locateable (see Painter.locateable()).
This method returns true, if the point lies inside the specified
painter bounds (see Painter.setBounds(int, int, int, int)) and if it lies in the outline shape
(see Painter.setOutline(gishur.gui2.Shape)) (If no outline shape is defined, true
will be returned, if it lies in the bounds).
- Overrides:
contains in class Painter
- Returns:
true, if the specified point hits the Painter.