Package org.eclipse.zest.core.widgets

# Class HideNodeHelper

java.lang.Object
org.eclipse.draw2d.Figure
org.eclipse.zest.core.widgets.internal.ContainerFigure
org.eclipse.zest.core.widgets.HideNodeHelper

All Implemented Interfaces:
  `IFigure`

public class HideNodeHelper extends org.eclipse.zest.core.widgets.internal.ContainerFigure
A ContainerFigure that container buttons and labels for hiding and revealing nodes. This class also provides helper methods for hiding/revealing nodes.

Since:
  1.8

## Nested Class Summary

## Nested classes/interfaces inherited from class org.eclipse.draw2d.Figure

`Figure.FigureIterator, Figure.IdentitySearch, Figure.ReverseFigureChildrenIterator`

## Nested classes/interfaces inherited from interface org.eclipse.draw2d.IFigure

`IFigure.NoInsets`

## Field Summary

Fields
Modifier and Type
Field
Description
`static final int`
`MARGIN`

### Fields inherited from class org.eclipse.draw2d.Figure

`bgColor, border, bounds, fgColor, flags, font, MAX_FLAG, maxSize, minSize, NO_MANAGER, prefSize, toolTip`

### Fields inherited from interface org.eclipse.draw2d.IFigure

`MAX_DIMENSION, MIN_DIMENSION, NO_INSETS`

## Constructor Summary

Constructors
Constructor
Description
`HideNodeHelper(GraphNode node)`
Create a HideNodeHelper and add it to the node's nodeFigure

## Method Summary

Modifier and Type
Method
Description
`void`
`addHideNodeListener(org.eclipse.zest.core.widgets.HideNodeHelper.HideNodeListener listener)`
Add listener to be notified when the node gets hidden/revealed
`org.eclipse.zest.core.widgets.HideNodeHelper.HideNodeListener`
`getHideNodesListener()`
Get HideNodeListener corresponding to the node of this HideNodeHelper
`void`
`removeHideNodeListener(org.eclipse.zest.core.widgets.HideNodeHelper.HideNodeListener listener)`
Remove listener that gets notified when the node gets hidden/revealed
`void`
`resetCounter()`
Resets buttons and label
`void`
`setHideButtonVisible(boolean visible)`
Show button for hiding a node
`void`
`setRevealButtonVisible(boolean visible)`
Show button for revealing a node
`void`
`updateNodeBounds(Rectangle bounds)`
Updates bounds of the node and its modelFigure

### Methods inherited from class org.eclipse.draw2d.Figure

`add, add, add, add, addAncestorListener, addCoordinateListener, addFigureListener, addFocusListener, addKeyListener, addLayoutListener, addListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, containsPoint, containsPoint, erase, findDescendantAtExcluding, findFigureAt, findFigureAt, findFigureAt, findFigureAtExcluding, findMouseEventTargetAt, findMouseEventTargetInDescendantsAt, fireCoordinateSystemChanged, fireFigureMoved, fireMoved, firePropertyChange, firePropertyChange, firePropertyChange, getBackgroundColor, getBorder, getBounds, getChildren, getChildrenRevIterable, getClientArea, getClientArea, getClippingStrategy, getCursor, getFlag, getFont, getForegroundColor, getInsets, getLayoutManager, getListeners, getListenersIterable, getLocalBackgroundColor, getLocalFont, getLocalForegroundColor, getLocation, getMaximumSize, getMinimumSize, getMinimumSize, getParent, getPreferredSize, getPreferredSize, getSize, getToolTip, getUpdateManager, handleFocusGained, handleFocusLost, handleKeyPressed, handleKeyReleased, handleMouseDoubleClicked, handleMouseDragged, handleMouseEntered, handleMouseExited, handleMouseHover, handleMouseMoved, handleMousePressed, handleMouseReleased, handleMouseWheelScrolled, hasFocus, internalGetEventDispatcher, intersects, invalidate, invalidateTree, isCoordinateSystem, isEnabled, isFocusTraversable, isMirrored, isMouseEventTarget, isOpaque, isRequestFocusEnabled, isShowing, isValid, isValidationRoot, isVisible, layout, optimizeClip, paint, paintBorder, paintChildren, paintClientArea, paintFigure, primTranslate, remove, removeAll, removeAncestorListener, removeCoordinateListener, removeFigureListener, removeFocusListener, removeKeyListener, removeLayoutListener, removeListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, revalidate, setBackgroundColor, setBorder, setBounds, setChildrenDirection, setChildrenEnabled, setChildrenOrientation, setClippingStrategy, setConstraint, setCursor, setEnabled, setFlag, setFocusTraversable, setFont, setForegroundColor, setLayoutManager, setLocation, setMaximumSize, setMinimumSize, setOpaque, setParent, setPreferredSize, setPreferredSize, setRequestFocusEnabled, setSize, setSize, setToolTip, setValid, setVisible, translate, translateFromParent, translateToAbsolute, translateToParent, translateToRelative, useLocalCoordinates, validate`

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

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

## Field Details

### MARGIN

public static final int MARGIN

See Also:
  - Constant Field Values

## Constructor Details

### HideNodeHelper

public HideNodeHelper(GraphNode node)
Create a HideNodeHelper and add it to the node's nodeFigure

Parameters:
  `node` -

## Method Details

### setHideButtonVisible

public void setHideButtonVisible(boolean visible)
Show button for hiding a node

Parameters:
  `visible` -

### setRevealButtonVisible

public void setRevealButtonVisible(boolean visible)
Show button for revealing a node

Parameters:
  `visible` -

### resetCounter

public void resetCounter()
Resets buttons and label

### updateNodeBounds

public void updateNodeBounds(Rectangle bounds)
Updates bounds of the node and its modelFigure

Parameters:
  `bounds` - of the whole node including the margin for the buttons

### addHideNodeListener

public void addHideNodeListener(org.eclipse.zest.core.widgets.HideNodeHelper.HideNodeListener listener)
Add listener to be notified when the node gets hidden/revealed

Parameters:
  `listener` - of connected node

### removeHideNodeListener

public void removeHideNodeListener(org.eclipse.zest.core.widgets.HideNodeHelper.HideNodeListener listener)
Remove listener that gets notified when the node gets hidden/revealed

Parameters:
  `listener` - of connected node

### getHideNodesListener

public org.eclipse.zest.core.widgets.HideNodeHelper.HideNodeListener getHideNodesListener()
Get HideNodeListener corresponding to the node of this HideNodeHelper

Returns:
  HideNodeListener