public interface Attachment
ElementUI
object. The ElementUI objects
may use some Attachment objects to paint and represent the
Element
properties. As part of ElementUI, the attachment
is absolute act as View of MVC architecture. It used by ElementUI
to reresent some special Element properties. For example,
NameAttachment
used to paint
element's display name, TipAttachment
used to paint element
tip information.Developer my write new classes implemented this interface, and related it with an element object's propertiy, to extends the ui class representation.
Modifier and Type | Method and Description |
---|---|
boolean |
contains(int x,
int y)
Whether given location is contains in this attachment.
|
void |
elementPropertyChange(java.beans.PropertyChangeEvent evt)
Invoked when the related element's any property change.
|
java.awt.Rectangle |
getBounds()
Return integer rectangle which completely encloses this attachment paint
area for this element.
|
ElementUI |
getElementUI() |
java.awt.Point |
getLocation()
return this attachment object location for this element.
|
java.lang.String |
getName()
Gets the name of this attachment.
|
java.awt.Shape |
getShape()
Get the shape of this attachment.
|
boolean |
isSelectable()
Return true if this attachment is selectable.
|
boolean |
isShownOnTop()
Checks whether to show this attachment on the top layer.
|
void |
paint(java.awt.Graphics2D g2d)
Paint this attachment.
|
void |
performAction(int gesture,
java.awt.event.MouseEvent e)
Invoked when an action occurs.
|
ElementUI getElementUI()
java.awt.Point getLocation()
java.awt.Rectangle getBounds()
boolean contains(int x, int y)
x
- int x locationy
- int y locationvoid paint(java.awt.Graphics2D g2d)
g2d
- Graphics2D the graphics to be painted onvoid performAction(int gesture, java.awt.event.MouseEvent e)
gesture
- int mouse action gesturee
- MouseEvent mouse eventboolean isSelectable()
java.awt.Shape getShape()
void elementPropertyChange(java.beans.PropertyChangeEvent evt)
evt
- property change eventjava.lang.String getName()
boolean isShownOnTop()
Copyright © 2002 - 2010 Serva Software. All Rights Reserved.