E
- value typepublic class VennNode<E> extends AbstractVennNode<E>
FILL_STRATEGY_ASPECT_COVER, FILL_STRATEGY_ASPECT_FIT, FILL_STRATEGY_EXACT_FIT, PROPERTY_BOUNDS, PROPERTY_CHILDREN, PROPERTY_CHILDREN_PICKABLE, PROPERTY_CLIENT_PROPERTIES, PROPERTY_CODE_BOUNDS, PROPERTY_CODE_CHILDREN, PROPERTY_CODE_CHILDREN_PICKABLE, PROPERTY_CODE_CLIENT_PROPERTIES, PROPERTY_CODE_FULL_BOUNDS, PROPERTY_CODE_PAINT, PROPERTY_CODE_PARENT, PROPERTY_CODE_PICKABLE, PROPERTY_CODE_TRANSFORM, PROPERTY_CODE_TRANSPARENCY, PROPERTY_CODE_VISIBLE, PROPERTY_FULL_BOUNDS, PROPERTY_PAINT, PROPERTY_PARENT, PROPERTY_PICKABLE, PROPERTY_TRANSFORM, PROPERTY_TRANSPARENCY, PROPERTY_VISIBLE, SCENE_GRAPH_DELEGATE
NO_SUCH_PAGE, PAGE_EXISTS
Constructor and Description |
---|
VennNode(VennModel<E> model)
Create a new venn node with the specified model.
|
Modifier and Type | Method and Description |
---|---|
(package private) static int[] |
additional(org.dishevelled.bitset.ImmutableBitSet bitSet)
Return the additional indices set to true in the specified bit set.
|
(package private) static int[] |
additional(Set<Integer> values)
Return the additional int values in the specified set of values.
|
protected String |
buildAreaLabel(int index,
int... additional)
Build and return area label text.
|
(package private) static int |
first(org.dishevelled.bitset.ImmutableBitSet bitSet)
Return the first index set to true in the specified bit set.
|
(package private) static int |
first(Set<Integer> values)
Return the first int value in the specified set of values.
|
org.piccolo2d.nodes.PArea |
getArea(int index,
int... additional)
Return the area node for the intersecting area defined by the specified indices.
|
String |
getAreaLabelText(int index,
int... additional)
Return the area label text for the intersecting area defined by the specified indices.
|
org.piccolo2d.nodes.PText |
getLabel(int index)
Return the label for the set at the specified index.
|
String |
getLabelText(int index)
Return the label text for the set at the specified index.
|
VennLayout |
getLayout()
Return the layout for this venn node.
|
VennModel<E> |
getModel()
Return the model for this venn node.
|
org.piccolo2d.nodes.PPath |
getPath(int index)
Return the path node for the set at the specified index.
|
org.piccolo2d.nodes.PText |
getSizeLabel(int index,
int... additional)
Return the size label for the intersecting area defined by the specified indices.
|
org.piccolo2d.nodes.PText |
labelForNode(org.piccolo2d.PNode node)
Return the label for the specified node, if any.
|
Iterable<org.piccolo2d.nodes.PText> |
labels()
Return the labels for this venn diagram node.
|
String |
labelTextForNode(org.piccolo2d.PNode node)
Return the label text for the specified node, if any.
|
Iterable<org.piccolo2d.PNode> |
nodes()
Return the nodes for this venn diagram node.
|
(package private) static com.google.common.collect.ImmutableSet<Integer> |
range(int n)
Return an immutable set of the integers between
0 and n , exclusive. |
void |
setLabelText(int index,
String labelText)
Set the label text for the set at the specified index to
labelText . |
void |
setLayout(VennLayout layout)
Set the layout for this venn node to
layout . |
int |
size()
Return the size of this venn node.
|
Iterable<org.piccolo2d.nodes.PText> |
sizeLabels()
Return the size labels for this venn diagram node.
|
(package private) static org.dishevelled.bitset.ImmutableBitSet |
toImmutableBitSet(int index,
int... additional)
Create and return a new immutable bit set with the specified bits set to true.
|
(package private) static org.dishevelled.bitset.ImmutableBitSet |
toImmutableBitSet(Set<Integer> indices)
Create and return a new immutable bit set with the specified bits set to true.
|
protected void |
updateLabels()
Update labels.
|
Set<E> |
viewForNode(org.piccolo2d.PNode node)
Return the view for the specified node, if any.
|
buildLabel, getDisplayLabels, getDisplaySizeLabels, getDisplaySizes, getDisplaySizesForEmptyAreas, setDisplayLabels, setDisplaySizeLabels, setDisplaySizes, setDisplaySizesForEmptyAreas
addActivity, addAttribute, addChild, addChild, addChildren, addInputEventListener, addPropertyChangeListener, addPropertyChangeListener, animateToBounds, animateToColor, animateToPositionScaleRotation, animateToRelativePosition, animateToTransform, animateToTransparency, animateTransformToBounds, centerBoundsOnPoint, centerFullBoundsOnPoint, clone, computeFullBounds, endResizeBounds, findIntersectingNodes, fireChildPropertyChange, firePropertyChange, fullIntersects, fullPaint, fullPick, getAllNodes, getAllNodes, getAttribute, getAttribute, getBooleanAttribute, getBounds, getBoundsChanged, getBoundsReference, getBoundsVolatile, getChild, getChildBoundsInvalid, getChildBoundsVolatile, getChildPaintInvalid, getChildrenCount, getChildrenIterator, getChildrenPickable, getChildrenReference, getClientProperties, getClientPropertyKeysEnumeration, getDoubleAttribute, getFullBounds, getFullBoundsInvalid, getFullBoundsReference, getGlobalBounds, getGlobalFullBounds, getGlobalRotation, getGlobalScale, getGlobalToLocalTransform, getGlobalTranslation, getHeight, getInputEventListeners, getIntegerAttribute, getInverseTransform, getListenerList, getLocalToGlobalTransform, getName, getOccluded, getOffset, getPaint, getPaintInvalid, getParent, getPickable, getPropertyChangeParentMask, getRoot, getRotation, getScale, getTransform, getTransformReference, getTransparency, getUnionOfChildrenBounds, getVisible, getWidth, getX, getXOffset, getY, getYOffset, globalToLocal, globalToLocal, globalToLocal, indexOfChild, internalUpdateBounds, intersects, invalidateFullBounds, invalidateLayout, invalidatePaint, isAncestorOf, isDescendentOf, isDescendentOfRoot, isOpaque, layoutChildren, lerp, localToGlobal, localToGlobal, localToGlobal, localToParent, localToParent, localToParent, lower, lower, lowerBelow, lowerToBottom, lowerToBottom, offset, paint, paintAfterChildren, parentBoundsChanged, parentToLocal, parentToLocal, parentToLocal, pick, pickAfterChildren, print, print, raise, raise, raiseAbove, raiseToTop, raiseToTop, removeAllChildren, removeChild, removeChild, removeChildren, removeFromParent, removeInputEventListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaintFrom, reparent, replaceWith, resetBounds, rotate, rotateAboutPoint, rotateAboutPoint, rotateInPlace, scale, scaleAboutPoint, scaleAboutPoint, setBounds, setBounds, setBoundsChanged, setChildBoundsInvalid, setChildBoundsVolatile, setChildPaintInvalid, setChildrenPickable, setFullBoundsInvalid, setGlobalRotation, setGlobalScale, setGlobalTranslation, setHeight, setName, setOccluded, setOffset, setOffset, setPaint, setPaintInvalid, setParent, setPickable, setPropertyChangeParentMask, setRotation, setScale, setTransform, setTransparency, setVisible, setWidth, setX, setY, signalBoundsChanged, startResizeBounds, toImage, toImage, toImage, toImage, transformBy, translate, validateFullBounds, validateFullPaint
protected void updateLabels()
AbstractVennNode
updateLabels
in class AbstractVennNode<E>
public final int size()
public final VennLayout getLayout()
public final void setLayout(VennLayout layout)
layout
.
This is a bound property.
layout
- layout for this venn node, must not be nullpublic final VennModel<E> getModel()
public final org.piccolo2d.nodes.PPath getPath(int index)
index
- indexIndexOutOfBoundsException
- if index
is out of boundspublic final String getLabelText(int index)
DEFAULT_LABEL_TEXT
.get(index)
.index
- indexIndexOutOfBoundsException
- if index
is out of boundspublic final void setLabelText(int index, String labelText)
labelText
.
This is a bound property.
index
- indexlabelText
- label text for the set at the specified indexIndexOutOfBoundsException
- if index
is out of boundspublic final org.piccolo2d.nodes.PText getLabel(int index)
setLabelText(int, String)
and AbstractVennNode.setDisplaySizes(boolean)
to set the label text and whether to display sizes respectively.public final org.piccolo2d.nodes.PArea getArea(int index, int... additional)
index
- first indexadditional
- variable number of additional indices, if anyIndexOutOfBoundsException
- if index
or any of additional
are out of bounds, or if too many indices are specifiedpublic final String getAreaLabelText(int index, int... additional)
index
- first indexadditional
- variable number of additional indices, if anyIndexOutOfBoundsException
- if index
or any of additional
are out of bounds, or if too many indices are specifiedpublic final org.piccolo2d.nodes.PText getSizeLabel(int index, int... additional)
index
- first indexadditional
- variable number of additional indices, if anyIndexOutOfBoundsException
- if index
or any of additional
are out of bounds, or if too many indices are specifiedpublic Iterable<org.piccolo2d.nodes.PText> labels()
AbstractVennNode
labels
in class AbstractVennNode<E>
public Iterable<org.piccolo2d.PNode> nodes()
AbstractVennNode
nodes
in class AbstractVennNode<E>
public org.piccolo2d.nodes.PText labelForNode(org.piccolo2d.PNode node)
AbstractVennNode
labelForNode
in class AbstractVennNode<E>
node
- nodenull
if no such label existspublic String labelTextForNode(org.piccolo2d.PNode node)
AbstractVennNode
labelTextForNode
in class AbstractVennNode<E>
node
- nodenull
if no such label existspublic Iterable<org.piccolo2d.nodes.PText> sizeLabels()
AbstractVennNode
sizeLabels
in class AbstractVennNode<E>
public Set<E> viewForNode(org.piccolo2d.PNode node)
AbstractVennNode
viewForNode
in class AbstractVennNode<E>
node
- nodenull
if no such view existsprotected final String buildAreaLabel(int index, int... additional)
index
- indexadditional
- variable number of additional indicesIndexOutOfBoundsException
- if index
or any of additional
are out of bounds, or if too many indices are specifiedstatic com.google.common.collect.ImmutableSet<Integer> range(int n)
0
and n
, exclusive.n
- n0
and n
, exclusivestatic int first(org.dishevelled.bitset.ImmutableBitSet bitSet)
bitSet
- bit set-1
if no bits in the specified bit set are set to truestatic int[] additional(org.dishevelled.bitset.ImmutableBitSet bitSet)
bitSet
- bit setint[]
if only zero or one bits are set to true
the specified bit setstatic int first(Set<Integer> values)
values
- set of valuesstatic int[] additional(Set<Integer> values)
values
- set of valuesstatic org.dishevelled.bitset.ImmutableBitSet toImmutableBitSet(int index, int... additional)
index
- first index to set to trueadditional
- variable number of additional indices to set to true, if anystatic org.dishevelled.bitset.ImmutableBitSet toImmutableBitSet(Set<Integer> indices)
indices
- set of indices to set to true, must not be null and must not be emptyCopyright (c) 2009-2013 held jointly by the individual authors. Licensed under the GNU Lesser General Public License (LGPL).