public class NodeUI extends BaseElementUI
Node
object.
This UI only willing to received a Node instance element,
and draw node image. If no image setted, then draw a stupid
3D rectangle using superclass BaseElementUI .
Finally paint a default border.Modifier and Type | Field and Description |
---|---|
protected boolean |
drawImageShape |
bodyFill, bodyRaised, color, customDraw, customDrawAntialias, customDrawDefaultBorder, customDrawFill, customDrawFill3D, customDrawFillColor, customDrawGradient, customDrawGradientColor, customDrawOutline, customDrawOutline3D, customDrawOutlineColor, customDrawOutlineStroke, defaultBorder, gradientFactory, shapeFactory
alarmAttachment, attachmentOrientation, attachmentPosition, attachments, attachmentXGap, attachmentXOffset, attachmentYGap, attachmentYOffset, borderInsets, element, labelAttachment, network, renderAlpha, stateOutlineInsets, textureFactory
Constructor and Description |
---|
NodeUI(TNetwork network,
Node node)
Constructs the node ui instance by given network
component and node element.
|
Modifier and Type | Method and Description |
---|---|
boolean |
contains(int x,
int y)
Override this method to return a more accurate value.
|
protected Chassis |
getDrillDownChassis()
This method determine which chassis will enter into if node have more
than one chassis object.
|
java.awt.Shape |
getImageShape() |
Node |
getNode()
Get the node element.
|
boolean |
isDrawImageShape() |
void |
paintBody(java.awt.Graphics2D g2d)
Paint this node body.
|
void |
paintStateOutline(java.awt.Graphics2D g2d)
Paint the element state outline.
|
void |
performAction(int gesture,
java.awt.event.MouseEvent e)
If this node has chassis child, show the chassis.
|
void |
updateClientProperty(java.lang.String propertyName)
Update the client property.
|
getBaseElement, getBorder, getColor, getHotspot, getShapeFactory, getUIBounds, isBodyFill, isCustomDraw, isCustomDrawDefaultBorder, paint, paintCustomDraw, paintCustomDrawBody, paintCustomDrawOutline, paintCustomDrawStateOutline
addAttachment, attachments, containInAttachments, elementPropertyChange, getAlarmAttachment, getAttachementsArea, getAttachementsBounds, getAttachmentAt, getAttachmentOrientation, getAttachmentPosition, getAttachmentXGap, getAttachmentXOffset, getAttachmentYGap, getAttachmentYOffset, getBlinkStruct, getBorderShape, getDefaultBorderInset, getElement, getLabelAttachment, getNetwork, getPaintBodyColor, getSeletableAttachementsArea, getStateOutlineColor, installAttachments, isBodyDark, isOutlineDark, mouseClicked, paintAttachments, paintBorder, removeAttachment, setBodyPaint, setLabelAttachment, setStateOutline
public Node getNode()
public void paintBody(java.awt.Graphics2D g2d)
paintBody
in class BaseElementUI
g
- graph object.element
- element object.public void paintStateOutline(java.awt.Graphics2D g2d)
paintStateOutline
in class BaseElementUI
public java.awt.Shape getImageShape()
public void updateClientProperty(java.lang.String propertyName)
BaseElementUI
updateClientProperty
in interface ElementUI
updateClientProperty
in class BaseElementUI
propertyName
- the property name that has changed.public void performAction(int gesture, java.awt.event.MouseEvent e)
performAction
in interface ElementUI
performAction
in class AbstractElementUI
gesture
- the action gesture.e
- the gesture.protected Chassis getDrillDownChassis()
public boolean contains(int x, int y)
contains
in interface ElementUI
contains
in class BaseElementUI
x
- inty
- intpublic boolean isDrawImageShape()
Copyright © 2002 - 2010 Serva Software. All Rights Reserved.