twaver.model
Class Group

java.lang.Object
  extended by twaver.model.Data
      extended by twaver.model.Element
          extended by twaver.model.Node
              extended by twaver.model.Group
All Implemented Interfaces:
IChildList, IData, IElement, IGroup, IHost, INode, IStyle, twaver.core.topo.IPoint, IHandler<PropertyChangeEvent>, IListener<PropertyChangeEvent>, Identifiable

public class Group
extends Node
implements IGroup

分组类型,继承于Node类型,可以展开合并,合并状态时与普通节点呈现一致,展开状态时,分组内的孩子节点可见


Field Summary
protected  boolean expanded
          展开分组,默认为值为:Defaults.GROUP_EXPANDED
protected  Size groupMinSize
          分组展开时的最小大小
 
Fields inherited from class twaver.model.Node
anchorPosition, calculateSize, contentType, host, image, invalidateAnchorPointFlag, invalidateImageFlag, invalidateSizeFlag, location, size
 
Fields inherited from class twaver.model.Element
alarmState, attachments, layerId, name, uiClass
 
Fields inherited from class twaver.model.Data
parent
 
Constructor Summary
Group()
          构造函数,分组类型,继承于Node类型,可以展开合并,合并状态时与普通节点呈现一致,展开状态时,分组内的孩子节点可见
 
Method Summary
 void checkLinkAgent()
          重新检查所有连线的代理节点
 Size getGroupMinSize()
          展开时的最小大小,groupMinSize
 boolean invalidateVisibility()
          无效网元的可见状态
 boolean isExpanded()
           
 boolean reverseExpanded()
          翻转展开状态
 boolean setExpanded(boolean isExpanded)
          设置展开状态
 boolean setGroupMinSize(Size groupSize)
          设置分组展开时的最小大小
 boolean setGroupSize(double groupWidth, double groupHeight)
          设置分组展开时的最小宽高, setGroupMinSize(Size)
 
Methods inherited from class twaver.model.Node
addFollower, calculateBounds, clearFollowers, getAgentLinks, getAnchorPoint, getAnchorPosition, getCalculateSize, getContentType, getFollowerCount, getFollowerIndex, getFollowers, getFollowers, getFromAgentLinks, getFromLinks, getHost, getImage, getLinks, getLocation, getLoopedLinks, getSize, getSize, getToAgentLinks, getToLinks, getX, getY, hasAgentLinks, hasFollowers, onParentChanged, removeFollower, setAnchorPosition, setContentType, setFollowerIndex, setHost, setImage, setLocation, setLocation, setSize, setSize, toFollowers, validateSize
 
Methods inherited from class twaver.model.Element
addAttachment, clearAttachments, firePropertyChangeEvent, getAlarmState, getAlarmState, getAttachment, getAttachments, getLayerId, getName, getStyle, getStyles, getStyles, getUIClass, hasAlarm, hasAttachment, hasStyle, isVisible, isVisible, removeAttachment, removeStyle, setAlarmState, setLayerId, setName, setStyle, setUIClass, updateAttachment, updateAttachment
 
Methods inherited from class twaver.model.Data
addChild, addChild, beforeEvent, clearChildren, get, getChildAt, getChildIndex, getChildren, getChildrenCount, getId, getParent, getProperties, getProperties, hasChildren, hashCode, isDescendantOf, onChildAdd, onChildRemove, onChildrenClear, onEvent, remove, removeChild, set, setChildIndex, setListener, setParent, setParent, setProperty, toChildren, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface twaver.core.model.IHost
addFollower, getFollowers, hasFollowers, removeFollower
 
Methods inherited from interface twaver.core.model.INode
getFromLinks, getLinks, getLoopedLinks, getSize, getToLinks
 
Methods inherited from interface twaver.core.model.IElement
getLayerId, getName, getUIClass, setLayerId
 
Methods inherited from interface twaver.core.model.IData
get, getProperties, remove, set
 
Methods inherited from interface twaver.model.Identifiable
getId
 
Methods inherited from interface twaver.event.IHandler
setListener
 
Methods inherited from interface twaver.event.IListener
beforeEvent, onEvent
 
Methods inherited from interface twaver.core.model.IChildList
addChild, addChild, clearChildren, getChildAt, getChildIndex, getChildren, getChildrenCount, getParent, hasChildren, isDescendantOf, onParentChanged, removeChild, setChildIndex, setParent, setParent, toChildren
 
Methods inherited from interface twaver.core.model.IStyle
getStyle, setStyle
 
Methods inherited from interface twaver.core.topo.IPoint
getLocation, getX, getY, setLocation
 

Field Detail

expanded

protected boolean expanded
展开分组,默认为值为:Defaults.GROUP_EXPANDED


groupMinSize

protected Size groupMinSize
分组展开时的最小大小

Constructor Detail

Group

public Group()
构造函数,分组类型,继承于Node类型,可以展开合并,合并状态时与普通节点呈现一致,展开状态时,分组内的孩子节点可见

Method Detail

isExpanded

public boolean isExpanded()
Specified by:
isExpanded in interface IGroup

reverseExpanded

public boolean reverseExpanded()
翻转展开状态

Returns:
是否设置成功

setExpanded

public boolean setExpanded(boolean isExpanded)
设置展开状态

Parameters:
isExpanded - 是否展开
Returns:
是否设置成功

getGroupMinSize

public Size getGroupMinSize()
展开时的最小大小,groupMinSize

Returns:
展开时的最小尺寸

setGroupMinSize

public boolean setGroupMinSize(Size groupSize)
设置分组展开时的最小大小

Parameters:
groupSize - 分组大小
Returns:
是否设置成功

setGroupSize

public boolean setGroupSize(double groupWidth,
                            double groupHeight)
设置分组展开时的最小宽高, setGroupMinSize(Size)

Parameters:
groupWidth - 最小宽度
groupHeight - 最小高度
Returns:
是否设置成功

checkLinkAgent

public void checkLinkAgent()
Description copied from class: Node
重新检查所有连线的代理节点

Specified by:
checkLinkAgent in interface INode
Overrides:
checkLinkAgent in class Node

invalidateVisibility

public boolean invalidateVisibility()
Description copied from class: Element
无效网元的可见状态

Overrides:
invalidateVisibility in class Node
Returns:
是否设置成功