Interface ILegendPanel

All Known Implementing Classes:
AbstractParentPanel, Categories, Features

public interface ILegendPanel
Author:
jaume dominguez faus - jaume.dominguez@iver.es Este interfaz es el que debe cumplir cualquier panel que empleemos para confeccionar una leyenda. Se le pasa una capa para que tome su leyenda, y con el método getLegend tomamos la leyenda que ha confeccionado el usuario.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns a brief human-readable description about what kind of legend builds this panel
    Returns the icon which should graphically describe what this panel's legend does.
    org.gvsig.fmap.mapcontext.rendering.legend.ILegend
    Returns an instance of Legend
    Returns the class of the legend produced by this ILegendPanel.
    If this is a complete panel (it is a child node in the legend tree) to set up a legend this method will return a JPanel containing the necessary components.
    If this panel should appear as a subnode of the legends tree, in other words it is not a first-level node, then this method would return its parent's class.
    Returns the title (a human-readable one) of this panel.
    boolean
    isSuitableFor(org.gvsig.fmap.mapcontext.layers.FLayer layer)
    Returns true if this legend is applicable to this layer, false otherwise.
    void
    setData(org.gvsig.fmap.mapcontext.layers.FLayer lyr, org.gvsig.fmap.mapcontext.rendering.legend.ILegend legend)
    Initializes the data required for this legend panel.
  • Method Details

    • setData

      void setData(org.gvsig.fmap.mapcontext.layers.FLayer lyr, org.gvsig.fmap.mapcontext.rendering.legend.ILegend legend)
      Initializes the data required for this legend panel. That is, the layer that will adopt the changes and the current legend that this layer has. If the legend is not the type of legend that this panel manages then it initializes the panel with the default values. In case it is, then the panel should refresh its components with the current values of the Legend.
      Parameters:
      lyr - , target layer
      legend - , the legend currently applied to lyr
    • getLegend

      org.gvsig.fmap.mapcontext.rendering.legend.ILegend getLegend()
      Returns an instance of Legend
      Returns:
      Legend, the legend result of the settings
    • getDescription

      String getDescription()
      Returns a brief human-readable description about what kind of legend builds this panel
      Returns:
      String with a brief description
    • getIcon

      ImageIcon getIcon()
      Returns the icon which should graphically describe what this panel's legend does.
      Returns:
      ImageIcon with the icon to be displayed
    • getParentClass

      Class getParentClass()
      If this panel should appear as a subnode of the legends tree, in other words it is not a first-level node, then this method would return its parent's class. Otherwise, if it is a first-level node, then it will return null.
      Returns:
      String containing the parent's title.
    • getTitle

      String getTitle()
      Returns the title (a human-readable one) of this panel.
    • getPanel

      JPanel getPanel()

      If this is a complete panel (it is a child node in the legend tree) to set up a legend this method will return a JPanel containing the necessary components. Otherwise, if it is just a classification node (it has children) in the legend tree it will return just null.

      If null is returned, the ILegendPanel that will be shown and selected each time it is selected is the very first child of this parent node.

    • getLegendClass

      Class getLegendClass()
      Returns the class of the legend produced by this ILegendPanel.
    • isSuitableFor

      boolean isSuitableFor(org.gvsig.fmap.mapcontext.layers.FLayer layer)
      Returns true if this legend is applicable to this layer, false otherwise.