Class TLspLayerTreeNodeCellRenderer

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, TreeCellRenderer

public class TLspLayerTreeNodeCellRenderer extends TLcdLayerTreeNodeCellRenderer
Extension of TLcdLayerTreeNodeCellRenderer that displays layers that are out of scale range disabled. Note that scale range is a property of a TLspLayer, and not of an ILcdLayer.
Since:
2016.1
See Also:
  • Constructor Details

    • TLspLayerTreeNodeCellRenderer

      public TLspLayerTreeNodeCellRenderer(ILspView aView)

      Create a new renderer for a layer tree with an icon height and width of 16. This renderer can only be used on one LayerTree at the same time.

      Parameters:
      aView - the ILspView containing the layers which will be displayed in the layer tree
    • TLspLayerTreeNodeCellRenderer

      public TLspLayerTreeNodeCellRenderer(ILspView aView, int aIconWidth, int aIconHeight)

      Create a new renderer for a layer tree with the specified icon height and width. This renderer can only be used on one TLcdLayerTree at the same time.

      Depending on the scale of the view and the scale range of the layer, the layer will be disabled/enabled in the layer control.

      Parameters:
      aView - the ILspView containing the layers which will be displayed in the layer tree
      aIconWidth - the height of the icon
      aIconHeight - the width of the icon
  • Method Details

    • updateRendererFromLayer

      protected void updateRendererFromLayer(JTree aTree, ILcdLayer aLayer, boolean aSelected, boolean aExpanded, boolean aLeaf, int aRow, boolean aHasFocus)
      Description copied from class: TLcdLayerTreeNodeCellRenderer
      Update the state of the renderer to match the state of the given layer. Override this method if you want to customize, for example, the appearance or content of the label, or the displayed tool tip text.
      Overrides:
      updateRendererFromLayer in class TLcdLayerTreeNodeCellRenderer
      Parameters:
      aTree - the tree which is currently rendered
      aLayer - the layer which state the renderer should match
      aSelected - if true, the cell must be drawn as if selected
      aExpanded - if true, the node is currently expanded
      aLeaf - if true, the node represents a leaf
      aRow - the row number
      aHasFocus - if true, the node currently has focus