Package jexer.effect

Class MouseGlowCellTransform

  • All Implemented Interfaces:
    CellTransform

    public class MouseGlowCellTransform
    extends java.lang.Object
    implements CellTransform
    MouseGlowCellTransform smoothly changes foreground and/or background color in a rectangular region.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  MouseGlowCellTransform.Layer
      Layer(s) to apply the mouse glow effect to.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void applyTransform​(Backend backend, Cell cell, int x, int y, TWidget widget)
      Perform some kind of change to a cell, based on its location relative to a widget or the entire screen.
      void prepareTransform​(Backend backend, TWidget widget)
      This method is called once before applyTransform() is called on every cell of the widget or screen, providing an opportunity to reduce computations in applyTransform().
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MouseGlowCellTransform

        public MouseGlowCellTransform​(MouseGlowCellTransform.Layer layer,
                                      java.awt.Color glowColor,
                                      int glowDistance)
        Public constructor.
        Parameters:
        layer - layer to apply glow effect to
        glowColor - color of the glow
        glowDistance - maximum horizontal cell distance to have the glow effect
    • Method Detail

      • prepareTransform

        public void prepareTransform​(Backend backend,
                                     TWidget widget)
        This method is called once before applyTransform() is called on every cell of the widget or screen, providing an opportunity to reduce computations in applyTransform().
        Specified by:
        prepareTransform in interface CellTransform
        Parameters:
        backend - the backend that will be passed to applyTransform()
        widget - the widget that will be passed to applyTransform()
      • applyTransform

        public void applyTransform​(Backend backend,
                                   Cell cell,
                                   int x,
                                   int y,
                                   TWidget widget)
        Perform some kind of change to a cell, based on its location relative to a widget or the entire screen.
        Specified by:
        applyTransform in interface CellTransform
        Parameters:
        backend - the backend that can obtain the correct foreground or background color of the cell
        cell - the cell to alter
        x - column of the cell. 0 is the left-most column.
        y - row of the cell. 0 is the top-most row.
        widget - the widget this cell is on, or null if the transform is relative to the entire screen