Package org.jfree.ui

Class PaintSample

    • Constructor Detail

      • PaintSample

        public PaintSample​(Paint paint)
        Standard constructor - builds a paint sample.
        Parameters:
        paint - the paint to display.
    • Method Detail

      • getPaint

        public Paint getPaint()
        Returns the current Paint object being displayed in the panel.
        Returns:
        the paint.
      • setPaint

        public void setPaint​(Paint paint)
        Sets the Paint object being displayed in the panel.
        Parameters:
        paint - the paint.
      • getPreferredSize

        public Dimension getPreferredSize()
        Returns the preferred size of the component.
        Overrides:
        getPreferredSize in class JComponent
        Returns:
        the preferred size.
      • paintComponent

        public void paintComponent​(Graphics g)
        Fills the component with the current Paint.
        Overrides:
        paintComponent in class JComponent
        Parameters:
        g - the graphics device.