# ComponentHierarchy (ARX GUI Documentation)

org.deidentifier.arx.gui.view.impl.common

## Class ComponentHierarchy

- java.lang.Object
- - org.deidentifier.arx.gui.view.impl.common.ComponentHierarchy

-     public class ComponentHierarchy
      extends java.lang.Object

  This class implements an editor for generalization hierarchies.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ComponentHierarchy(org.eclipse.swt.widgets.Composite parent)` Constructor for non-editable views.
    `ComponentHierarchy(org.eclipse.swt.widgets.Composite parent, org.eclipse.swt.events.ModifyListener listener)` Constructor for editable views.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `actionClear()` Clears the hierarchy.
    `void` | `actionDeleteColumn()` Deletes a column.
    `void` | `actionDeleteRow()` Deletes a row.
    `void` | `actionEditItem(java.lang.String newValue)` Renames an item.
    `void` | `actionInsertColumn()` Inserts a column.
    `void` | `actionInsertRow()` Inserts a row.
    `void` | `actionMoveRowDown()` Moves an element down.
    `void` | `actionMoveRowUp()` Moves an element up.
    `void` | `actionRenameItem(java.lang.String newValue)` Renames an item.
    `void` | `actionReset()` Clears the hierarchy.
    `void` | `addMouseListener(org.eclipse.swt.events.MouseListener listener)` Adds a mouse listener
    `org.eclipse.swt.widgets.Control` | `getControl()` Returns the underlying control
    `java.lang.String` | `getSelectedValue()` Returns the selected value.
    `boolean` | `isCellSelected()` Returns whether a cell is selected
    `boolean` | `isColumnSelected()` Returns whether a column is selected
    `boolean` | `isEmpty()` Returns whether this component is empty
    `boolean` | `isRowSelected()` Returns whether a row is selected
    `void` | `setHierarchy(AttributeType.Hierarchy hierarchy)` Sets the hierarchy displayed by this component.
    `void` | `setLayoutData(java.lang.Object d)` Sets the layout data.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ComponentHierarchy

          public ComponentHierarchy(org.eclipse.swt.widgets.Composite parent)

      Constructor for non-editable views.
      Parameters:
        `parent` -

    - #### ComponentHierarchy

          public ComponentHierarchy(org.eclipse.swt.widgets.Composite parent,
                            org.eclipse.swt.events.ModifyListener listener)

      Constructor for editable views.
      Parameters:
        `parent` -
        `listener` -

  - ### Method Detail

    - #### actionClear

          public void actionClear()

      Clears the hierarchy.

    - #### actionDeleteColumn

          public void actionDeleteColumn()

      Deletes a column.

    - #### actionDeleteRow

          public void actionDeleteRow()

      Deletes a row.

    - #### actionEditItem

          public void actionEditItem(java.lang.String newValue)

      Renames an item.

    - #### actionInsertColumn

          public void actionInsertColumn()

      Inserts a column.

    - #### actionInsertRow

          public void actionInsertRow()

      Inserts a row.

    - #### actionMoveRowDown

          public void actionMoveRowDown()

      Moves an element down.

    - #### actionMoveRowUp

          public void actionMoveRowUp()

      Moves an element up.

    - #### actionRenameItem

          public void actionRenameItem(java.lang.String newValue)

      Renames an item.

    - #### actionReset

          public void actionReset()

      Clears the hierarchy.

    - #### addMouseListener

          public void addMouseListener(org.eclipse.swt.events.MouseListener listener)

      Adds a mouse listener
      Parameters:
        `listener` -

    - #### getControl

          public org.eclipse.swt.widgets.Control getControl()

      Returns the underlying control
      Returns:

    - #### getSelectedValue

          public java.lang.String getSelectedValue()

      Returns the selected value. Returns null if no value is selected.
      Returns:

    - #### isCellSelected

          public boolean isCellSelected()

      Returns whether a cell is selected
      Returns:

    - #### isColumnSelected

          public boolean isColumnSelected()

      Returns whether a column is selected
      Returns:

    - #### isEmpty

          public boolean isEmpty()

      Returns whether this component is empty
      Returns:

    - #### isRowSelected

          public boolean isRowSelected()

      Returns whether a row is selected
      Returns:

    - #### setHierarchy

          public void setHierarchy(AttributeType.Hierarchy hierarchy)

      Sets the hierarchy displayed by this component. Call with null to reset.
      Parameters:
        `hierarchy` -

    - #### setLayoutData

          public void setLayoutData(java.lang.Object d)

      Sets the layout data.
      Parameters:
        `d` -