MergeHelpUtilities

Overview | Package | Class | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## javax.help
Class MergeHelpUtilities

    java.lang.Object
      |
      +--javax.help.MergeHelpUtilities

public class MergeHelpUtilities
extends java.lang.Object

Common utilities for merge types

Constructor Summary
`MergeHelpUtilities()`

Method Summary
`static int` | `compareNames(javax.swing.tree.DefaultMutableTreeNode master, javax.swing.tree.DefaultMutableTreeNode slave)` Compares name of nodes
`static javax.swing.tree.DefaultMutableTreeNode` | `getChildWithName(javax.swing.tree.DefaultMutableTreeNode parent, java.lang.String name)` Returns node with given name
`static java.util.Locale` | `getLocale(javax.swing.tree.DefaultMutableTreeNode node)` Returns locale of node
`static java.lang.String` | `getNodeName(javax.swing.tree.DefaultMutableTreeNode node)` Returns name of node
`static boolean` | `haveEqualID(javax.swing.tree.DefaultMutableTreeNode master, javax.swing.tree.DefaultMutableTreeNode slave)` Method for comparing ID of nodes
`static void` | `markNodes(javax.swing.tree.DefaultMutableTreeNode master, javax.swing.tree.DefaultMutableTreeNode slave)` Marks nodes with the same name but diferent IDs with their HelpSet title
`static void` | `mergeNodeChildren(java.lang.String masterMergeType, javax.swing.tree.DefaultMutableTreeNode node)` Merge a nodes children according the merging rules of the node's merge type
`static void` | `mergeNodes(java.lang.String masterMergeType, javax.swing.tree.DefaultMutableTreeNode masterNode, javax.swing.tree.DefaultMutableTreeNode slaveNode)` Merge the nodes according the merging rules of the masterNode's merge type

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### MergeHelpUtilities

    public MergeHelpUtilities()

Method Detail

### mergeNodes

    public static void mergeNodes(java.lang.String masterMergeType,
                                  javax.swing.tree.DefaultMutableTreeNode masterNode,
                                  javax.swing.tree.DefaultMutableTreeNode slaveNode)

  Merge the nodes according the merging rules of the masterNode's merge type

  Parameters:
    `masterMergeType` - The fallback mergeType if masterNode does not have a mergeType
    `masterNode` - The master node to merge into
    `slaveNode` - A secondary node that will merge into the master node

### mergeNodeChildren

    public static void mergeNodeChildren(java.lang.String masterMergeType,
                                         javax.swing.tree.DefaultMutableTreeNode node)

  Merge a nodes children according the merging rules of the node's merge type

  Parameters:
    `masterMergeType` - The fallback mergeType if masterNode does not have a mergeType
    `node` - The node

### getNodeName

    public static java.lang.String getNodeName(javax.swing.tree.DefaultMutableTreeNode node)

  Returns name of node

  Parameters:
    `node` - The node
  Returns:
    The name of node

### getChildWithName

    public static javax.swing.tree.DefaultMutableTreeNode getChildWithName(javax.swing.tree.DefaultMutableTreeNode parent,
                                                                           java.lang.String name)

  Returns node with given name

  Parameters:
    `parent` - The parent node
    `name` - The name of child
  Returns:
    The child with given name

### getLocale

    public static java.util.Locale getLocale(javax.swing.tree.DefaultMutableTreeNode node)

  Returns locale of node

  Parameters:
    `node` - The node
  Returns:
    The locale object

### compareNames

    public static int compareNames(javax.swing.tree.DefaultMutableTreeNode master,
                                   javax.swing.tree.DefaultMutableTreeNode slave)

  Compares name of nodes

  Parameters:
    `master` - The master node
    `slave` - The slave node
  Returns:
    negative is master is lexically lower than slave; positive if master is lexically higher than slave and zero if lexically identical.

### haveEqualID

    public static boolean haveEqualID(javax.swing.tree.DefaultMutableTreeNode master,
                                      javax.swing.tree.DefaultMutableTreeNode slave)

  Method for comparing ID of nodes

  Parameters:
    `master` - The master node
    `slave` - The slave node
  Returns:
    True if ID is the same

### markNodes

    public static void markNodes(javax.swing.tree.DefaultMutableTreeNode master,
                                 javax.swing.tree.DefaultMutableTreeNode slave)

  Marks nodes with the same name but diferent IDs with their HelpSet title

  Parameters:
    `master` - The master node to mark
    `slave` - The slave node to mark

Overview | Package | Class | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD