com.dlsc.flexgantt.swing.layer.system

## Class RowLayer

- java.lang.Object
- - com.dlsc.flexgantt.swing.layer.AbstractLayer
  - - com.dlsc.flexgantt.swing.layer.system.AbstractSystemLayer
    - - com.dlsc.flexgantt.swing.layer.system.RowLayer

- All Implemented Interfaces:
    MouseListener, MouseMotionListener, EventListener

      public class RowLayer
      extends AbstractSystemLayer
      implements MouseMotionListener, MouseListener

  The row layer is responsible for looking up and invoking `IRowRenderer` implementations for the Gantt chart nodes. The renderers draw extra information for each row on the right-hand side of the Gantt chart.
  Since:
    1.0
  Version:
    $Revision: 1.12 $
  Author:
    Dirk Lemmermann

- - ### Field Summary

    - ### Fields inherited from class com.dlsc.flexgantt.swing.layer.AbstractLayer

      `alpha, changeSupport, ganttChart, layerContainer, PROPERTY_ALPHA, PROPERTY_VISIBLE`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `RowLayer(LayerContainer lc)` Constructs a new row layer.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `IRowRenderer` | `getRowRenderer(Class treeNodeType)` Returns a row renderer for an object (tree node).
    `Map<Class,IRowRenderer>` | `getRowRendererMap()` Returns the map, which is storing the mapping between node types and renderer implementations.
    `boolean` | `isPaintingFocus()` Determines whether the layer will visualize whether a row has the focus or not.
    `void` | `mouseClicked(MouseEvent evt)`
    `void` | `mouseDragged(MouseEvent evt)`
    `void` | `mouseEntered(MouseEvent evt)`
    `void` | `mouseExited(MouseEvent evt)`
    `void` | `mouseMoved(MouseEvent evt)`
    `void` | `mousePressed(MouseEvent evt)`
    `void` | `mouseReleased(MouseEvent evt)`
    `protected void` | `paintLayer(Graphics g)`
    `void` | `setPaintingFocus(boolean paintingFocus)` Specifies whether the layer will visualize whether a row has the focus or not.
    `void` | `setRowRenderer(Class treeNodeType, IRowRenderer renderer)` Maps the implementation of a row renderer to a class definition, where the class is the type of a tree tree node.
    `void` | `setRowRendererMap(Map<Class,IRowRenderer> map)` Sets the map, which is storing the mapping between node types and renderer implementations.

    - ### Methods inherited from class com.dlsc.flexgantt.swing.layer.AbstractLayer

      `addPropertyChangeListener, getAlpha, getDateline, getEventline, getGanttChart, getHeight, getLayerContainer, getLayerPolicyProvider, getModel, getName, getStartRow, getTimeAt, getTimeline, getTimeLocation, getTimeSpanUsed, getToolTipText, getTreeTable, getTreeTablePolicyProvider, getWidth, isVisible, removePropertyChangeListener, repaint, repaint, repaint, setAlpha, setVisible, tearDown`

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

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

- - ### Constructor Detail

    - #### RowLayer

          public RowLayer(LayerContainer lc)

      Constructs a new row layer.
      Parameters:
        `lc` - the parent layer container
      Since:
        1.0

  - ### Method Detail

    - #### paintLayer

          protected void paintLayer(Graphics g)

      Overrides:
        `paintLayer` in class `AbstractLayer`

    - #### mouseDragged

          public void mouseDragged(MouseEvent evt)

      Specified by:
        `mouseDragged` in interface `MouseMotionListener`

    - #### mouseMoved

          public void mouseMoved(MouseEvent evt)

      Specified by:
        `mouseMoved` in interface `MouseMotionListener`

    - #### mouseClicked

          public void mouseClicked(MouseEvent evt)

      Specified by:
        `mouseClicked` in interface `MouseListener`

    - #### mouseEntered

          public void mouseEntered(MouseEvent evt)

      Specified by:
        `mouseEntered` in interface `MouseListener`

    - #### mouseExited

          public void mouseExited(MouseEvent evt)

      Specified by:
        `mouseExited` in interface `MouseListener`

    - #### mousePressed

          public void mousePressed(MouseEvent evt)

      Specified by:
        `mousePressed` in interface `MouseListener`

    - #### mouseReleased

          public void mouseReleased(MouseEvent evt)

      Specified by:
        `mouseReleased` in interface `MouseListener`

    - #### setRowRenderer

          public void setRowRenderer(Class treeNodeType,
                                     IRowRenderer renderer)

      Maps the implementation of a row renderer to a class definition, where the class is the type of a tree tree node.
      Parameters:
        `treeNodeType` - the type of the tree node shown in the row
        `renderer` - an implementation that will be used to renderer the row background of instances of the given object type
      Since:
        1.0
      See Also:
        `DefaultRowRenderer`, `getRowRenderer(Class)`

    - #### getRowRenderer

          public IRowRenderer getRowRenderer(Class treeNodeType)

      Returns a row renderer for an object (tree node). The lookup of the renderer is based on the object type of the given object. This method will return the default row renderer if no other renderer was explicitly assigned to the type or any supertype of the given object.
      Parameters:
        `treeNodeType` - the type of the tree node shown in the row
      Returns:
        a matching row renderer implementation
      Since:
        1.0
      See Also:
        `setRowRenderer(Class, IRowRenderer)`, `DefaultRowRenderer`

    - #### getRowRendererMap

          public Map<Class,IRowRenderer> getRowRendererMap()

      Returns the map, which is storing the mapping between node types and renderer implementations.
      Returns:
        the row renderer map
      Since:
        1.0

    - #### setRowRendererMap

          public void setRowRendererMap(Map<Class,IRowRenderer> map)

      Sets the map, which is storing the mapping between node types and renderer implementations.
      Parameters:
        `map` - the row renderer map
      Since:
        1.0

    - #### isPaintingFocus

          public boolean isPaintingFocus()

      Determines whether the layer will visualize whether a row has the focus or not.
      Returns:
        TRUE if the 'row focus' feature is supported
      Since:
        1.0

    - #### setPaintingFocus

          public void setPaintingFocus(boolean paintingFocus)

      Specifies whether the layer will visualize whether a row has the focus or not.
      Parameters:
        `paintingFocus` - if TRUE the 'row focus' feature will be supported
      Since:
        1.0

Copyright © 2006–2020 Dirk Lemmermann Software & Consulting. All rights reserved.