Class TreasureTreeNode
- java.lang.Object
-
- javax.swing.tree.DefaultMutableTreeNode
-
- net.sf.gridarta.model.treasurelist.TreasureTreeNode
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable,javax.swing.tree.MutableTreeNode,javax.swing.tree.TreeNode
public class TreasureTreeNode extends javax.swing.tree.DefaultMutableTreeNodeSubclass: Nodes in the CFTreasureListTree. Each node contains aTreasureObjas content.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description TreasureTreeNode(@NotNull TreasureObj content)Construct tree node with specified content object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull javax.swing.tree.MutableTreeNodegetClone(boolean processSecondLinking, @Nullable java.util.List<TreasureTreeNode> needSecondLink)Return a new cloned instance of this object.@NotNull TreasureObjgetTreasureObj()voidrecalculateChances()Recalculate the chances of objects in a treasureone list.@NotNull java.lang.StringtoString()-
Methods inherited from class javax.swing.tree.DefaultMutableTreeNode
add, breadthFirstEnumeration, children, clone, depthFirstEnumeration, getAllowsChildren, getChildAfter, getChildAt, getChildBefore, getChildCount, getDepth, getFirstChild, getFirstLeaf, getIndex, getLastChild, getLastLeaf, getLeafCount, getLevel, getNextLeaf, getNextNode, getNextSibling, getParent, getPath, getPathToRoot, getPreviousLeaf, getPreviousNode, getPreviousSibling, getRoot, getSharedAncestor, getSiblingCount, getUserObject, getUserObjectPath, insert, isLeaf, isNodeAncestor, isNodeChild, isNodeDescendant, isNodeRelated, isNodeSibling, isRoot, pathFromAncestorEnumeration, postorderEnumeration, preorderEnumeration, remove, remove, removeAllChildren, removeFromParent, setAllowsChildren, setParent, setUserObject
-
-
-
-
Constructor Detail
-
TreasureTreeNode
public TreasureTreeNode(@NotNull @NotNull TreasureObj content)Construct tree node with specified content object.- Parameters:
content- the treasure object of this node
-
-
Method Detail
-
getClone
@NotNull public @NotNull javax.swing.tree.MutableTreeNode getClone(boolean processSecondLinking, @Nullable @Nullable java.util.List<TreasureTreeNode> needSecondLink)Return a new cloned instance of this object.- Returns:
- a new cloned instance of this object
-
toString
@NotNull public @NotNull java.lang.String toString()
- Overrides:
toStringin classjavax.swing.tree.DefaultMutableTreeNode- No Inspection:
- RefusedBequest
-
getTreasureObj
@NotNull public @NotNull TreasureObj getTreasureObj()
-
recalculateChances
public void recalculateChances()
Recalculate the chances of objects in a treasureone list. The new chances always sum up to 100% total.
-
-