public abstract class AbstractAttachment extends java.lang.Object implements Attachment
Modifier and Type | Field and Description |
---|---|
protected Element |
element |
protected TNetwork |
network |
protected ElementUI |
ui |
Constructor and Description |
---|
AbstractAttachment(ElementUI ui)
Constructs an attachment by specified network.
|
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.
|
ElementUI |
getElementUI()
Obtains the element ui class.
|
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 |
performAction(int gesture,
java.awt.event.MouseEvent e)
by default invoke ui performAction
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getBounds, getLocation, paint
protected ElementUI ui
protected Element element
protected TNetwork network
public AbstractAttachment(ElementUI ui)
network
- public ElementUI getElementUI()
getElementUI
in interface Attachment
public boolean contains(int x, int y)
Attachment
contains
in interface Attachment
x
- int x locationy
- int y locationpublic void performAction(int gesture, java.awt.event.MouseEvent e)
performAction
in interface Attachment
gesture
- int mouse action gesturee
- MouseEvent mouse eventpublic boolean isSelectable()
isSelectable
in interface Attachment
public java.awt.Shape getShape()
Attachment
getShape
in interface Attachment
public void elementPropertyChange(java.beans.PropertyChangeEvent evt)
elementPropertyChange
in interface Attachment
evt
- property change eventpublic java.lang.String getName()
Attachment
getName
in interface Attachment
public boolean isShownOnTop()
Attachment
isShownOnTop
in interface Attachment
Copyright © 2002 - 2010 Serva Software. All Rights Reserved.