twaver.network
Class GroupUI

java.lang.Object
  extended by twaver.core.network.BaseUI<T>
      extended by twaver.network.ElementUI<Node>
          extended by twaver.network.NodeUI
              extended by twaver.network.GroupUI
All Implemented Interfaces:
twaver.core.network.IUI<Node,Canvas,Paint>, Identifiable

public class GroupUI
extends NodeUI


Field Summary
 
Fields inherited from class twaver.network.NodeUI
imageUI, shapeUI
 
Fields inherited from class twaver.network.ElementUI
alarm, body, isLayouting, label, network
 
Fields inherited from class twaver.core.network.BaseUI
anchorPoint, bodyOffsetX, bodyOffsetY, bounds, data, invalidateAnchorPointFlag, invalidateLocationFlag, invalidateRenderFlag, invalidateSizeFlag, location, stateOutline, stateOutlineColor, visible
 
Constructor Summary
GroupUI(Group group, Network network)
           
 
Method Summary
protected  boolean checkNodeStyle(java.lang.String propertyName, PropertyChangeEvent evt)
           
 Point getAnchorPoint()
           
 void invalidateLocation()
           
 boolean isLayoutByAnchorPoint()
           
 boolean isRelativeLocation()
           
 void measure()
          测定主体的尺寸
protected  void onDrawBody(Canvas canvas, Paint paint, boolean drawSelectionOnBody, boolean drawStateOutlineOnBody)
          绘制网元主体
protected  boolean onElementPropertyChange(java.lang.String propertyName, PropertyChangeEvent evt)
          网元属性变化时,调用此函数
protected  void resetNodeProperties()
          重设节点相关样式
 
Methods inherited from class twaver.network.NodeUI
byShape, checkBody, createChildren, doValidate, invalidateLinks, onBodyChange, resetShapeData, resetStyles
 
Methods inherited from class twaver.network.ElementUI
addChild, checkAttachments, createAttachmentUI, drawChildren, drawSendToBottomChildren, drawShowOnTop, getBody, getBodyBounds, getBooleanStyle, getChildren, getColorStyle, getFloatStyle, getId, getInsetsStyle, getIntStyle, getNetwork, getShaderStyle, getStringStyle, getStyle, getUIBounds, hasChildOnTop, hitTest, initialize, intersect, invalidateStyle, invalidateStyles, invalidateUI, isInitialized, isVisible, layout, onDraw, onElementPropertyChange, removeChild, setBody, setChildIndex, setLayoutByAnchorPoint, setRenderColor, setSelected, setSelectionBorder, setSelectionBorderColor, validate
 
Methods inherited from class twaver.core.network.BaseUI
checkBackground, checkOutline, draw, drawBackgroundAndBorder, drawBody, drawStateOutline, drawStateOutline, getAnchorPosition, getAngle, getBackgroundColor, getBounds, getCornerRadius, getData, getLocation, getMeasuredHeight, getMeasuredWidth, getOffset, getOutlineColor, getOutlineWidth, getRenderColor, getSelectionBorder, getSelectionBorderColor, getStateOutline, getStateOutlineColor, intersect, intersectPointer, invalidateAnchorPoint, invalidatePointer, invalidateRender, invalidateSize, isDrawBackground, isDrawOutline, isDrawStateOutline, isInvalidate, isInvalidateAnchorPoint, isInvalidateLocation, isInvalidateSize, isRotatable, isSelected, isShowOnTop, measureAnchorPosition, onDrawBackgroundAndBorder, perLocation, resetPaint, resetShape, setAnchorPosition, setBackgroundColor, setBackgroundShader, setBounds, setBounds, setCornerRadius, setData, setLocation, setLocation, setMeasuredSize, setOffset, setOutline, setOutlineColor, setPadding, setPointerVisible, setPointerWidth, setRotatable, setShowOnTop, setStateOutline, setStateOutlineColor, setVisible, styleSelectionPaint, toAbsoluteRect, toLocalPoint, toLocalRect, validateLocation, validatePointer, validateRender
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GroupUI

public GroupUI(Group group,
               Network network)
Method Detail

resetNodeProperties

protected void resetNodeProperties()
Description copied from class: NodeUI
重设节点相关样式

Overrides:
resetNodeProperties in class NodeUI

onElementPropertyChange

protected boolean onElementPropertyChange(java.lang.String propertyName,
                                          PropertyChangeEvent evt)
Description copied from class: ElementUI
网元属性变化时,调用此函数

Overrides:
onElementPropertyChange in class NodeUI
Parameters:
propertyName - 属性名
evt - 属性变化事件
Returns:
是否需要重绘
See Also:
ElementUI.onElementPropertyChange(PropertyChangeEvent)

checkNodeStyle

protected boolean checkNodeStyle(java.lang.String propertyName,
                                 PropertyChangeEvent evt)
Overrides:
checkNodeStyle in class NodeUI

isLayoutByAnchorPoint

public boolean isLayoutByAnchorPoint()
Overrides:
isLayoutByAnchorPoint in class twaver.core.network.BaseUI<Node>

onDrawBody

protected void onDrawBody(Canvas canvas,
                          Paint paint,
                          boolean drawSelectionOnBody,
                          boolean drawStateOutlineOnBody)
Description copied from class: ElementUI
绘制网元主体

Overrides:
onDrawBody in class ElementUI<Node>
drawSelectionOnBody - 绘制主体选中效果
drawStateOutlineOnBody - 绘制主体外边框

getAnchorPoint

public Point getAnchorPoint()
Specified by:
getAnchorPoint in interface twaver.core.network.IUI<Node,Canvas,Paint>
Overrides:
getAnchorPoint in class twaver.core.network.BaseUI<Node>

measure

public void measure()
Description copied from class: ElementUI
测定主体的尺寸

Overrides:
measure in class ElementUI<Node>

isRelativeLocation

public boolean isRelativeLocation()
Overrides:
isRelativeLocation in class twaver.core.network.BaseUI<Node>

invalidateLocation

public void invalidateLocation()
Overrides:
invalidateLocation in class NodeUI