Class MultiArrayEntryPanel

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

    public abstract class MultiArrayEntryPanel
    extends JPanel
    A SetEntryPanel is a simple abstract representation of a marker or shape along with the color of a specific entry. IT assumes, that the shape will be provided by the implementing class.
    Author:
    Thomas Pfau
    See Also:
    Serialized Form
    • Constructor Detail

      • MultiArrayEntryPanel

        public MultiArrayEntryPanel​(Color ShapeColor)
        Default Constructor using a given color for representation.
        Parameters:
        ShapeColor - the color that represents this entry
    • Method Detail

      • plotShape

        public void plotShape​(Shape shape,
                              Graphics2D g2d)
        Plot the shape. This will normally draw the shape provided by the getShape method. However, a extending class may overwrite this to plot the shape in other ways or set different properties to the stroke/Paint. Note however, that any changes to the g2d styles should be reverted before returning.
        Parameters:
        shape - the Shape to plot
        g2d - the Graphics2D to plot in
      • getShape

        public abstract Shape getShape​(double xpos,
                                       double ypos,
                                       double width,
                                       double height)
        Get the shape that represents this entry. The shape should be in the bounding box defined by the provided x and y positions along with the width and height NOTE: The resulting Shape has to use the basic java shapes (otherwise batik might get into trouble plotting them)
        Parameters:
        xpos - the leftmost x position to be occupied by this shape
        ypos - the uppermost y position to be occupied by this shape
        width - the width (right to left) of this shape
        height - the height (top to bottom) of the requested shape.
        Returns:
        a shape localised to the given specifications. NOTE: The resulting Shape has to use the basic java shapes (otherwise batik might get into trouble plotting them)