public class IconAttachment extends AbstractAttachment
Modifier and Type | Field and Description |
---|---|
protected javax.swing.Icon |
icon |
protected java.lang.String |
iconURL |
protected java.lang.String |
name |
element, network, ui
Constructor and Description |
---|
IconAttachment(java.lang.String name,
ElementUI elementUI)
Constructs attachment by given element ui and icon.
|
IconAttachment(java.lang.String name,
ElementUI elementUI,
javax.swing.Icon icon)
Constructs attachment by given element ui and icon.
|
IconAttachment(java.lang.String name,
ElementUI elementUI,
javax.swing.Icon icon,
int position,
int xOffset,
int yOffset)
Constructs attachment by given element ui and icon.
|
IconAttachment(java.lang.String name,
ElementUI elementUI,
java.lang.String iconURL)
Constructs attachment by given element ui and icon.
|
IconAttachment(java.lang.String name,
ElementUI elementUI,
java.lang.String iconURL,
int position,
int xOffset,
int yOffset)
Constructs attachment by given element ui and icon.
|
Modifier and Type | Method and Description |
---|---|
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 attachement.
|
javax.swing.Icon |
getIcon()
Get the attachment icon.
|
java.lang.String |
getIconURL() |
java.awt.Point |
getLocation()
return this attachment object location for this element.
|
java.lang.String |
getName()
Gets the name of this attachment.
|
int |
getPosition() |
int |
getXOffset() |
int |
getYOffset() |
void |
paint(java.awt.Graphics2D g2d)
Paint this attachment on specified graphics.
|
contains, getElementUI, getShape, isSelectable, isShownOnTop, performAction
protected java.lang.String name
protected java.lang.String iconURL
protected javax.swing.Icon icon
public IconAttachment(java.lang.String name, ElementUI elementUI)
name
- the icon nameelementUI
- the element uipublic IconAttachment(java.lang.String name, ElementUI elementUI, java.lang.String iconURL)
name
- the icon nameelementUI
- the element uiiconURL
- the icon url.public IconAttachment(java.lang.String name, ElementUI elementUI, javax.swing.Icon icon)
name
- the icon nameelementUI
- the element uiicon
- the icon object.public IconAttachment(java.lang.String name, ElementUI elementUI, java.lang.String iconURL, int position, int xOffset, int yOffset)
name
- the icon nameelementUI
- the element uiiconURL
- the icon urlposition
- the positionxOffset
- the x offsetyOffset
- the y offsetpublic IconAttachment(java.lang.String name, ElementUI elementUI, javax.swing.Icon icon, int position, int xOffset, int yOffset)
name
- the icon nameelementUI
- the element uiicon
- the icon objectposition
- the positionxOffset
- the x offsetyOffset
- the y offsetpublic java.lang.String getName()
Attachment
getName
in interface Attachment
getName
in class AbstractAttachment
public javax.swing.Icon getIcon()
public java.lang.String getIconURL()
public void paint(java.awt.Graphics2D g2d)
g2d
- the graphics objectpublic java.awt.Rectangle getBounds()
g
- Graph object.element
- element object.public java.awt.Point getLocation()
Attachment
public void elementPropertyChange(java.beans.PropertyChangeEvent evt)
elementPropertyChange
in interface Attachment
elementPropertyChange
in class AbstractAttachment
evt
- property change eventpublic int getPosition()
public int getXOffset()
public int getYOffset()
Copyright © 2002 - 2010 Serva Software. All Rights Reserved.