Class ArrayCellText

    • Constructor Detail

      • ArrayCellText

        public ArrayCellText​(String text,
                             ArrayLine line)
        Constructor declaration
        Parameters:
        text -
        line -
      • ArrayCellText

        public ArrayCellText​(T instance,
                             Function<T,​String> lazyText,
                             ArrayLine line)
        The text of the cell is computed from a Function applied to the given instance parameter.
        The function takes in input the given instance and the result must be a String.
        The advantage of this way of use is that the text is computed only when the line is displayed. So that can be see as a lazy computation.
        Once the text computation is done, it is cached so that the computation is performed at most one time.
        Parameters:
        instance - the instance in input of the function.
        lazyText - the function to apply to the instance.
        line - the line of the array.
    • Method Detail

      • getText

        public String getText()
        Returns:
      • getAlignement

        public String getAlignement()
        Returns:
      • setAlignement

        public void setAlignement​(String alignement)
        Parameters:
        alignement -
      • getNoWrap

        public boolean getNoWrap()
        Returns:
      • setNoWrap

        public void setNoWrap​(boolean noWrap)
        Parameters:
        noWrap -
      • getColor

        public String getColor()
        Returns:
      • setColor

        public void setColor​(String color)
        Parameters:
        color -
      • getValignement

        public String getValignement()
      • setValignement

        public void setValignement​(String valignement)
        Parameters:
        valignement -
      • setCompareOn

        public void setCompareOn​(Comparable object)
        Method declaration
        Parameters:
        object -
      • getCompareOn

        public Comparable getCompareOn()
        Method declaration
        Returns:
      • compareTo

        public int compareTo​(Object other)
        Method declaration
        Specified by:
        compareTo in interface Comparable
        Parameters:
        other -
        Returns:
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object