public class BaseElementUI extends AbstractElementUI
BaseElement
object.
This UI only willing to received a BaseElement instance element,
and fill a stupid 3D rectangle using BASE_ELEMENT_COLOR
color. Finally paint a default border.Modifier and Type | Field and Description |
---|---|
protected boolean |
bodyFill |
protected boolean |
bodyRaised |
protected java.awt.Color |
color |
protected boolean |
customDraw |
protected boolean |
customDrawAntialias |
protected boolean |
customDrawDefaultBorder |
protected boolean |
customDrawFill |
protected boolean |
customDrawFill3D |
protected java.awt.Color |
customDrawFillColor |
protected boolean |
customDrawGradient |
protected java.awt.Color |
customDrawGradientColor |
protected boolean |
customDrawOutline |
protected boolean |
customDrawOutline3D |
protected java.awt.Color |
customDrawOutlineColor |
protected java.awt.Stroke |
customDrawOutlineStroke |
protected BorderUI |
defaultBorder |
protected twaver.base.obfuscate.network.GradientFactory |
gradientFactory |
protected twaver.base.obfuscate.network.ShapeFactory |
shapeFactory |
alarmAttachment, attachmentOrientation, attachmentPosition, attachments, attachmentXGap, attachmentXOffset, attachmentYGap, attachmentYOffset, borderInsets, element, labelAttachment, network, renderAlpha, stateOutlineInsets, textureFactory
Constructor and Description |
---|
BaseElementUI(TNetwork network,
BaseElement element)
Constructs a base element ui class by specified network and element.
|
Modifier and Type | Method and Description |
---|---|
boolean |
contains(int x,
int y)
Checks whether this ui "contains" the specified point,
where x and y are defined to be relative to the coordinate
system of this UI.
|
BaseElement |
getBaseElement()
Get the base element instance.
|
BorderUI |
getBorder()
Obtains the UI border object.
|
java.awt.Color |
getColor()
Get the Base element's fill color.
|
java.awt.Point |
getHotspot()
Get the hotspot location.
|
protected twaver.base.obfuscate.network.ShapeFactory |
getShapeFactory() |
java.awt.Rectangle |
getUIBounds()
For this abstract element UI, it return a rectangle box encloses
the element and it's border.
|
boolean |
isBodyFill()
Whether this element's body is filled.
|
protected boolean |
isCustomDraw() |
boolean |
isCustomDrawDefaultBorder() |
void |
paint(java.awt.Graphics2D g2d)
Paint specified element instance on specified graph.
|
void |
paintBody(java.awt.Graphics2D g2d)
Paint this element body.
|
protected void |
paintCustomDraw(java.awt.Graphics2D g2d) |
protected void |
paintCustomDrawBody(java.awt.Graphics2D g2d,
java.awt.Shape bodyShape) |
protected void |
paintCustomDrawOutline(java.awt.Graphics2D g2d,
java.awt.Shape bodyShape) |
protected void |
paintCustomDrawStateOutline(java.awt.Graphics2D g2d,
java.awt.Shape bodyShape,
java.awt.Color stateOutlineColor) |
void |
paintStateOutline(java.awt.Graphics2D g2d)
Paint the element outline.
|
void |
updateClientProperty(java.lang.String propertyName)
Update the client property.
|
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, performAction, removeAttachment, setBodyPaint, setLabelAttachment, setStateOutline
protected BorderUI defaultBorder
protected java.awt.Color color
protected boolean bodyFill
protected boolean bodyRaised
protected boolean customDraw
protected boolean customDrawDefaultBorder
protected boolean customDrawAntialias
protected boolean customDrawFill
protected boolean customDrawFill3D
protected java.awt.Color customDrawFillColor
protected boolean customDrawOutline
protected boolean customDrawOutline3D
protected java.awt.Color customDrawOutlineColor
protected java.awt.Stroke customDrawOutlineStroke
protected boolean customDrawGradient
protected java.awt.Color customDrawGradientColor
protected twaver.base.obfuscate.network.GradientFactory gradientFactory
protected twaver.base.obfuscate.network.ShapeFactory shapeFactory
public BaseElementUI(TNetwork network, BaseElement element)
network
- the network contains this ui class.element
- the element this ui painting for.public BaseElement getBaseElement()
public BorderUI getBorder()
public java.awt.Rectangle getUIBounds()
getUIBounds
in interface ElementUI
getUIBounds
in class AbstractElementUI
public void paint(java.awt.Graphics2D g2d)
g
- graph object.element
- elment object.protected void paintCustomDraw(java.awt.Graphics2D g2d)
protected void paintCustomDrawStateOutline(java.awt.Graphics2D g2d, java.awt.Shape bodyShape, java.awt.Color stateOutlineColor)
protected void paintCustomDrawOutline(java.awt.Graphics2D g2d, java.awt.Shape bodyShape)
protected void paintCustomDrawBody(java.awt.Graphics2D g2d, java.awt.Shape bodyShape)
public void paintBody(java.awt.Graphics2D g2d)
g2d
- public void paintStateOutline(java.awt.Graphics2D g2d)
public java.awt.Point getHotspot()
public void updateClientProperty(java.lang.String propertyName)
updateClientProperty
in interface ElementUI
updateClientProperty
in class AbstractElementUI
propertyName
- the property name that has changed.public java.awt.Color getColor()
public boolean isBodyFill()
public boolean contains(int x, int y)
x
- the x coordinate of the pointy
- the y coordinate of the pointprotected twaver.base.obfuscate.network.ShapeFactory getShapeFactory()
protected boolean isCustomDraw()
public boolean isCustomDrawDefaultBorder()
Copyright © 2002 - 2010 Serva Software. All Rights Reserved.